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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 22795006: Remove WorkerPool dependency from URLRequestFileJob. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 7 years, 4 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/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/debug/alias.h" 14 #include "base/debug/alias.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/prefs/pref_service.h" 17 #include "base/prefs/pref_service.h"
18 #include "base/stl_util.h" 18 #include "base/stl_util.h"
19 #include "base/strings/string_number_conversions.h" 19 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/string_util.h" 20 #include "base/strings/string_util.h"
21 #include "base/strings/stringprintf.h" 21 #include "base/strings/stringprintf.h"
22 #include "base/threading/sequenced_worker_pool.h"
22 #include "chrome/browser/browser_process.h" 23 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/chrome_notification_types.h" 24 #include "chrome/browser/chrome_notification_types.h"
24 #include "chrome/browser/content_settings/content_settings_provider.h" 25 #include "chrome/browser/content_settings/content_settings_provider.h"
25 #include "chrome/browser/content_settings/cookie_settings.h" 26 #include "chrome/browser/content_settings/cookie_settings.h"
26 #include "chrome/browser/content_settings/host_content_settings_map.h" 27 #include "chrome/browser/content_settings/host_content_settings_map.h"
27 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 28 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
28 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" 29 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
29 #include "chrome/browser/download/download_service.h" 30 #include "chrome/browser/download/download_service.h"
30 #include "chrome/browser/download/download_service_factory.h" 31 #include "chrome/browser/download/download_service_factory.h"
31 #include "chrome/browser/extensions/extension_info_map.h" 32 #include "chrome/browser/extensions/extension_info_map.h"
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 829
829 scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults( 830 scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
830 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory, 831 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory,
831 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 832 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
832 protocol_handler_interceptor, 833 protocol_handler_interceptor,
833 net::NetworkDelegate* network_delegate, 834 net::NetworkDelegate* network_delegate,
834 net::FtpTransactionFactory* ftp_transaction_factory) const { 835 net::FtpTransactionFactory* ftp_transaction_factory) const {
835 // NOTE(willchan): Keep these protocol handlers in sync with 836 // NOTE(willchan): Keep these protocol handlers in sync with
836 // ProfileIOData::IsHandledProtocol(). 837 // ProfileIOData::IsHandledProtocol().
837 bool set_protocol = job_factory->SetProtocolHandler( 838 bool set_protocol = job_factory->SetProtocolHandler(
838 chrome::kFileScheme, new net::FileProtocolHandler()); 839 chrome::kFileScheme,
840 new net::FileProtocolHandler(
841 content::BrowserThread::GetBlockingPool()->
842 GetTaskRunnerWithShutdownBehavior(
843 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
839 DCHECK(set_protocol); 844 DCHECK(set_protocol);
840 845
841 DCHECK(extension_info_map_.get()); 846 DCHECK(extension_info_map_.get());
842 set_protocol = job_factory->SetProtocolHandler( 847 set_protocol = job_factory->SetProtocolHandler(
843 extensions::kExtensionScheme, 848 extensions::kExtensionScheme,
844 CreateExtensionProtocolHandler(is_incognito(), 849 CreateExtensionProtocolHandler(is_incognito(),
845 extension_info_map_.get())); 850 extension_info_map_.get()));
846 DCHECK(set_protocol); 851 DCHECK(set_protocol);
847 set_protocol = job_factory->SetProtocolHandler( 852 set_protocol = job_factory->SetProtocolHandler(
848 chrome::kExtensionResourceScheme, 853 chrome::kExtensionResourceScheme,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 void ProfileIOData::SetCookieSettingsForTesting( 959 void ProfileIOData::SetCookieSettingsForTesting(
955 CookieSettings* cookie_settings) { 960 CookieSettings* cookie_settings) {
956 DCHECK(!cookie_settings_.get()); 961 DCHECK(!cookie_settings_.get());
957 cookie_settings_ = cookie_settings; 962 cookie_settings_ = cookie_settings;
958 } 963 }
959 964
960 void ProfileIOData::set_signin_names_for_testing( 965 void ProfileIOData::set_signin_names_for_testing(
961 SigninNamesOnIOThread* signin_names) { 966 SigninNamesOnIOThread* signin_names) {
962 signin_names_.reset(signin_names); 967 signin_names_.reset(signin_names);
963 } 968 }
OLDNEW
« no previous file with comments | « chrome/browser/net/load_timing_browsertest.cc ('k') | content/shell/shell_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698