| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 private: | 224 private: |
| 225 virtual ~GeneratedBackgroundPageJob() {} | 225 virtual ~GeneratedBackgroundPageJob() {} |
| 226 | 226 |
| 227 scoped_refptr<const Extension> extension_; | 227 scoped_refptr<const Extension> extension_; |
| 228 net::HttpResponseInfo response_info_; | 228 net::HttpResponseInfo response_info_; |
| 229 }; | 229 }; |
| 230 | 230 |
| 231 base::Time GetFileLastModifiedTime(const base::FilePath& filename) { | 231 base::Time GetFileLastModifiedTime(const base::FilePath& filename) { |
| 232 if (base::PathExists(filename)) { | 232 if (base::PathExists(filename)) { |
| 233 base::PlatformFileInfo info; | 233 base::File::Info info; |
| 234 if (base::GetFileInfo(filename, &info)) | 234 if (base::GetFileInfo(filename, &info)) |
| 235 return info.last_modified; | 235 return info.last_modified; |
| 236 } | 236 } |
| 237 return base::Time(); | 237 return base::Time(); |
| 238 } | 238 } |
| 239 | 239 |
| 240 base::Time GetFileCreationTime(const base::FilePath& filename) { | 240 base::Time GetFileCreationTime(const base::FilePath& filename) { |
| 241 if (base::PathExists(filename)) { | 241 if (base::PathExists(filename)) { |
| 242 base::PlatformFileInfo info; | 242 base::File::Info info; |
| 243 if (base::GetFileInfo(filename, &info)) | 243 if (base::GetFileInfo(filename, &info)) |
| 244 return info.creation_time; | 244 return info.creation_time; |
| 245 } | 245 } |
| 246 return base::Time(); | 246 return base::Time(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 void ReadResourceFilePathAndLastModifiedTime( | 249 void ReadResourceFilePathAndLastModifiedTime( |
| 250 const extensions::ExtensionResource& resource, | 250 const extensions::ExtensionResource& resource, |
| 251 const base::FilePath& directory, | 251 const base::FilePath& directory, |
| 252 base::FilePath* file_path, | 252 base::FilePath* file_path, |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 send_cors_header); | 620 send_cors_header); |
| 621 } | 621 } |
| 622 | 622 |
| 623 } // namespace | 623 } // namespace |
| 624 | 624 |
| 625 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler( | 625 net::URLRequestJobFactory::ProtocolHandler* CreateExtensionProtocolHandler( |
| 626 bool is_incognito, | 626 bool is_incognito, |
| 627 extensions::InfoMap* extension_info_map) { | 627 extensions::InfoMap* extension_info_map) { |
| 628 return new ExtensionProtocolHandler(is_incognito, extension_info_map); | 628 return new ExtensionProtocolHandler(is_incognito, extension_info_map); |
| 629 } | 629 } |
| OLD | NEW |