| 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_resource_protocols.h" | 5 #include "chrome/browser/extensions/extension_resource_protocols.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" |
| 9 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 10 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 11 #include "base/threading/sequenced_worker_pool.h" | 12 #include "base/threading/sequenced_worker_pool.h" |
| 12 #include "base/threading/thread_checker.h" | 13 #include "base/threading/thread_checker.h" |
| 13 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 14 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 15 #include "extensions/common/file_util.h" | 16 #include "extensions/common/file_util.h" |
| 16 #include "net/url_request/url_request_file_job.h" | 17 #include "net/url_request/url_request_file_job.h" |
| 17 | 18 |
| 18 namespace { | 19 namespace { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 89 |
| 89 // Creates URLRequestJobs for chrome-extension-resource:// URLs. | 90 // Creates URLRequestJobs for chrome-extension-resource:// URLs. |
| 90 net::URLRequestJob* | 91 net::URLRequestJob* |
| 91 ExtensionResourceProtocolHandler::MaybeCreateJob( | 92 ExtensionResourceProtocolHandler::MaybeCreateJob( |
| 92 net::URLRequest* request, net::NetworkDelegate* network_delegate) const { | 93 net::URLRequest* request, net::NetworkDelegate* network_delegate) const { |
| 93 return new ExtensionResourcesJob(request, network_delegate); | 94 return new ExtensionResourcesJob(request, network_delegate); |
| 94 } | 95 } |
| 95 | 96 |
| 96 } // namespace | 97 } // namespace |
| 97 | 98 |
| 98 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 99 std::unique_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 99 CreateExtensionResourceProtocolHandler() { | 100 CreateExtensionResourceProtocolHandler() { |
| 100 return make_scoped_ptr(new ExtensionResourceProtocolHandler()); | 101 return base::WrapUnique(new ExtensionResourceProtocolHandler()); |
| 101 } | 102 } |
| OLD | NEW |