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

Side by Side Diff: net/disk_cache/simple/simple_util.cc

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/disk_cache/simple/simple_util.h" 5 #include "net/disk_cache/simple/simple_util.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 return false; 118 return false;
119 time_t sec; 119 time_t sec;
120 long nsec; 120 long nsec;
121 if (GetNanoSecsFromStat(file_stat, &sec, &nsec)) { 121 if (GetNanoSecsFromStat(file_stat, &sec, &nsec)) {
122 int64 usec = (nsec / base::Time::kNanosecondsPerMicrosecond); 122 int64 usec = (nsec / base::Time::kNanosecondsPerMicrosecond);
123 *out_mtime = base::Time::FromTimeT(sec) 123 *out_mtime = base::Time::FromTimeT(sec)
124 + base::TimeDelta::FromMicroseconds(usec); 124 + base::TimeDelta::FromMicroseconds(usec);
125 return true; 125 return true;
126 } 126 }
127 #endif 127 #endif
128 base::PlatformFileInfo file_info; 128 base::File::Info file_info;
129 if (!base::GetFileInfo(path, &file_info)) 129 if (!base::GetFileInfo(path, &file_info))
130 return false; 130 return false;
131 *out_mtime = file_info.last_modified; 131 *out_mtime = file_info.last_modified;
132 return true; 132 return true;
133 } 133 }
134 134
135 } // namespace simple_backend 135 } // namespace simple_backend
136 136
137 } // namespace disk_cache 137 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_test_util.cc ('k') | net/disk_cache/simple/simple_version_upgrade.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698