OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |