summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-06 00:37:52 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-06 00:37:52 +0000
commitbb05cae18dede8470d74aaa36c0b3ca1736a3159 (patch)
treebb5c3cbd24733b5c310fbb5fe73de7a55c8ab9e5 /chrome/browser/ui
parent5c187863e3b264fb954d37fe24e41cf5b4c29c5b (diff)
downloadchromium_src-bb05cae18dede8470d74aaa36c0b3ca1736a3159.zip
chromium_src-bb05cae18dede8470d74aaa36c0b3ca1736a3159.tar.gz
chromium_src-bb05cae18dede8470d74aaa36c0b3ca1736a3159.tar.bz2
Cleanup: Constify some ProfileKeyedBaseFactory methods and all overrides. Remove ProfileKeyedBaseFactory::ForceRegisterPrefsForTest()
Review URL: https://chromiumcodereview.appspot.com/10908088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155073 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/find_bar/find_bar_state_factory.cc2
-rw-r--r--chrome/browser/ui/find_bar/find_bar_state_factory.h2
-rw-r--r--chrome/browser/ui/gesture_prefs_observer_factory_aura.cc6
-rw-r--r--chrome/browser/ui/gesture_prefs_observer_factory_aura.h6
-rw-r--r--chrome/browser/ui/global_error/global_error_service_factory.cc2
-rw-r--r--chrome/browser/ui/global_error/global_error_service_factory.h2
-rw-r--r--chrome/browser/ui/tabs/pinned_tab_service_factory.cc4
-rw-r--r--chrome/browser/ui/tabs/pinned_tab_service_factory.h4
-rw-r--r--chrome/browser/ui/webui/chrome_url_data_manager_factory.cc4
-rw-r--r--chrome/browser/ui/webui/chrome_url_data_manager_factory.h2
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h2
12 files changed, 19 insertions, 19 deletions
diff --git a/chrome/browser/ui/find_bar/find_bar_state_factory.cc b/chrome/browser/ui/find_bar/find_bar_state_factory.cc
index 2486705..68a6e62 100644
--- a/chrome/browser/ui/find_bar/find_bar_state_factory.cc
+++ b/chrome/browser/ui/find_bar/find_bar_state_factory.cc
@@ -45,6 +45,6 @@ ProfileKeyedService* FindBarStateFactory::BuildServiceInstanceFor(
return new FindBarState;
}
-bool FindBarStateFactory::ServiceHasOwnInstanceInIncognito() {
+bool FindBarStateFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
diff --git a/chrome/browser/ui/find_bar/find_bar_state_factory.h b/chrome/browser/ui/find_bar/find_bar_state_factory.h
index a4510b6..c3a2274 100644
--- a/chrome/browser/ui/find_bar/find_bar_state_factory.h
+++ b/chrome/browser/ui/find_bar/find_bar_state_factory.h
@@ -33,7 +33,7 @@ class FindBarStateFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(FindBarStateFactory);
};
diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
index ca4d099..6bfc0df 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
@@ -253,17 +253,17 @@ void GesturePrefsObserverFactoryAura::RegisterUserPrefs(PrefService* prefs) {
PrefService::UNSYNCABLE_PREF);
}
-bool GesturePrefsObserverFactoryAura::ServiceIsCreatedWithProfile() {
+bool GesturePrefsObserverFactoryAura::ServiceIsCreatedWithProfile() const {
// Create the observer as soon as the profile is created.
return true;
}
-bool GesturePrefsObserverFactoryAura::ServiceRedirectedInIncognito() {
+bool GesturePrefsObserverFactoryAura::ServiceRedirectedInIncognito() const {
// Use same gesture preferences on incognito windows.
return true;
}
-bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() {
+bool GesturePrefsObserverFactoryAura::ServiceIsNULLWhileTesting() const {
// Some tests replace the PrefService of the TestingProfile after the
// GesturePrefsObserver has been created, which makes Shutdown()
// remove the registrar from a non-existent PrefService.
diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.h b/chrome/browser/ui/gesture_prefs_observer_factory_aura.h
index 587cc79..c13ede1 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.h
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.h
@@ -27,9 +27,9 @@ class GesturePrefsObserverFactoryAura : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* prefs) OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(GesturePrefsObserverFactoryAura);
};
diff --git a/chrome/browser/ui/global_error/global_error_service_factory.cc b/chrome/browser/ui/global_error/global_error_service_factory.cc
index e225475..88694a4 100644
--- a/chrome/browser/ui/global_error/global_error_service_factory.cc
+++ b/chrome/browser/ui/global_error/global_error_service_factory.cc
@@ -31,6 +31,6 @@ ProfileKeyedService* GlobalErrorServiceFactory::BuildServiceInstanceFor(
return new GlobalErrorService(profile);
}
-bool GlobalErrorServiceFactory::ServiceRedirectedInIncognito() {
+bool GlobalErrorServiceFactory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/ui/global_error/global_error_service_factory.h b/chrome/browser/ui/global_error/global_error_service_factory.h
index e506319..85f7a3d 100644
--- a/chrome/browser/ui/global_error/global_error_service_factory.h
+++ b/chrome/browser/ui/global_error/global_error_service_factory.h
@@ -30,7 +30,7 @@ class GlobalErrorServiceFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(GlobalErrorServiceFactory);
};
diff --git a/chrome/browser/ui/tabs/pinned_tab_service_factory.cc b/chrome/browser/ui/tabs/pinned_tab_service_factory.cc
index 4e9fcf5..40a7eeb 100644
--- a/chrome/browser/ui/tabs/pinned_tab_service_factory.cc
+++ b/chrome/browser/ui/tabs/pinned_tab_service_factory.cc
@@ -32,10 +32,10 @@ ProfileKeyedService* PinnedTabServiceFactory::BuildServiceInstanceFor(
return new PinnedTabService(profile);
}
-bool PinnedTabServiceFactory::ServiceIsCreatedWithProfile() {
+bool PinnedTabServiceFactory::ServiceIsCreatedWithProfile() const {
return true;
}
-bool PinnedTabServiceFactory::ServiceIsNULLWhileTesting() {
+bool PinnedTabServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/ui/tabs/pinned_tab_service_factory.h b/chrome/browser/ui/tabs/pinned_tab_service_factory.h
index a6d15cb..4f9d672 100644
--- a/chrome/browser/ui/tabs/pinned_tab_service_factory.h
+++ b/chrome/browser/ui/tabs/pinned_tab_service_factory.h
@@ -31,8 +31,8 @@ class PinnedTabServiceFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
#endif // CHROME_BROWSER_UI_TABS_PINNED_TAB_SERVICE_FACTORY_H_
diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_factory.cc b/chrome/browser/ui/webui/chrome_url_data_manager_factory.cc
index 75951a6..f6fd783 100644
--- a/chrome/browser/ui/webui/chrome_url_data_manager_factory.cc
+++ b/chrome/browser/ui/webui/chrome_url_data_manager_factory.cc
@@ -22,7 +22,7 @@ ChromeURLDataManagerFactory* ChromeURLDataManagerFactory::GetInstance() {
ChromeURLDataManagerFactory::ChromeURLDataManagerFactory()
: ProfileKeyedServiceFactory("ChromeURLDataManager",
- ProfileDependencyManager::GetInstance()){
+ ProfileDependencyManager::GetInstance()) {
}
ChromeURLDataManagerFactory::~ChromeURLDataManagerFactory() {
@@ -34,6 +34,6 @@ ProfileKeyedService* ChromeURLDataManagerFactory::BuildServiceInstanceFor(
profile->GetChromeURLDataManagerBackendGetter());
}
-bool ChromeURLDataManagerFactory::ServiceHasOwnInstanceInIncognito() {
+bool ChromeURLDataManagerFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
diff --git a/chrome/browser/ui/webui/chrome_url_data_manager_factory.h b/chrome/browser/ui/webui/chrome_url_data_manager_factory.h
index 41259ac..879e196 100644
--- a/chrome/browser/ui/webui/chrome_url_data_manager_factory.h
+++ b/chrome/browser/ui/webui/chrome_url_data_manager_factory.h
@@ -30,7 +30,7 @@ class ChromeURLDataManagerFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(ChromeURLDataManagerFactory);
};
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc
index 99e08dd..f203884 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.cc
@@ -35,6 +35,6 @@ ProfileKeyedService* NTPResourceCacheFactory::BuildServiceInstanceFor(
return new NTPResourceCache(profile);
}
-bool NTPResourceCacheFactory::ServiceRedirectedInIncognito() {
+bool NTPResourceCacheFactory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h b/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h
index ca8c826..13f382e 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache_factory.h
@@ -28,7 +28,7 @@ class NTPResourceCacheFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
};
#endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_RESOURCE_CACHE_FACTORY_H_