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

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

Issue 65123002: Move chrome/common/extensions/background_info.h to src/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase2 background_info Created 7 years, 1 month 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_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/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
11 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
12 #include "chrome/common/chrome_paths.h" 12 #include "chrome/common/chrome_paths.h"
13 #include "chrome/common/extensions/extension_file_util.h"
14 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 #include "extensions/common/file_util.h"
15 #include "net/url_request/url_request_file_job.h" 15 #include "net/url_request/url_request_file_job.h"
16 16
17 namespace { 17 namespace {
18 18
19 base::FilePath ResolvePath(const GURL& url) { 19 base::FilePath ResolvePath(const GURL& url) {
20 base::FilePath root_path; 20 base::FilePath root_path;
21 PathService::Get(chrome::DIR_RESOURCES_EXTENSION, &root_path); 21 PathService::Get(chrome::DIR_RESOURCES_EXTENSION, &root_path);
22 return extension_file_util::ExtensionResourceURLToFilePath(url, root_path); 22 return extensions::file_util::ExtensionResourceURLToFilePath(url, root_path);
23 } 23 }
24 24
25 class ExtensionResourcesJob : public net::URLRequestFileJob { 25 class ExtensionResourcesJob : public net::URLRequestFileJob {
26 public: 26 public:
27 ExtensionResourcesJob(net::URLRequest* request, 27 ExtensionResourcesJob(net::URLRequest* request,
28 net::NetworkDelegate* network_delegate) 28 net::NetworkDelegate* network_delegate)
29 : net::URLRequestFileJob( 29 : net::URLRequestFileJob(
30 request, network_delegate, base::FilePath(), 30 request, network_delegate, base::FilePath(),
31 content::BrowserThread::GetBlockingPool()-> 31 content::BrowserThread::GetBlockingPool()->
32 GetTaskRunnerWithShutdownBehavior( 32 GetTaskRunnerWithShutdownBehavior(
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 net::URLRequest* request, net::NetworkDelegate* network_delegate) const { 84 net::URLRequest* request, net::NetworkDelegate* network_delegate) const {
85 return new ExtensionResourcesJob(request, network_delegate); 85 return new ExtensionResourcesJob(request, network_delegate);
86 } 86 }
87 87
88 } // namespace 88 } // namespace
89 89
90 net::URLRequestJobFactory::ProtocolHandler* 90 net::URLRequestJobFactory::ProtocolHandler*
91 CreateExtensionResourceProtocolHandler() { 91 CreateExtensionResourceProtocolHandler() {
92 return new ExtensionResourceProtocolHandler(); 92 return new ExtensionResourceProtocolHandler();
93 } 93 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_protocols.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698