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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 void ReadMimeTypeFromFile(const base::FilePath& filename, 96 void ReadMimeTypeFromFile(const base::FilePath& filename,
97 std::string* mime_type, 97 std::string* mime_type,
98 bool* result) { 98 bool* result) {
99 *result = net::GetMimeTypeFromFile(filename, mime_type); 99 *result = net::GetMimeTypeFromFile(filename, mime_type);
100 } 100 }
101 101
102 void GetLastModifiedTime(const base::FilePath& filename, 102 void GetLastModifiedTime(const base::FilePath& filename,
103 base::Time* last_modified_time) { 103 base::Time* last_modified_time) {
104 if (file_util::PathExists(filename)) { 104 if (base::PathExists(filename)) {
105 base::PlatformFileInfo info; 105 base::PlatformFileInfo info;
106 if (file_util::GetFileInfo(filename, &info)) 106 if (file_util::GetFileInfo(filename, &info))
107 *last_modified_time = info.last_modified; 107 *last_modified_time = info.last_modified;
108 } 108 }
109 } 109 }
110 110
111 class URLRequestResourceBundleJob : public net::URLRequestSimpleJob { 111 class URLRequestResourceBundleJob : public net::URLRequestSimpleJob {
112 public: 112 public:
113 URLRequestResourceBundleJob(net::URLRequest* request, 113 URLRequestResourceBundleJob(net::URLRequest* request,
114 net::NetworkDelegate* network_delegate, 114 net::NetworkDelegate* network_delegate,
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 send_cors_header); 562 send_cors_header);
563 } 563 }
564 564
565 } // namespace 565 } // namespace
566 566
567 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler( 567 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler(
568 bool is_incognito, 568 bool is_incognito,
569 ExtensionInfoMap* extension_info_map) { 569 ExtensionInfoMap* extension_info_map) {
570 return new ExtensionProtocolHandler(is_incognito, extension_info_map); 570 return new ExtensionProtocolHandler(is_incognito, extension_info_map);
571 } 571 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_creator.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698