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

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

Issue 8102019: redesign and reimplement proxy config service and tracker, revise proxy ui on cros (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 11 #include "base/command_line.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/string_number_conversions.h" 15 #include "base/string_number_conversions.h"
16 #include "base/task.h" 16 #include "base/task.h"
17 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
18 #include "chrome/browser/content_settings/host_content_settings_map.h" 18 #include "chrome/browser/content_settings/host_content_settings_map.h"
19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
20 #include "chrome/browser/extensions/extension_info_map.h" 20 #include "chrome/browser/extensions/extension_info_map.h"
21 #include "chrome/browser/extensions/extension_protocols.h" 21 #include "chrome/browser/extensions/extension_protocols.h"
22 #include "chrome/browser/io_thread.h" 22 #include "chrome/browser/io_thread.h"
23 #include "chrome/browser/media/media_internals.h" 23 #include "chrome/browser/media/media_internals.h"
24 #include "chrome/browser/net/chrome_cookie_notification_details.h" 24 #include "chrome/browser/net/chrome_cookie_notification_details.h"
25 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" 25 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h"
26 #include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h" 26 #include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h"
27 #include "chrome/browser/net/chrome_net_log.h" 27 #include "chrome/browser/net/chrome_net_log.h"
28 #include "chrome/browser/net/chrome_network_delegate.h" 28 #include "chrome/browser/net/chrome_network_delegate.h"
29 #include "chrome/browser/net/pref_proxy_config_service.h" 29 #include "chrome/browser/net/pref_proxy_config_tracker.h"
30 #include "chrome/browser/net/proxy_service_factory.h" 30 #include "chrome/browser/net/proxy_service_factory.h"
31 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 31 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
32 #include "chrome/browser/policy/url_blacklist_manager.h" 32 #include "chrome/browser/policy/url_blacklist_manager.h"
33 #include "chrome/browser/prefs/pref_service.h" 33 #include "chrome/browser/prefs/pref_service.h"
34 #include "chrome/browser/profiles/profile.h" 34 #include "chrome/browser/profiles/profile.h"
35 #include "chrome/browser/profiles/profile_manager.h" 35 #include "chrome/browser/profiles/profile_manager.h"
36 #include "chrome/browser/transport_security_persister.h" 36 #include "chrome/browser/transport_security_persister.h"
37 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h" 37 #include "chrome/browser/ui/webui/chrome_url_data_manager_backend.h"
38 #include "chrome/common/chrome_notification_types.h" 38 #include "chrome/common/chrome_notification_types.h"
39 #include "chrome/common/chrome_switches.h" 39 #include "chrome/common/chrome_switches.h"
(...skipping 17 matching lines...) Expand all
57 #include "net/url_request/url_request.h" 57 #include "net/url_request/url_request.h"
58 #include "webkit/blob/blob_data.h" 58 #include "webkit/blob/blob_data.h"
59 #include "webkit/blob/blob_url_request_job_factory.h" 59 #include "webkit/blob/blob_url_request_job_factory.h"
60 #include "webkit/database/database_tracker.h" 60 #include "webkit/database/database_tracker.h"
61 #include "webkit/fileapi/file_system_context.h" 61 #include "webkit/fileapi/file_system_context.h"
62 #include "webkit/fileapi/file_system_url_request_job_factory.h" 62 #include "webkit/fileapi/file_system_url_request_job_factory.h"
63 #include "webkit/quota/quota_manager.h" 63 #include "webkit/quota/quota_manager.h"
64 64
65 #if defined(OS_CHROMEOS) 65 #if defined(OS_CHROMEOS)
66 #include "chrome/browser/chromeos/gview_request_interceptor.h" 66 #include "chrome/browser/chromeos/gview_request_interceptor.h"
67 #include "chrome/browser/chromeos/proxy_config_service_impl.h"
67 #endif // defined(OS_CHROMEOS) 68 #endif // defined(OS_CHROMEOS)
68 69
69 namespace { 70 namespace {
70 71
71 // ---------------------------------------------------------------------------- 72 // ----------------------------------------------------------------------------
72 // CookieMonster::Delegate implementation 73 // CookieMonster::Delegate implementation
73 // ---------------------------------------------------------------------------- 74 // ----------------------------------------------------------------------------
74 class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate { 75 class ChromeCookieMonsterDelegate : public net::CookieMonster::Delegate {
75 public: 76 public:
76 explicit ChromeCookieMonsterDelegate( 77 explicit ChromeCookieMonsterDelegate(
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 params->database_tracker = profile->GetDatabaseTracker(); 231 params->database_tracker = profile->GetDatabaseTracker();
231 params->appcache_service = profile->GetAppCacheService(); 232 params->appcache_service = profile->GetAppCacheService();
232 params->blob_storage_context = profile->GetBlobStorageContext(); 233 params->blob_storage_context = profile->GetBlobStorageContext();
233 params->file_system_context = profile->GetFileSystemContext(); 234 params->file_system_context = profile->GetFileSystemContext();
234 params->quota_manager = profile->GetQuotaManager(); 235 params->quota_manager = profile->GetQuotaManager();
235 params->extension_info_map = profile->GetExtensionInfoMap(); 236 params->extension_info_map = profile->GetExtensionInfoMap();
236 params->notification_service = 237 params->notification_service =
237 DesktopNotificationServiceFactory::GetForProfile(profile); 238 DesktopNotificationServiceFactory::GetForProfile(profile);
238 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry(); 239 params->protocol_handler_registry = profile->GetProtocolHandlerRegistry();
239 240
240 params->proxy_config_service.reset( 241 ChromeProxyConfigService* proxy_config_service =
241 ProxyServiceFactory::CreateProxyConfigService( 242 ProxyServiceFactory::CreateProxyConfigService();
242 profile->GetProxyConfigTracker())); 243 params->proxy_config_service.reset(proxy_config_service);
244 profile->GetProxyConfigTracker()->SetChromeProxyConfigService(
245 proxy_config_service);
243 params->profile = profile; 246 params->profile = profile;
244 profile_params_.reset(params.release()); 247 profile_params_.reset(params.release());
245 248
246 // The URLBlacklistManager has to be created on the UI thread to register 249 // The URLBlacklistManager has to be created on the UI thread to register
247 // observers of |pref_service|, and it also has to clean up on 250 // observers of |pref_service|, and it also has to clean up on
248 // ShutdownOnUIThread to release these observers on the right thread. 251 // ShutdownOnUIThread to release these observers on the right thread.
249 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, 252 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up,
250 // in particular when this ProfileIOData isn't |initialized_| during deletion. 253 // in particular when this ProfileIOData isn't |initialized_| during deletion.
251 #if defined(ENABLE_CONFIGURATION_POLICY) 254 #if defined(ENABLE_CONFIGURATION_POLICY)
252 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service)); 255 url_blacklist_manager_.reset(new policy::URLBlacklistManager(pref_service));
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 539 bool posted = BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
537 new DeleteTask<ProfileIOData>(this)); 540 new DeleteTask<ProfileIOData>(this));
538 if (!posted) 541 if (!posted)
539 delete this; 542 delete this;
540 } 543 }
541 544
542 void ProfileIOData::set_origin_bound_cert_service( 545 void ProfileIOData::set_origin_bound_cert_service(
543 net::OriginBoundCertService* origin_bound_cert_service) const { 546 net::OriginBoundCertService* origin_bound_cert_service) const {
544 origin_bound_cert_service_.reset(origin_bound_cert_service); 547 origin_bound_cert_service_.reset(origin_bound_cert_service);
545 } 548 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698