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

Side by Side Diff: chrome/browser/extensions/extension_protocols.cc

Issue 105293002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/extensions/extension_protocols.h" 5 #include "chrome/browser/extensions/extension_protocols.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 private: 225 private:
226 virtual ~GeneratedBackgroundPageJob() {} 226 virtual ~GeneratedBackgroundPageJob() {}
227 227
228 scoped_refptr<const Extension> extension_; 228 scoped_refptr<const Extension> extension_;
229 net::HttpResponseInfo response_info_; 229 net::HttpResponseInfo response_info_;
230 }; 230 };
231 231
232 base::Time GetFileLastModifiedTime(const base::FilePath& filename) { 232 base::Time GetFileLastModifiedTime(const base::FilePath& filename) {
233 if (base::PathExists(filename)) { 233 if (base::PathExists(filename)) {
234 base::PlatformFileInfo info; 234 base::PlatformFileInfo info;
235 if (file_util::GetFileInfo(filename, &info)) 235 if (base::GetFileInfo(filename, &info))
236 return info.last_modified; 236 return info.last_modified;
237 } 237 }
238 return base::Time(); 238 return base::Time();
239 } 239 }
240 240
241 base::Time GetFileCreationTime(const base::FilePath& filename) { 241 base::Time GetFileCreationTime(const base::FilePath& filename) {
242 if (base::PathExists(filename)) { 242 if (base::PathExists(filename)) {
243 base::PlatformFileInfo info; 243 base::PlatformFileInfo info;
244 if (file_util::GetFileInfo(filename, &info)) 244 if (base::GetFileInfo(filename, &info))
245 return info.creation_time; 245 return info.creation_time;
246 } 246 }
247 return base::Time(); 247 return base::Time();
248 } 248 }
249 249
250 void ReadResourceFilePathAndLastModifiedTime( 250 void ReadResourceFilePathAndLastModifiedTime(
251 const extensions::ExtensionResource& resource, 251 const extensions::ExtensionResource& resource,
252 const base::FilePath& directory, 252 const base::FilePath& directory,
253 base::FilePath* file_path, 253 base::FilePath* file_path,
254 base::Time* last_modified_time) { 254 base::Time* last_modified_time) {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 send_cors_header); 621 send_cors_header);
622 } 622 }
623 623
624 } // namespace 624 } // namespace
625 625
626 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler( 626 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler(
627 bool is_incognito, 627 bool is_incognito,
628 extensions::InfoMap* extension_info_map) { 628 extensions::InfoMap* extension_info_map) {
629 return new ExtensionProtocolHandler(is_incognito, extension_info_map); 629 return new ExtensionProtocolHandler(is_incognito, extension_info_map);
630 } 630 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc ('k') | chrome/browser/first_run/upgrade_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698