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/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" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "chrome/browser/net/chrome_http_user_agent_settings.h" | 40 #include "chrome/browser/net/chrome_http_user_agent_settings.h" |
41 #include "chrome/browser/net/chrome_net_log.h" | 41 #include "chrome/browser/net/chrome_net_log.h" |
42 #include "chrome/browser/net/chrome_network_delegate.h" | 42 #include "chrome/browser/net/chrome_network_delegate.h" |
43 #include "chrome/browser/net/cookie_store_util.h" | 43 #include "chrome/browser/net/cookie_store_util.h" |
44 #include "chrome/browser/net/proxy_service_factory.h" | 44 #include "chrome/browser/net/proxy_service_factory.h" |
45 #include "chrome/browser/profiles/profile.h" | 45 #include "chrome/browser/profiles/profile.h" |
46 #include "chrome/browser/profiles/profile_manager.h" | 46 #include "chrome/browser/profiles/profile_manager.h" |
47 #include "chrome/browser/signin/signin_names_io_thread.h" | 47 #include "chrome/browser/signin/signin_names_io_thread.h" |
48 #include "chrome/common/chrome_paths.h" | 48 #include "chrome/common/chrome_paths.h" |
49 #include "chrome/common/chrome_switches.h" | 49 #include "chrome/common/chrome_switches.h" |
50 #include "chrome/common/net/url_fixer_upper.h" | |
51 #include "chrome/common/pref_names.h" | 50 #include "chrome/common/pref_names.h" |
52 #include "chrome/common/url_constants.h" | 51 #include "chrome/common/url_constants.h" |
53 #include "components/startup_metric_utils/startup_metric_utils.h" | 52 #include "components/startup_metric_utils/startup_metric_utils.h" |
54 #include "components/sync_driver/pref_names.h" | 53 #include "components/sync_driver/pref_names.h" |
| 54 #include "components/url_fixer/url_fixer.h" |
55 #include "content/public/browser/browser_thread.h" | 55 #include "content/public/browser/browser_thread.h" |
56 #include "content/public/browser/host_zoom_map.h" | 56 #include "content/public/browser/host_zoom_map.h" |
57 #include "content/public/browser/notification_service.h" | 57 #include "content/public/browser/notification_service.h" |
58 #include "content/public/browser/resource_context.h" | 58 #include "content/public/browser/resource_context.h" |
59 #include "extensions/browser/extension_protocols.h" | 59 #include "extensions/browser/extension_protocols.h" |
60 #include "extensions/browser/extension_system.h" | 60 #include "extensions/browser/extension_system.h" |
61 #include "extensions/browser/info_map.h" | 61 #include "extensions/browser/info_map.h" |
62 #include "extensions/common/constants.h" | 62 #include "extensions/common/constants.h" |
63 #include "net/base/keygen_handler.h" | 63 #include "net/base/keygen_handler.h" |
64 #include "net/cookies/canonical_cookie.h" | 64 #include "net/cookies/canonical_cookie.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile); | 434 cert_verifier_ = policy::PolicyCertServiceFactory::CreateForProfile(profile); |
435 #endif | 435 #endif |
436 // The URLBlacklistManager has to be created on the UI thread to register | 436 // The URLBlacklistManager has to be created on the UI thread to register |
437 // observers of |pref_service|, and it also has to clean up on | 437 // observers of |pref_service|, and it also has to clean up on |
438 // ShutdownOnUIThread to release these observers on the right thread. | 438 // ShutdownOnUIThread to release these observers on the right thread. |
439 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, | 439 // Don't pass it in |profile_params_| to make sure it is correctly cleaned up, |
440 // in particular when this ProfileIOData isn't |initialized_| during deletion. | 440 // in particular when this ProfileIOData isn't |initialized_| during deletion. |
441 #if defined(ENABLE_CONFIGURATION_POLICY) | 441 #if defined(ENABLE_CONFIGURATION_POLICY) |
442 policy::URLBlacklist::SegmentURLCallback callback = | 442 policy::URLBlacklist::SegmentURLCallback callback = |
443 static_cast<policy::URLBlacklist::SegmentURLCallback>( | 443 static_cast<policy::URLBlacklist::SegmentURLCallback>( |
444 URLFixerUpper::SegmentURL); | 444 url_fixer::SegmentURL); |
445 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); | 445 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); |
446 scoped_refptr<base::SequencedTaskRunner> background_task_runner = | 446 scoped_refptr<base::SequencedTaskRunner> background_task_runner = |
447 pool->GetSequencedTaskRunner(pool->GetSequenceToken()); | 447 pool->GetSequencedTaskRunner(pool->GetSequenceToken()); |
448 url_blacklist_manager_.reset( | 448 url_blacklist_manager_.reset( |
449 new policy::URLBlacklistManager( | 449 new policy::URLBlacklistManager( |
450 pref_service, | 450 pref_service, |
451 background_task_runner, | 451 background_task_runner, |
452 io_message_loop_proxy, | 452 io_message_loop_proxy, |
453 callback, | 453 callback, |
454 base::Bind(policy::OverrideBlacklistForURL))); | 454 base::Bind(policy::OverrideBlacklistForURL))); |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 void ProfileIOData::SetCookieSettingsForTesting( | 1188 void ProfileIOData::SetCookieSettingsForTesting( |
1189 CookieSettings* cookie_settings) { | 1189 CookieSettings* cookie_settings) { |
1190 DCHECK(!cookie_settings_.get()); | 1190 DCHECK(!cookie_settings_.get()); |
1191 cookie_settings_ = cookie_settings; | 1191 cookie_settings_ = cookie_settings; |
1192 } | 1192 } |
1193 | 1193 |
1194 void ProfileIOData::set_signin_names_for_testing( | 1194 void ProfileIOData::set_signin_names_for_testing( |
1195 SigninNamesOnIOThread* signin_names) { | 1195 SigninNamesOnIOThread* signin_names) { |
1196 signin_names_.reset(signin_names); | 1196 signin_names_.reset(signin_names); |
1197 } | 1197 } |
OLD | NEW |