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

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

Issue 7747018: Introduced the URLBlacklistManager, and wired it to various places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewed, rebased Created 9 years, 3 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_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "chrome/browser/history/top_sites.h" 44 #include "chrome/browser/history/top_sites.h"
45 #include "chrome/browser/instant/instant_controller.h" 45 #include "chrome/browser/instant/instant_controller.h"
46 #include "chrome/browser/metrics/metrics_service.h" 46 #include "chrome/browser/metrics/metrics_service.h"
47 #include "chrome/browser/net/chrome_url_request_context.h" 47 #include "chrome/browser/net/chrome_url_request_context.h"
48 #include "chrome/browser/net/gaia/token_service.h" 48 #include "chrome/browser/net/gaia/token_service.h"
49 #include "chrome/browser/net/net_pref_observer.h" 49 #include "chrome/browser/net/net_pref_observer.h"
50 #include "chrome/browser/net/pref_proxy_config_service.h" 50 #include "chrome/browser/net/pref_proxy_config_service.h"
51 #include "chrome/browser/net/ssl_config_service_manager.h" 51 #include "chrome/browser/net/ssl_config_service_manager.h"
52 #include "chrome/browser/password_manager/password_store_default.h" 52 #include "chrome/browser/password_manager/password_store_default.h"
53 #include "chrome/browser/policy/configuration_policy_pref_store.h" 53 #include "chrome/browser/policy/configuration_policy_pref_store.h"
54 #include "chrome/browser/policy/host_blacklist_manager.h"
54 #include "chrome/browser/prefs/browser_prefs.h" 55 #include "chrome/browser/prefs/browser_prefs.h"
55 #include "chrome/browser/prefs/pref_value_store.h" 56 #include "chrome/browser/prefs/pref_value_store.h"
56 #include "chrome/browser/prefs/scoped_user_pref_update.h" 57 #include "chrome/browser/prefs/scoped_user_pref_update.h"
57 #include "chrome/browser/prerender/prerender_manager.h" 58 #include "chrome/browser/prerender/prerender_manager.h"
58 #include "chrome/browser/profiles/profile_dependency_manager.h" 59 #include "chrome/browser/profiles/profile_dependency_manager.h"
59 #include "chrome/browser/profiles/profile_manager.h" 60 #include "chrome/browser/profiles/profile_manager.h"
60 #include "chrome/browser/search_engines/template_url_fetcher.h" 61 #include "chrome/browser/search_engines/template_url_fetcher.h"
61 #include "chrome/browser/search_engines/template_url_service.h" 62 #include "chrome/browser/search_engines/template_url_service.h"
62 #include "chrome/browser/sessions/session_service_factory.h" 63 #include "chrome/browser/sessions/session_service_factory.h"
63 #include "chrome/browser/speech/chrome_speech_input_manager.h" 64 #include "chrome/browser/speech/chrome_speech_input_manager.h"
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 735
735 if (pref_proxy_config_tracker_) 736 if (pref_proxy_config_tracker_)
736 pref_proxy_config_tracker_->DetachFromPrefService(); 737 pref_proxy_config_tracker_->DetachFromPrefService();
737 738
738 if (protocol_handler_registry_) 739 if (protocol_handler_registry_)
739 protocol_handler_registry_->Finalize(); 740 protocol_handler_registry_->Finalize();
740 741
741 if (host_content_settings_map_) 742 if (host_content_settings_map_)
742 host_content_settings_map_->ShutdownOnUIThread(); 743 host_content_settings_map_->ShutdownOnUIThread();
743 744
745 if (host_blacklist_manager_)
746 host_blacklist_manager_->ShutdownOnUIThread();
747
744 // This causes the Preferences file to be written to disk. 748 // This causes the Preferences file to be written to disk.
745 MarkAsCleanShutdown(); 749 MarkAsCleanShutdown();
746 } 750 }
747 751
748 std::string ProfileImpl::GetProfileName() { 752 std::string ProfileImpl::GetProfileName() {
749 return GetPrefs()->GetString(prefs::kGoogleServicesUsername); 753 return GetPrefs()->GetString(prefs::kGoogleServicesUsername);
750 } 754 }
751 755
752 FilePath ProfileImpl::GetPath() { 756 FilePath ProfileImpl::GetPath() {
753 return path_; 757 return path_;
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 return extension_info_map_.get(); 1579 return extension_info_map_.get();
1576 } 1580 }
1577 1581
1578 ChromeURLDataManager* ProfileImpl::GetChromeURLDataManager() { 1582 ChromeURLDataManager* ProfileImpl::GetChromeURLDataManager() {
1579 if (!chrome_url_data_manager_.get()) 1583 if (!chrome_url_data_manager_.get())
1580 chrome_url_data_manager_.reset(new ChromeURLDataManager( 1584 chrome_url_data_manager_.reset(new ChromeURLDataManager(
1581 io_data_.GetChromeURLDataManagerBackendGetter())); 1585 io_data_.GetChromeURLDataManagerBackendGetter()));
1582 return chrome_url_data_manager_.get(); 1586 return chrome_url_data_manager_.get();
1583 } 1587 }
1584 1588
1589 policy::HostBlacklistManager* ProfileImpl::GetHostBlacklistManager() {
1590 #if defined(ENABLE_CONFIGURATION_POLICY)
1591 if (!host_blacklist_manager_.get()) {
1592 host_blacklist_manager_ = new policy::HostBlacklistManager(this);
1593 host_blacklist_manager_->Initialize();
1594 }
1595 #endif
1596 return host_blacklist_manager_.get();
1597 }
1598
1585 PromoCounter* ProfileImpl::GetInstantPromoCounter() { 1599 PromoCounter* ProfileImpl::GetInstantPromoCounter() {
1586 #if defined(OS_WIN) 1600 #if defined(OS_WIN)
1587 // TODO: enable this when we're ready to turn on the promo. 1601 // TODO: enable this when we're ready to turn on the promo.
1588 /* 1602 /*
1589 if (!checked_instant_promo_) { 1603 if (!checked_instant_promo_) {
1590 checked_instant_promo_ = true; 1604 checked_instant_promo_ = true;
1591 PrefService* prefs = GetPrefs(); 1605 PrefService* prefs = GetPrefs();
1592 if (!prefs->GetBoolean(prefs::kInstantEnabledOnce) && 1606 if (!prefs->GetBoolean(prefs::kInstantEnabledOnce) &&
1593 !InstantController::IsEnabled(this) && 1607 !InstantController::IsEnabled(this) &&
1594 InstallUtil::IsChromeSxSProcess()) { 1608 InstallUtil::IsChromeSxSProcess()) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 #endif 1737 #endif
1724 } 1738 }
1725 return prerender_manager_.get(); 1739 return prerender_manager_.get();
1726 } 1740 }
1727 1741
1728 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() { 1742 SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() {
1729 if (!spellcheck_profile_.get()) 1743 if (!spellcheck_profile_.get())
1730 spellcheck_profile_.reset(new SpellCheckProfile()); 1744 spellcheck_profile_.reset(new SpellCheckProfile());
1731 return spellcheck_profile_.get(); 1745 return spellcheck_profile_.get();
1732 } 1746 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698