Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: webrtc/base/fileutils.cc

Issue 1835053002: Change default timestamp to 64 bits in all webrtc directories. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO for timestamp. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/asyncudpsocket.cc ('k') | webrtc/base/gunit.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #endif 126 #endif
127 } 127 }
128 128
129 bool DirectoryIterator::OlderThan(int seconds) const { 129 bool DirectoryIterator::OlderThan(int seconds) const {
130 time_t file_modify_time; 130 time_t file_modify_time;
131 #if defined(WEBRTC_WIN) 131 #if defined(WEBRTC_WIN)
132 FileTimeToUnixTime(data_.ftLastWriteTime, &file_modify_time); 132 FileTimeToUnixTime(data_.ftLastWriteTime, &file_modify_time);
133 #else 133 #else
134 file_modify_time = stat_.st_mtime; 134 file_modify_time = stat_.st_mtime;
135 #endif 135 #endif
136 return TimeDiff(time(NULL), file_modify_time) >= seconds; 136 return time(NULL) - file_modify_time >= seconds;
137 } 137 }
138 138
139 FilesystemInterface* Filesystem::default_filesystem_ = NULL; 139 FilesystemInterface* Filesystem::default_filesystem_ = NULL;
140 140
141 FilesystemInterface *Filesystem::EnsureDefaultFilesystem() { 141 FilesystemInterface *Filesystem::EnsureDefaultFilesystem() {
142 if (!default_filesystem_) { 142 if (!default_filesystem_) {
143 #if defined(WEBRTC_WIN) 143 #if defined(WEBRTC_WIN)
144 default_filesystem_ = new Win32Filesystem(); 144 default_filesystem_ = new Win32Filesystem();
145 #else 145 #else
146 default_filesystem_ = new UnixFilesystem(); 146 default_filesystem_ = new UnixFilesystem();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 version += 1; 275 version += 1;
276 char version_base[MAX_PATH]; 276 char version_base[MAX_PATH];
277 sprintfn(version_base, arraysize(version_base), "%s-%u", basename.c_str(), 277 sprintfn(version_base, arraysize(version_base), "%s-%u", basename.c_str(),
278 version); 278 version);
279 path.SetBasename(version_base); 279 path.SetBasename(version_base);
280 } 280 }
281 return true; 281 return true;
282 } 282 }
283 283
284 } // namespace rtc 284 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/asyncudpsocket.cc ('k') | webrtc/base/gunit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698