summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/autocomplete/autocomplete_classifier_factory.cc4
-rw-r--r--chrome/browser/autocomplete/autocomplete_classifier_factory.h4
-rw-r--r--chrome/browser/background/background_contents_service_factory.cc7
-rw-r--r--chrome/browser/background/background_contents_service_factory.h6
-rw-r--r--chrome/browser/bookmarks/bookmark_model_factory.cc4
-rw-r--r--chrome/browser/bookmarks/bookmark_model_factory.h4
-rw-r--r--chrome/browser/captive_portal/captive_portal_service_factory.cc2
-rw-r--r--chrome/browser/captive_portal/captive_portal_service_factory.h2
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_event_router.cc4
-rw-r--r--chrome/browser/chromeos/extensions/file_browser_event_router.h2
-rw-r--r--chrome/browser/chromeos/gview_request_interceptor_unittest.cc8
-rw-r--r--chrome/browser/content_settings/cookie_settings.cc2
-rw-r--r--chrome/browser/content_settings/cookie_settings.h2
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_factory.cc6
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_factory.h6
-rw-r--r--chrome/browser/download/download_service_factory.cc2
-rw-r--r--chrome/browser/download/download_service_factory.h2
-rw-r--r--chrome/browser/extensions/api/commands/command_service_factory.cc4
-rw-r--r--chrome/browser/extensions/api/commands/command_service_factory.h4
-rw-r--r--chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc4
-rw-r--r--chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h4
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc65
-rw-r--r--chrome/browser/extensions/extension_service_unittest.h11
-rw-r--r--chrome/browser/extensions/extension_system_factory.cc6
-rw-r--r--chrome/browser/extensions/extension_system_factory.h6
-rw-r--r--chrome/browser/extensions/shell_window_registry.cc4
-rw-r--r--chrome/browser/extensions/shell_window_registry.h4
-rw-r--r--chrome/browser/favicon/favicon_service_factory.cc2
-rw-r--r--chrome/browser/favicon/favicon_service_factory.h2
-rw-r--r--chrome/browser/google/google_url_tracker_factory.cc6
-rw-r--r--chrome/browser/google/google_url_tracker_factory.h6
-rw-r--r--chrome/browser/history/history_service_factory.cc4
-rw-r--r--chrome/browser/history/history_service_factory.h4
-rw-r--r--chrome/browser/history/shortcuts_backend_factory.cc2
-rw-r--r--chrome/browser/history/shortcuts_backend_factory.h2
-rw-r--r--chrome/browser/intents/cws_intents_registry_factory.cc2
-rw-r--r--chrome/browser/intents/cws_intents_registry_factory.h2
-rw-r--r--chrome/browser/intents/web_intents_registry_factory.cc2
-rw-r--r--chrome/browser/intents/web_intents_registry_factory.h2
-rw-r--r--chrome/browser/media_gallery/media_galleries_preferences_factory.cc2
-rw-r--r--chrome/browser/media_gallery/media_galleries_preferences_factory.h2
-rw-r--r--chrome/browser/notifications/desktop_notification_service_factory.cc3
-rw-r--r--chrome/browser/notifications/desktop_notification_service_factory.h2
-rw-r--r--chrome/browser/password_manager/password_store_factory.cc4
-rw-r--r--chrome/browser/password_manager/password_store_factory.h4
-rw-r--r--chrome/browser/plugin_prefs.h4
-rw-r--r--chrome/browser/plugin_prefs_factory.cc6
-rw-r--r--chrome/browser/plugin_prefs_factory.h6
-rw-r--r--chrome/browser/policy/user_policy_signin_service_factory.cc2
-rw-r--r--chrome/browser/policy/user_policy_signin_service_factory.h2
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor_factory.cc3
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor_factory.h2
-rw-r--r--chrome/browser/prerender/prerender_link_manager_factory.cc2
-rw-r--r--chrome/browser/prerender/prerender_link_manager_factory.h3
-rw-r--r--chrome/browser/prerender/prerender_manager_factory.cc2
-rw-r--r--chrome/browser/prerender/prerender_manager_factory.h2
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc2
-rw-r--r--chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h2
-rw-r--r--chrome/browser/profiles/profile_keyed_base_factory.cc14
-rw-r--r--chrome/browser/profiles/profile_keyed_base_factory.h19
-rw-r--r--chrome/browser/protector/protector_service_factory.cc4
-rw-r--r--chrome/browser/protector/protector_service_factory.h4
-rw-r--r--chrome/browser/search_engines/template_url_fetcher_factory.cc2
-rw-r--r--chrome/browser/search_engines/template_url_fetcher_factory.h2
-rw-r--r--chrome/browser/search_engines/template_url_service_factory.cc4
-rw-r--r--chrome/browser/search_engines/template_url_service_factory.h4
-rw-r--r--chrome/browser/sessions/session_service_factory.cc4
-rw-r--r--chrome/browser/sessions/session_service_factory.h4
-rw-r--r--chrome/browser/sessions/tab_restore_service_factory.cc2
-rw-r--r--chrome/browser/sessions/tab_restore_service_factory.h2
-rw-r--r--chrome/browser/speech/chrome_speech_recognition_preferences.cc11
-rw-r--r--chrome/browser/speech/chrome_speech_recognition_preferences.h8
-rw-r--r--chrome/browser/speech/speech_input_extension_manager.cc6
-rw-r--r--chrome/browser/spellchecker/spellcheck_factory.cc4
-rw-r--r--chrome/browser/spellchecker/spellcheck_factory.h4
-rw-r--r--chrome/browser/sync/credential_cache_service_factory_win.cc2
-rw-r--r--chrome/browser/sync/credential_cache_service_factory_win.h2
-rw-r--r--chrome/browser/themes/theme_service_factory.cc2
-rw-r--r--chrome/browser/themes/theme_service_factory.h2
-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
-rw-r--r--chrome/browser/user_style_sheet_watcher_factory.cc4
-rw-r--r--chrome/browser/user_style_sheet_watcher_factory.h4
-rw-r--r--chrome/browser/webdata/web_data_service_factory.cc4
-rw-r--r--chrome/browser/webdata/web_data_service_factory.h4
95 files changed, 204 insertions, 226 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_classifier_factory.cc b/chrome/browser/autocomplete/autocomplete_classifier_factory.cc
index f757df2..de95e11 100644
--- a/chrome/browser/autocomplete/autocomplete_classifier_factory.cc
+++ b/chrome/browser/autocomplete/autocomplete_classifier_factory.cc
@@ -42,11 +42,11 @@ AutocompleteClassifierFactory::AutocompleteClassifierFactory()
AutocompleteClassifierFactory::~AutocompleteClassifierFactory() {
}
-bool AutocompleteClassifierFactory::ServiceRedirectedInIncognito() {
+bool AutocompleteClassifierFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() {
+bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/autocomplete/autocomplete_classifier_factory.h b/chrome/browser/autocomplete/autocomplete_classifier_factory.h
index 70cd19c..09c0c03 100644
--- a/chrome/browser/autocomplete/autocomplete_classifier_factory.h
+++ b/chrome/browser/autocomplete/autocomplete_classifier_factory.h
@@ -30,8 +30,8 @@ class AutocompleteClassifierFactory : public ProfileKeyedServiceFactory {
virtual ~AutocompleteClassifierFactory();
// ProfileKeyedServiceFactory:
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
diff --git a/chrome/browser/background/background_contents_service_factory.cc b/chrome/browser/background/background_contents_service_factory.cc
index 9157af6..c451e1c 100644
--- a/chrome/browser/background/background_contents_service_factory.cc
+++ b/chrome/browser/background/background_contents_service_factory.cc
@@ -44,14 +44,15 @@ void BackgroundContentsServiceFactory::RegisterUserPrefs(
PrefService::UNSYNCABLE_PREF);
}
-bool BackgroundContentsServiceFactory::ServiceHasOwnInstanceInIncognito() {
+bool
+BackgroundContentsServiceFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
-bool BackgroundContentsServiceFactory::ServiceIsCreatedWithProfile() {
+bool BackgroundContentsServiceFactory::ServiceIsCreatedWithProfile() const {
return true;
}
-bool BackgroundContentsServiceFactory::ServiceIsNULLWhileTesting() {
+bool BackgroundContentsServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/background/background_contents_service_factory.h b/chrome/browser/background/background_contents_service_factory.h
index 3a03c36..b6577cb 100644
--- a/chrome/browser/background/background_contents_service_factory.h
+++ b/chrome/browser/background/background_contents_service_factory.h
@@ -32,9 +32,9 @@ class BackgroundContentsServiceFactory : public ProfileKeyedServiceFactory {
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
// Use a separate background contents service for incognito.
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
#endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_FACTORY_H_
diff --git a/chrome/browser/bookmarks/bookmark_model_factory.cc b/chrome/browser/bookmarks/bookmark_model_factory.cc
index 658c615..4a2f039 100644
--- a/chrome/browser/bookmarks/bookmark_model_factory.cc
+++ b/chrome/browser/bookmarks/bookmark_model_factory.cc
@@ -50,10 +50,10 @@ void BookmarkModelFactory::RegisterUserPrefs(PrefService* prefs) {
PrefService::UNSYNCABLE_PREF);
}
-bool BookmarkModelFactory::ServiceRedirectedInIncognito() {
+bool BookmarkModelFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool BookmarkModelFactory::ServiceIsNULLWhileTesting() {
+bool BookmarkModelFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/bookmarks/bookmark_model_factory.h b/chrome/browser/bookmarks/bookmark_model_factory.h
index a0e5cd8..72ed21e 100644
--- a/chrome/browser/bookmarks/bookmark_model_factory.h
+++ b/chrome/browser/bookmarks/bookmark_model_factory.h
@@ -34,8 +34,8 @@ class BookmarkModelFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(BookmarkModelFactory);
};
diff --git a/chrome/browser/captive_portal/captive_portal_service_factory.cc b/chrome/browser/captive_portal/captive_portal_service_factory.cc
index aad2672..26f49b2 100644
--- a/chrome/browser/captive_portal/captive_portal_service_factory.cc
+++ b/chrome/browser/captive_portal/captive_portal_service_factory.cc
@@ -35,7 +35,7 @@ ProfileKeyedService* CaptivePortalServiceFactory::BuildServiceInstanceFor(
return new CaptivePortalService(profile);
}
-bool CaptivePortalServiceFactory::ServiceHasOwnInstanceInIncognito() {
+bool CaptivePortalServiceFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
diff --git a/chrome/browser/captive_portal/captive_portal_service_factory.h b/chrome/browser/captive_portal/captive_portal_service_factory.h
index cdb4e70..0cbcfd8 100644
--- a/chrome/browser/captive_portal/captive_portal_service_factory.h
+++ b/chrome/browser/captive_portal/captive_portal_service_factory.h
@@ -38,7 +38,7 @@ class CaptivePortalServiceFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(CaptivePortalServiceFactory);
};
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
index 7f99c21..ecf4a867 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -392,7 +392,7 @@ void FileBrowserEventRouter::Observe(
// make it available.
if (*pref_name == prefs::kExternalStorageDisabled &&
profile_->GetPrefs()->GetBoolean(prefs::kExternalStorageDisabled)) {
- DiskMountManager *manager = DiskMountManager::GetInstance();
+ DiskMountManager* manager = DiskMountManager::GetInstance();
DiskMountManager::MountPointMap mounts(manager->mount_points());
for (DiskMountManager::MountPointMap::const_iterator it = mounts.begin();
it != mounts.end(); ++it) {
@@ -861,7 +861,7 @@ FileBrowserEventRouterFactory::BuildServiceInstanceFor(Profile* profile) const {
new FileBrowserEventRouter(profile));
}
-bool FileBrowserEventRouterFactory::ServiceHasOwnInstanceInIncognito() {
+bool FileBrowserEventRouterFactory::ServiceHasOwnInstanceInIncognito() const {
// Explicitly and always allow this router in guest login mode. see
// chrome/browser/profiles/profile_keyed_base_factory.h comment
// for the details.
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.h b/chrome/browser/chromeos/extensions/file_browser_event_router.h
index 2d3b310..c923641 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.h
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.h
@@ -227,7 +227,7 @@ class FileBrowserEventRouterFactory
protected:
// ProfileKeyedBasedFactory overrides:
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
private:
friend struct DefaultSingletonTraits<FileBrowserEventRouterFactory>;
diff --git a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
index d137f57..7f7299b 100644
--- a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
+++ b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/plugin_prefs_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/testing_pref_service.h"
+#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/test/mock_resource_context.h"
@@ -107,9 +108,8 @@ class GViewRequestInterceptorTest : public testing::Test {
job_factory_.SetProtocolHandler("http", new GViewRequestProtocolFactory);
job_factory_.AddInterceptor(new GViewRequestInterceptor);
request_context->set_job_factory(&job_factory_);
- PluginPrefsFactory::GetInstance()->ForceRegisterPrefsForTest(&prefs_);
- plugin_prefs_ = new PluginPrefs();
- plugin_prefs_->SetPrefs(&prefs_);
+ plugin_prefs_ = PluginPrefs::GetForTestingProfile(&profile_);
+ PluginPrefsFactory::GetInstance()->RegisterUserPrefsOnProfile(&profile_);
ChromePluginServiceFilter* filter =
ChromePluginServiceFilter::GetInstance();
filter->RegisterResourceContext(plugin_prefs_, &resource_context_);
@@ -179,7 +179,7 @@ class GViewRequestInterceptorTest : public testing::Test {
content::TestBrowserThread file_thread_;
content::TestBrowserThread io_thread_;
webkit::npapi::MockPluginList plugin_list_;
- TestingPrefService prefs_;
+ TestingProfile profile_;
scoped_refptr<PluginPrefs> plugin_prefs_;
net::URLRequestJobFactoryImpl job_factory_;
const net::URLRequestJobFactory* old_factory_;
diff --git a/chrome/browser/content_settings/cookie_settings.cc b/chrome/browser/content_settings/cookie_settings.cc
index fb2eb4f..72cfd17 100644
--- a/chrome/browser/content_settings/cookie_settings.cc
+++ b/chrome/browser/content_settings/cookie_settings.cc
@@ -70,7 +70,7 @@ void CookieSettings::Factory::RegisterUserPrefs(PrefService* user_prefs) {
PrefService::SYNCABLE_PREF);
}
-bool CookieSettings::Factory::ServiceRedirectedInIncognito() {
+bool CookieSettings::Factory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/content_settings/cookie_settings.h b/chrome/browser/content_settings/cookie_settings.h
index 64ac603..97a2454 100644
--- a/chrome/browser/content_settings/cookie_settings.h
+++ b/chrome/browser/content_settings/cookie_settings.h
@@ -127,7 +127,7 @@ class CookieSettings
// |ProfileKeyedBaseFactory| methods:
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
virtual scoped_refptr<RefcountedProfileKeyedService>
BuildServiceInstanceFor(Profile* profile) const OVERRIDE;
};
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_factory.cc b/chrome/browser/custom_handlers/protocol_handler_registry_factory.cc
index 8da041b..eaebd5e 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_factory.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_factory.cc
@@ -33,19 +33,19 @@ ProtocolHandlerRegistryFactory::~ProtocolHandlerRegistryFactory() {
// Will be created when initializing profile_io_data, so we might
// as well have the framework create this along with other
// PKSs to preserve orderly civic conduct :)
-bool ProtocolHandlerRegistryFactory::ServiceIsCreatedWithProfile() {
+bool ProtocolHandlerRegistryFactory::ServiceIsCreatedWithProfile() const {
return true;
}
// Allows the produced registry to be used in incognito mode.
-bool ProtocolHandlerRegistryFactory::ServiceRedirectedInIncognito() {
+bool ProtocolHandlerRegistryFactory::ServiceRedirectedInIncognito() const {
return true;
}
// Do not create this service for tests. MANY tests will fail
// due to the threading requirements of this service. ALSO,
// not creating this increases test isolation (which is GOOD!)
-bool ProtocolHandlerRegistryFactory::ServiceIsNULLWhileTesting() {
+bool ProtocolHandlerRegistryFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_factory.h b/chrome/browser/custom_handlers/protocol_handler_registry_factory.h
index 343303f..c708217 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_factory.h
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_factory.h
@@ -27,9 +27,9 @@ class ProtocolHandlerRegistryFactory : public ProfileKeyedServiceFactory {
protected:
// ProfileKeyedServiceFactory implementation.
- 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;
private:
friend struct DefaultSingletonTraits<ProtocolHandlerRegistryFactory>;
diff --git a/chrome/browser/download/download_service_factory.cc b/chrome/browser/download/download_service_factory.cc
index 3150dee..192db82 100644
--- a/chrome/browser/download/download_service_factory.cc
+++ b/chrome/browser/download/download_service_factory.cc
@@ -39,6 +39,6 @@ ProfileKeyedService* DownloadServiceFactory::BuildServiceInstanceFor(
return service;
}
-bool DownloadServiceFactory::ServiceHasOwnInstanceInIncognito() {
+bool DownloadServiceFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
diff --git a/chrome/browser/download/download_service_factory.h b/chrome/browser/download/download_service_factory.h
index 6b0b638..6a7713d 100644
--- a/chrome/browser/download/download_service_factory.h
+++ b/chrome/browser/download/download_service_factory.h
@@ -26,7 +26,7 @@ class DownloadServiceFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
private:
friend struct DefaultSingletonTraits<DownloadServiceFactory>;
diff --git a/chrome/browser/extensions/api/commands/command_service_factory.cc b/chrome/browser/extensions/api/commands/command_service_factory.cc
index 91651d9..8f267b2 100644
--- a/chrome/browser/extensions/api/commands/command_service_factory.cc
+++ b/chrome/browser/extensions/api/commands/command_service_factory.cc
@@ -22,7 +22,7 @@ CommandServiceFactory* CommandServiceFactory::GetInstance() {
return Singleton<CommandServiceFactory>::get();
}
-bool CommandServiceFactory::ServiceIsCreatedWithProfile() {
+bool CommandServiceFactory::ServiceIsCreatedWithProfile() const {
return true;
}
@@ -40,7 +40,7 @@ ProfileKeyedService* CommandServiceFactory::BuildServiceInstanceFor(
return new CommandService(profile);
}
-bool CommandServiceFactory::ServiceRedirectedInIncognito() {
+bool CommandServiceFactory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/extensions/api/commands/command_service_factory.h b/chrome/browser/extensions/api/commands/command_service_factory.h
index 7b84aac..48f3ae87 100644
--- a/chrome/browser/extensions/api/commands/command_service_factory.h
+++ b/chrome/browser/extensions/api/commands/command_service_factory.h
@@ -22,7 +22,7 @@ class CommandServiceFactory : public ProfileKeyedServiceFactory {
static CommandServiceFactory* GetInstance();
// Overridden from ProfileKeyedBaseFactory:
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
private:
friend struct DefaultSingletonTraits<CommandServiceFactory>;
@@ -33,7 +33,7 @@ class CommandServiceFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(CommandServiceFactory);
};
diff --git a/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc b/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc
index d21c36c..6939271 100644
--- a/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc
+++ b/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.cc
@@ -22,7 +22,7 @@ SuggestedLinksRegistryFactory* SuggestedLinksRegistryFactory::GetInstance() {
return Singleton<SuggestedLinksRegistryFactory>::get();
}
-bool SuggestedLinksRegistryFactory::ServiceIsCreatedWithProfile() {
+bool SuggestedLinksRegistryFactory::ServiceIsCreatedWithProfile() const {
return true;
}
@@ -40,7 +40,7 @@ ProfileKeyedService* SuggestedLinksRegistryFactory::BuildServiceInstanceFor(
return new SuggestedLinksRegistry();
}
-bool SuggestedLinksRegistryFactory::ServiceRedirectedInIncognito() {
+bool SuggestedLinksRegistryFactory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h b/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h
index 6697d8b..c7c6686 100644
--- a/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h
+++ b/chrome/browser/extensions/api/discovery/suggested_links_registry_factory.h
@@ -20,7 +20,7 @@ class SuggestedLinksRegistryFactory : public ProfileKeyedServiceFactory {
static SuggestedLinksRegistryFactory* GetInstance();
// Overridden from ProfileKeyedBaseFactory:
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
private:
friend struct DefaultSingletonTraits<SuggestedLinksRegistryFactory>;
@@ -31,7 +31,7 @@ class SuggestedLinksRegistryFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(SuggestedLinksRegistryFactory);
};
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index c09d231..c8224b9 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -49,11 +49,9 @@
#include "chrome/browser/extensions/test_management_policy.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
-#include "chrome/browser/plugin_prefs_factory.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/pref_service_mock_builder.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
-#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
@@ -245,7 +243,6 @@ class MockExtensionProvider : public extensions::ExternalProviderInterface {
class MockProviderVisitor
: public extensions::ExternalProviderInterface::VisitorInterface {
public:
-
// The provider will return |fake_base_path| from
// GetBaseCrxFilePath(). User can test the behavior with
// and without an empty path using this parameter.
@@ -410,25 +407,22 @@ ExtensionServiceTestBase::~ExtensionServiceTestBase() {
}
void ExtensionServiceTestBase::InitializeExtensionService(
- const FilePath& pref_file, const FilePath& extensions_install_dir,
+ const FilePath& profile_path,
+ const FilePath& pref_file,
+ const FilePath& extensions_install_dir,
bool autoupdate_enabled) {
- TestingProfile* profile = new TestingProfile();
+ TestingProfile::Builder profile_builder;
// Create a PrefService that only contains user defined preference values.
- PrefService* prefs =
- PrefServiceMockBuilder().WithUserFilePrefs(pref_file).Create();
- Profile::RegisterUserPrefs(prefs);
- chrome::RegisterUserPrefs(prefs);
- profile->SetPrefService(prefs);
-
-#if defined(ENABLE_THEMES)
- ThemeServiceFactory::GetInstance()->ForceRegisterPrefsForTest(prefs);
-#endif
- PluginPrefsFactory::GetInstance()->ForceRegisterPrefsForTest(prefs);
-
- profile_.reset(profile);
+ scoped_ptr<PrefService> prefs(
+ PrefServiceMockBuilder().WithUserFilePrefs(pref_file).Create());
+ Profile::RegisterUserPrefs(prefs.get());
+ chrome::RegisterUserPrefs(prefs.get());
+ profile_builder.SetPrefService(prefs.Pass());
+ profile_builder.SetPath(profile_path);
+ profile_ = profile_builder.Build();
service_ = static_cast<extensions::TestExtensionSystem*>(
- ExtensionSystem::Get(profile))->CreateExtensionService(
+ ExtensionSystem::Get(profile_.get()))->CreateExtensionService(
CommandLine::ForCurrentProcess(),
extensions_install_dir,
autoupdate_enabled);
@@ -436,7 +430,7 @@ void ExtensionServiceTestBase::InitializeExtensionService(
service_->set_show_extensions_prompts(false);
management_policy_ = static_cast<extensions::TestExtensionSystem*>(
- ExtensionSystem::Get(profile))->CreateManagementPolicy();
+ ExtensionSystem::Get(profile_.get()))->CreateManagementPolicy();
// When we start up, we want to make sure there is no external provider,
// since the ExtensionService on Windows will use the Registry as a default
@@ -451,18 +445,18 @@ void ExtensionServiceTestBase::InitializeExtensionService(
void ExtensionServiceTestBase::InitializeInstalledExtensionService(
const FilePath& prefs_file, const FilePath& source_install_dir) {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- FilePath path_ = temp_dir_.path();
- path_ = path_.Append(FILE_PATH_LITERAL("TestingExtensionsPath"));
- file_util::Delete(path_, true);
- file_util::CreateDirectory(path_);
- FilePath temp_prefs = path_.Append(FILE_PATH_LITERAL("Preferences"));
+ FilePath path = temp_dir_.path();
+ path = path.Append(FILE_PATH_LITERAL("TestingExtensionsPath"));
+ file_util::Delete(path, true);
+ file_util::CreateDirectory(path);
+ FilePath temp_prefs = path.Append(FILE_PATH_LITERAL("Preferences"));
file_util::CopyFile(prefs_file, temp_prefs);
- extensions_install_dir_ = path_.Append(FILE_PATH_LITERAL("Extensions"));
+ extensions_install_dir_ = path.Append(FILE_PATH_LITERAL("Extensions"));
file_util::Delete(extensions_install_dir_, true);
file_util::CopyDirectory(source_install_dir, extensions_install_dir_, true);
- InitializeExtensionService(temp_prefs, extensions_install_dir_, false);
+ InitializeExtensionService(path, temp_prefs, extensions_install_dir_, false);
}
void ExtensionServiceTestBase::InitializeEmptyExtensionService() {
@@ -483,17 +477,16 @@ void ExtensionServiceTestBase::InitializeExtensionServiceWithUpdater() {
void ExtensionServiceTestBase::InitializeExtensionServiceHelper(
bool autoupdate_enabled) {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- FilePath path_ = temp_dir_.path();
- path_ = path_.Append(FILE_PATH_LITERAL("TestingExtensionsPath"));
- file_util::Delete(path_, true);
- file_util::CreateDirectory(path_);
- FilePath prefs_filename = path_
- .Append(FILE_PATH_LITERAL("TestPreferences"));
- extensions_install_dir_ = path_.Append(FILE_PATH_LITERAL("Extensions"));
+ FilePath path = temp_dir_.path();
+ path = path.Append(FILE_PATH_LITERAL("TestingExtensionsPath"));
+ file_util::Delete(path, true);
+ file_util::CreateDirectory(path);
+ FilePath prefs_filename = path.Append(FILE_PATH_LITERAL("TestPreferences"));
+ extensions_install_dir_ = path.Append(FILE_PATH_LITERAL("Extensions"));
file_util::Delete(extensions_install_dir_, true);
file_util::CreateDirectory(extensions_install_dir_);
- InitializeExtensionService(prefs_filename, extensions_install_dir_,
+ InitializeExtensionService(path, prefs_filename, extensions_install_dir_,
autoupdate_enabled);
}
@@ -1037,7 +1030,6 @@ void PackExtensionTestClient::OnPackFailure(const std::string& error_message,
FAIL() << "Packing should not fail.";
else
FAIL() << "Existing CRX should have been overwritten.";
-
}
// Test loading good extensions from the profile directory.
@@ -4625,8 +4617,7 @@ TEST_F(ExtensionServiceTest, GetSyncAppDataUserSettingsOnExtensionMoved) {
ASSERT_EQ(list.size(), 3U);
extensions::AppSyncData data[kAppCount];
- for (size_t i = 0; i < kAppCount; ++i)
- {
+ for (size_t i = 0; i < kAppCount; ++i) {
data[i] = extensions::AppSyncData(list[i]);
}
diff --git a/chrome/browser/extensions/extension_service_unittest.h b/chrome/browser/extensions/extension_service_unittest.h
index 7658718..a240bf3 100644
--- a/chrome/browser/extensions/extension_service_unittest.h
+++ b/chrome/browser/extensions/extension_service_unittest.h
@@ -22,12 +22,13 @@ class ExtensionServiceTestBase : public testing::Test {
ExtensionServiceTestBase();
virtual ~ExtensionServiceTestBase();
- void InitializeExtensionService(
- const FilePath& pref_file, const FilePath& extensions_install_dir,
- bool autoupdate_enabled);
+ void InitializeExtensionService(const FilePath& profile_path,
+ const FilePath& pref_file,
+ const FilePath& extensions_install_dir,
+ bool autoupdate_enabled);
- void InitializeInstalledExtensionService(
- const FilePath& prefs_file, const FilePath& source_install_dir);
+ void InitializeInstalledExtensionService(const FilePath& prefs_file,
+ const FilePath& source_install_dir);
void InitializeEmptyExtensionService();
diff --git a/chrome/browser/extensions/extension_system_factory.cc b/chrome/browser/extensions/extension_system_factory.cc
index 0955cb5..437509a 100644
--- a/chrome/browser/extensions/extension_system_factory.cc
+++ b/chrome/browser/extensions/extension_system_factory.cc
@@ -51,7 +51,7 @@ ProfileKeyedService* ExtensionSystemSharedFactory::BuildServiceInstanceFor(
return new ExtensionSystemImpl::Shared(profile);
}
-bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() {
+bool ExtensionSystemSharedFactory::ServiceRedirectedInIncognito() const {
return true;
}
@@ -83,11 +83,11 @@ ProfileKeyedService* ExtensionSystemFactory::BuildServiceInstanceFor(
return new ExtensionSystemImpl(profile);
}
-bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() {
+bool ExtensionSystemFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
-bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() {
+bool ExtensionSystemFactory::ServiceIsCreatedWithProfile() const {
return true;
}
diff --git a/chrome/browser/extensions/extension_system_factory.h b/chrome/browser/extensions/extension_system_factory.h
index 2471a25..f2f4617 100644
--- a/chrome/browser/extensions/extension_system_factory.h
+++ b/chrome/browser/extensions/extension_system_factory.h
@@ -32,7 +32,7 @@ class ExtensionSystemSharedFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
};
// ProfileKeyedServiceFactory for ExtensionSystem.
@@ -51,8 +51,8 @@ class ExtensionSystemFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
};
} // namespace extensions
diff --git a/chrome/browser/extensions/shell_window_registry.cc b/chrome/browser/extensions/shell_window_registry.cc
index ce597ba..a5b72dc 100644
--- a/chrome/browser/extensions/shell_window_registry.cc
+++ b/chrome/browser/extensions/shell_window_registry.cc
@@ -112,11 +112,11 @@ ProfileKeyedService* ShellWindowRegistry::Factory::BuildServiceInstanceFor(
return new ShellWindowRegistry();
}
-bool ShellWindowRegistry::Factory::ServiceIsCreatedWithProfile() {
+bool ShellWindowRegistry::Factory::ServiceIsCreatedWithProfile() const {
return true;
}
-bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() {
+bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const {
return false;
}
diff --git a/chrome/browser/extensions/shell_window_registry.h b/chrome/browser/extensions/shell_window_registry.h
index c479f9a..696c6dc 100644
--- a/chrome/browser/extensions/shell_window_registry.h
+++ b/chrome/browser/extensions/shell_window_registry.h
@@ -87,8 +87,8 @@ class ShellWindowRegistry : public ProfileKeyedService {
// 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;
};
ShellWindowSet shell_windows_;
diff --git a/chrome/browser/favicon/favicon_service_factory.cc b/chrome/browser/favicon/favicon_service_factory.cc
index 47398f4..5eecc61 100644
--- a/chrome/browser/favicon/favicon_service_factory.cc
+++ b/chrome/browser/favicon/favicon_service_factory.cc
@@ -50,6 +50,6 @@ ProfileKeyedService* FaviconServiceFactory::BuildServiceInstanceFor(
return new FaviconService(history_service);
}
-bool FaviconServiceFactory::ServiceIsNULLWhileTesting() {
+bool FaviconServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/favicon/favicon_service_factory.h b/chrome/browser/favicon/favicon_service_factory.h
index e9fbe9c..052f8e2 100644
--- a/chrome/browser/favicon/favicon_service_factory.h
+++ b/chrome/browser/favicon/favicon_service_factory.h
@@ -34,7 +34,7 @@ class FaviconServiceFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(FaviconServiceFactory);
};
diff --git a/chrome/browser/google/google_url_tracker_factory.cc b/chrome/browser/google/google_url_tracker_factory.cc
index 55adaf2..1908961 100644
--- a/chrome/browser/google/google_url_tracker_factory.cc
+++ b/chrome/browser/google/google_url_tracker_factory.cc
@@ -41,14 +41,14 @@ void GoogleURLTrackerFactory::RegisterUserPrefs(PrefService* user_prefs) {
PrefService::UNSYNCABLE_PREF);
}
-bool GoogleURLTrackerFactory::ServiceRedirectedInIncognito() {
+bool GoogleURLTrackerFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool GoogleURLTrackerFactory::ServiceIsCreatedWithProfile() {
+bool GoogleURLTrackerFactory::ServiceIsCreatedWithProfile() const {
return true;
}
-bool GoogleURLTrackerFactory::ServiceIsNULLWhileTesting() {
+bool GoogleURLTrackerFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/google/google_url_tracker_factory.h b/chrome/browser/google/google_url_tracker_factory.h
index a294593..4dfe261 100644
--- a/chrome/browser/google/google_url_tracker_factory.h
+++ b/chrome/browser/google/google_url_tracker_factory.h
@@ -31,9 +31,9 @@ class GoogleURLTrackerFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerFactory);
};
diff --git a/chrome/browser/history/history_service_factory.cc b/chrome/browser/history/history_service_factory.cc
index 3e272b6..2947e25 100644
--- a/chrome/browser/history/history_service_factory.cc
+++ b/chrome/browser/history/history_service_factory.cc
@@ -74,10 +74,10 @@ HistoryServiceFactory::BuildServiceInstanceFor(Profile* profile) const {
return history_service;
}
-bool HistoryServiceFactory::ServiceRedirectedInIncognito() {
+bool HistoryServiceFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool HistoryServiceFactory::ServiceIsNULLWhileTesting() {
+bool HistoryServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/history/history_service_factory.h b/chrome/browser/history/history_service_factory.h
index e0d07a8..540b938 100644
--- a/chrome/browser/history/history_service_factory.h
+++ b/chrome/browser/history/history_service_factory.h
@@ -42,8 +42,8 @@ class HistoryServiceFactory
// ProfileKeyedServiceFactory:
virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
#endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_FACTORY_H_
diff --git a/chrome/browser/history/shortcuts_backend_factory.cc b/chrome/browser/history/shortcuts_backend_factory.cc
index 4eaa568..da37fc7 100644
--- a/chrome/browser/history/shortcuts_backend_factory.cc
+++ b/chrome/browser/history/shortcuts_backend_factory.cc
@@ -66,6 +66,6 @@ ShortcutsBackendFactory::BuildServiceInstanceFor(Profile* profile) const {
return NULL;
}
-bool ShortcutsBackendFactory::ServiceIsNULLWhileTesting() {
+bool ShortcutsBackendFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/history/shortcuts_backend_factory.h b/chrome/browser/history/shortcuts_backend_factory.h
index a77c474..272b2d0 100644
--- a/chrome/browser/history/shortcuts_backend_factory.h
+++ b/chrome/browser/history/shortcuts_backend_factory.h
@@ -45,7 +45,7 @@ class ShortcutsBackendFactory : public RefcountedProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
#endif // CHROME_BROWSER_HISTORY_SHORTCUTS_BACKEND_FACTORY_H_
diff --git a/chrome/browser/intents/cws_intents_registry_factory.cc b/chrome/browser/intents/cws_intents_registry_factory.cc
index 6420627..1e9a907 100644
--- a/chrome/browser/intents/cws_intents_registry_factory.cc
+++ b/chrome/browser/intents/cws_intents_registry_factory.cc
@@ -34,7 +34,7 @@ ProfileKeyedService* CWSIntentsRegistryFactory::BuildServiceInstanceFor(
return registry;
}
-bool CWSIntentsRegistryFactory::ServiceRedirectedInIncognito() {
+bool CWSIntentsRegistryFactory::ServiceRedirectedInIncognito() const {
// TODO(groby): Do we have CWS access in incognito?
return false;
}
diff --git a/chrome/browser/intents/cws_intents_registry_factory.h b/chrome/browser/intents/cws_intents_registry_factory.h
index 0c27439..5007c0f 100644
--- a/chrome/browser/intents/cws_intents_registry_factory.h
+++ b/chrome/browser/intents/cws_intents_registry_factory.h
@@ -34,7 +34,7 @@ class CWSIntentsRegistryFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory implementation.
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(CWSIntentsRegistryFactory);
};
diff --git a/chrome/browser/intents/web_intents_registry_factory.cc b/chrome/browser/intents/web_intents_registry_factory.cc
index 5a020c4..376f3d6 100644
--- a/chrome/browser/intents/web_intents_registry_factory.cc
+++ b/chrome/browser/intents/web_intents_registry_factory.cc
@@ -41,6 +41,6 @@ ProfileKeyedService* WebIntentsRegistryFactory::BuildServiceInstanceFor(
return registry;
}
-bool WebIntentsRegistryFactory::ServiceRedirectedInIncognito() {
+bool WebIntentsRegistryFactory::ServiceRedirectedInIncognito() const {
return false;
}
diff --git a/chrome/browser/intents/web_intents_registry_factory.h b/chrome/browser/intents/web_intents_registry_factory.h
index e40495b..d130d31 100644
--- a/chrome/browser/intents/web_intents_registry_factory.h
+++ b/chrome/browser/intents/web_intents_registry_factory.h
@@ -34,7 +34,7 @@ class WebIntentsRegistryFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory implementation.
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(WebIntentsRegistryFactory);
};
diff --git a/chrome/browser/media_gallery/media_galleries_preferences_factory.cc b/chrome/browser/media_gallery/media_galleries_preferences_factory.cc
index 70e8659..37c8ea3 100644
--- a/chrome/browser/media_gallery/media_galleries_preferences_factory.cc
+++ b/chrome/browser/media_gallery/media_galleries_preferences_factory.cc
@@ -35,6 +35,6 @@ void MediaGalleriesPreferencesFactory::RegisterUserPrefs(PrefService* prefs) {
chrome::MediaGalleriesPreferences::RegisterUserPrefs(prefs);
}
-bool MediaGalleriesPreferencesFactory::ServiceRedirectedInIncognito() {
+bool MediaGalleriesPreferencesFactory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/media_gallery/media_galleries_preferences_factory.h b/chrome/browser/media_gallery/media_galleries_preferences_factory.h
index 35948be..1740680 100644
--- a/chrome/browser/media_gallery/media_galleries_preferences_factory.h
+++ b/chrome/browser/media_gallery/media_galleries_preferences_factory.h
@@ -33,7 +33,7 @@ class MediaGalleriesPreferencesFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferencesFactory);
};
diff --git a/chrome/browser/notifications/desktop_notification_service_factory.cc b/chrome/browser/notifications/desktop_notification_service_factory.cc
index f3d0b3b..c7696b8 100644
--- a/chrome/browser/notifications/desktop_notification_service_factory.cc
+++ b/chrome/browser/notifications/desktop_notification_service_factory.cc
@@ -41,6 +41,7 @@ ProfileKeyedService* DesktopNotificationServiceFactory::BuildServiceInstanceFor(
return service;
}
-bool DesktopNotificationServiceFactory::ServiceHasOwnInstanceInIncognito() {
+bool
+DesktopNotificationServiceFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
diff --git a/chrome/browser/notifications/desktop_notification_service_factory.h b/chrome/browser/notifications/desktop_notification_service_factory.h
index 10211b2..590c004 100644
--- a/chrome/browser/notifications/desktop_notification_service_factory.h
+++ b/chrome/browser/notifications/desktop_notification_service_factory.h
@@ -33,7 +33,7 @@ class DesktopNotificationServiceFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
// Use a separate desktop notification service for incognito.
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
};
#endif // CHROME_BROWSER_NOTIFICATIONS_DESKTOP_NOTIFICATION_SERVICE_FACTORY_H_
diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc
index a46d809..70922f0 100644
--- a/chrome/browser/password_manager/password_store_factory.cc
+++ b/chrome/browser/password_manager/password_store_factory.cc
@@ -205,10 +205,10 @@ void PasswordStoreFactory::RegisterUserPrefs(PrefService* prefs) {
#endif
}
-bool PasswordStoreFactory::ServiceRedirectedInIncognito() {
+bool PasswordStoreFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool PasswordStoreFactory::ServiceIsNULLWhileTesting() {
+bool PasswordStoreFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/password_manager/password_store_factory.h b/chrome/browser/password_manager/password_store_factory.h
index 14b0d37..cd85063 100644
--- a/chrome/browser/password_manager/password_store_factory.h
+++ b/chrome/browser/password_manager/password_store_factory.h
@@ -45,8 +45,8 @@ class PasswordStoreFactory : public RefcountedProfileKeyedServiceFactory {
virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(PasswordStoreFactory);
};
diff --git a/chrome/browser/plugin_prefs.h b/chrome/browser/plugin_prefs.h
index 8a681df..0fd90b01 100644
--- a/chrome/browser/plugin_prefs.h
+++ b/chrome/browser/plugin_prefs.h
@@ -90,10 +90,6 @@ class PluginPrefs : public RefcountedProfileKeyedService,
// Returns whether the plugin is enabled or not.
bool IsPluginEnabled(const webkit::WebPluginInfo& plugin) const;
- // Registers the preferences used by this class.
- // This method should only be called on the UI thread.
- static void RegisterPrefs(PrefService* prefs);
-
void set_profile(Profile* profile) { profile_ = profile; }
// RefCountedProfileKeyedBase method override.
diff --git a/chrome/browser/plugin_prefs_factory.cc b/chrome/browser/plugin_prefs_factory.cc
index b43be37..e1ef974 100644
--- a/chrome/browser/plugin_prefs_factory.cc
+++ b/chrome/browser/plugin_prefs_factory.cc
@@ -69,14 +69,14 @@ void PluginPrefsFactory::RegisterUserPrefs(PrefService* prefs) {
PrefService::UNSYNCABLE_PREF);
}
-bool PluginPrefsFactory::ServiceRedirectedInIncognito() {
+bool PluginPrefsFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool PluginPrefsFactory::ServiceIsNULLWhileTesting() {
+bool PluginPrefsFactory::ServiceIsNULLWhileTesting() const {
return true;
}
-bool PluginPrefsFactory::ServiceIsCreatedWithProfile() {
+bool PluginPrefsFactory::ServiceIsCreatedWithProfile() const {
return true;
}
diff --git a/chrome/browser/plugin_prefs_factory.h b/chrome/browser/plugin_prefs_factory.h
index 1c54903..e735c4c 100644
--- a/chrome/browser/plugin_prefs_factory.h
+++ b/chrome/browser/plugin_prefs_factory.h
@@ -37,9 +37,9 @@ class PluginPrefsFactory : public RefcountedProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory methods:
virtual void RegisterUserPrefs(PrefService* prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
};
#endif // CHROME_BROWSER_PLUGIN_PREFS_FACTORY_H_
diff --git a/chrome/browser/policy/user_policy_signin_service_factory.cc b/chrome/browser/policy/user_policy_signin_service_factory.cc
index 34cb028..6ffeb82 100644
--- a/chrome/browser/policy/user_policy_signin_service_factory.cc
+++ b/chrome/browser/policy/user_policy_signin_service_factory.cc
@@ -41,7 +41,7 @@ ProfileKeyedService* UserPolicySigninServiceFactory::BuildServiceInstanceFor(
profile->GetUserCloudPolicyManager());
}
-bool UserPolicySigninServiceFactory::ServiceIsCreatedWithProfile() {
+bool UserPolicySigninServiceFactory::ServiceIsCreatedWithProfile() const {
// Create this object when the profile is created so it can track any
// user signin activity.
return true;
diff --git a/chrome/browser/policy/user_policy_signin_service_factory.h b/chrome/browser/policy/user_policy_signin_service_factory.h
index 5b60b32..544ddcc 100644
--- a/chrome/browser/policy/user_policy_signin_service_factory.h
+++ b/chrome/browser/policy/user_policy_signin_service_factory.h
@@ -29,7 +29,7 @@ class UserPolicySigninServiceFactory : public ProfileKeyedServiceFactory {
Profile* profile) const OVERRIDE;
// Overridden to cause this object to be created when the profile is created.
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
// Register the preferences related to cloud-based user policy.
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_factory.cc b/chrome/browser/predictors/autocomplete_action_predictor_factory.cc
index 750ad52..39b1b80 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_factory.cc
+++ b/chrome/browser/predictors/autocomplete_action_predictor_factory.cc
@@ -34,7 +34,8 @@ AutocompleteActionPredictorFactory::AutocompleteActionPredictorFactory()
AutocompleteActionPredictorFactory::~AutocompleteActionPredictorFactory() {}
-bool AutocompleteActionPredictorFactory::ServiceHasOwnInstanceInIncognito() {
+bool
+AutocompleteActionPredictorFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_factory.h b/chrome/browser/predictors/autocomplete_action_predictor_factory.h
index 68424fa..0702547 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_factory.h
+++ b/chrome/browser/predictors/autocomplete_action_predictor_factory.h
@@ -29,7 +29,7 @@ class AutocompleteActionPredictorFactory : public ProfileKeyedServiceFactory {
virtual ~AutocompleteActionPredictorFactory();
// ProfileKeyedServiceFactory:
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
diff --git a/chrome/browser/prerender/prerender_link_manager_factory.cc b/chrome/browser/prerender/prerender_link_manager_factory.cc
index 830cacf..b3eb0be 100644
--- a/chrome/browser/prerender/prerender_link_manager_factory.cc
+++ b/chrome/browser/prerender/prerender_link_manager_factory.cc
@@ -41,7 +41,7 @@ ProfileKeyedService* PrerenderLinkManagerFactory::BuildServiceInstanceFor(
return prerender_link_manager;
}
-bool PrerenderLinkManagerFactory::ServiceHasOwnInstanceInIncognito() {
+bool PrerenderLinkManagerFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
diff --git a/chrome/browser/prerender/prerender_link_manager_factory.h b/chrome/browser/prerender/prerender_link_manager_factory.h
index b0af952..bb9c025 100644
--- a/chrome/browser/prerender/prerender_link_manager_factory.h
+++ b/chrome/browser/prerender/prerender_link_manager_factory.h
@@ -28,10 +28,9 @@ class PrerenderLinkManagerFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
};
} // namespace prerender
#endif // CHROME_BROWSER_PRERENDER_PRERENDER_LINK_MANAGER_FACTORY_H_
-
diff --git a/chrome/browser/prerender/prerender_manager_factory.cc b/chrome/browser/prerender/prerender_manager_factory.cc
index dab3ee1..08e1c62 100644
--- a/chrome/browser/prerender/prerender_manager_factory.cc
+++ b/chrome/browser/prerender/prerender_manager_factory.cc
@@ -55,7 +55,7 @@ ProfileKeyedService* PrerenderManagerFactory::BuildServiceInstanceFor(
return prerender_manager;
}
-bool PrerenderManagerFactory::ServiceHasOwnInstanceInIncognito() {
+bool PrerenderManagerFactory::ServiceHasOwnInstanceInIncognito() const {
return true;
}
diff --git a/chrome/browser/prerender/prerender_manager_factory.h b/chrome/browser/prerender/prerender_manager_factory.h
index 5040808..16308b3 100644
--- a/chrome/browser/prerender/prerender_manager_factory.h
+++ b/chrome/browser/prerender/prerender_manager_factory.h
@@ -36,7 +36,7 @@ class PrerenderManagerFactory : public ProfileKeyedServiceFactory {
Profile* profile) const OVERRIDE;
// Prerendering is allowed in incognito.
- virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE;
+ virtual bool ServiceHasOwnInstanceInIncognito() const OVERRIDE;
};
} // namespace prerender
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc
index 5934c59..44161c3 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.cc
@@ -34,6 +34,6 @@ ProfileKeyedService* CloudPrintProxyServiceFactory::BuildServiceInstanceFor(
return service;
}
-bool CloudPrintProxyServiceFactory::ServiceIsNULLWhileTesting() {
+bool CloudPrintProxyServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h
index c211018..b829c4f 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h
+++ b/chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.h
@@ -32,7 +32,7 @@ class CloudPrintProxyServiceFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
#endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_PROXY_SERVICE_FACTORY_H_
diff --git a/chrome/browser/profiles/profile_keyed_base_factory.cc b/chrome/browser/profiles/profile_keyed_base_factory.cc
index 04423f0..1a38c08 100644
--- a/chrome/browser/profiles/profile_keyed_base_factory.cc
+++ b/chrome/browser/profiles/profile_keyed_base_factory.cc
@@ -81,23 +81,19 @@ void ProfileKeyedBaseFactory::RegisterUserPrefsOnProfile(Profile* profile) {
}
}
-void ProfileKeyedBaseFactory::ForceRegisterPrefsForTest(PrefService* prefs) {
- RegisterUserPrefs(prefs);
-}
-
-bool ProfileKeyedBaseFactory::ServiceRedirectedInIncognito() {
+bool ProfileKeyedBaseFactory::ServiceRedirectedInIncognito() const {
return false;
}
-bool ProfileKeyedBaseFactory::ServiceHasOwnInstanceInIncognito() {
+bool ProfileKeyedBaseFactory::ServiceHasOwnInstanceInIncognito() const {
return false;
}
-bool ProfileKeyedBaseFactory::ServiceIsCreatedWithProfile() {
+bool ProfileKeyedBaseFactory::ServiceIsCreatedWithProfile() const {
return false;
}
-bool ProfileKeyedBaseFactory::ServiceIsNULLWhileTesting() {
+bool ProfileKeyedBaseFactory::ServiceIsNULLWhileTesting() const {
return false;
}
@@ -109,7 +105,7 @@ void ProfileKeyedBaseFactory::ProfileDestroyed(Profile* profile) {
registered_preferences_.erase(profile);
}
-bool ProfileKeyedBaseFactory::ArePreferencesSetOn(Profile* profile) {
+bool ProfileKeyedBaseFactory::ArePreferencesSetOn(Profile* profile) const {
return registered_preferences_.find(profile) !=
registered_preferences_.end();
}
diff --git a/chrome/browser/profiles/profile_keyed_base_factory.h b/chrome/browser/profiles/profile_keyed_base_factory.h
index fd8ef87..16e3f23 100644
--- a/chrome/browser/profiles/profile_keyed_base_factory.h
+++ b/chrome/browser/profiles/profile_keyed_base_factory.h
@@ -5,7 +5,6 @@
#ifndef CHROME_BROWSER_PROFILES_PROFILE_KEYED_BASE_FACTORY_H_
#define CHROME_BROWSER_PROFILES_PROFILE_KEYED_BASE_FACTORY_H_
-#include <map>
#include <set>
#include "base/threading/non_thread_safe.h"
@@ -29,13 +28,6 @@ class ProfileKeyedBaseFactory : public base::NonThreadSafe {
// attached to a single |profile|.
void RegisterUserPrefsOnProfile(Profile* profile);
- // Some unit tests don't run with a Profile, or switch out PrefServices and
- // require reregistration. They should do neither of those things, but there
- // are too many of them to go fix.
- //
- // DO NOT USE THIS IN REAL CODE.
- void ForceRegisterPrefsForTest(PrefService* prefs);
-
#ifndef NDEBUG
// Returns our name. We don't keep track of this in release mode.
const char* name() const { return service_name_; }
@@ -64,20 +56,20 @@ class ProfileKeyedBaseFactory : public base::NonThreadSafe {
// pass back NULL. To redirect to the Incognito's original profile or to
// create another instance, even for Incognito windows, override one of the
// following methods:
- virtual bool ServiceRedirectedInIncognito();
- virtual bool ServiceHasOwnInstanceInIncognito();
+ virtual bool ServiceRedirectedInIncognito() const;
+ virtual bool ServiceHasOwnInstanceInIncognito() const;
// By default, we create instances of a service lazily and wait until
// GetForProfile() is called on our subclass. Some services need to be
// created as soon as the Profile has been brought up.
- virtual bool ServiceIsCreatedWithProfile();
+ virtual bool ServiceIsCreatedWithProfile() const;
// By default, TestingProfiles will be treated like normal profiles. You can
// override this so that by default, the service associated with the
// TestingProfile is NULL. (This is just a shortcut around
// SetTestingFactory() to make sure our profiles don't directly refer to the
// services they use.)
- virtual bool ServiceIsNULLWhileTesting();
+ virtual bool ServiceIsNULLWhileTesting() const;
// Interface for people building a type of ProfileKeyedFactory: -------------
@@ -99,9 +91,8 @@ class ProfileKeyedBaseFactory : public base::NonThreadSafe {
virtual void ProfileShutdown(Profile* profile) = 0;
virtual void ProfileDestroyed(Profile* profile);
- protected:
// Returns whether we've registered the preferences on this profile.
- bool ArePreferencesSetOn(Profile* profile);
+ bool ArePreferencesSetOn(Profile* profile) const;
// Mark profile as Preferences set.
void MarkPreferencesSetOn(Profile* profile);
diff --git a/chrome/browser/protector/protector_service_factory.cc b/chrome/browser/protector/protector_service_factory.cc
index 3deeeff..4d854e3dc 100644
--- a/chrome/browser/protector/protector_service_factory.cc
+++ b/chrome/browser/protector/protector_service_factory.cc
@@ -43,13 +43,13 @@ void ProtectorServiceFactory::RegisterUserPrefs(PrefService* user_prefs) {
ProtectedPrefsWatcher::RegisterUserPrefs(user_prefs);
}
-bool ProtectorServiceFactory::ServiceIsCreatedWithProfile() {
+bool ProtectorServiceFactory::ServiceIsCreatedWithProfile() const {
// ProtectorService watches changes for protected prefs so it must be started
// right with the profile creation.
return true;
}
-bool ProtectorServiceFactory::ServiceRedirectedInIncognito() {
+bool ProtectorServiceFactory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/protector/protector_service_factory.h b/chrome/browser/protector/protector_service_factory.h
index 9adccd1..1f2c7e2 100644
--- a/chrome/browser/protector/protector_service_factory.h
+++ b/chrome/browser/protector/protector_service_factory.h
@@ -31,8 +31,8 @@ class ProtectorServiceFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(ProtectorServiceFactory);
};
diff --git a/chrome/browser/search_engines/template_url_fetcher_factory.cc b/chrome/browser/search_engines/template_url_fetcher_factory.cc
index 66c4639..80113bd 100644
--- a/chrome/browser/search_engines/template_url_fetcher_factory.cc
+++ b/chrome/browser/search_engines/template_url_fetcher_factory.cc
@@ -41,6 +41,6 @@ ProfileKeyedService* TemplateURLFetcherFactory::BuildServiceInstanceFor(
return new TemplateURLFetcher(profile);
}
-bool TemplateURLFetcherFactory::ServiceRedirectedInIncognito() {
+bool TemplateURLFetcherFactory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/search_engines/template_url_fetcher_factory.h b/chrome/browser/search_engines/template_url_fetcher_factory.h
index 0b22329..b98e298 100644
--- a/chrome/browser/search_engines/template_url_fetcher_factory.h
+++ b/chrome/browser/search_engines/template_url_fetcher_factory.h
@@ -33,7 +33,7 @@ class TemplateURLFetcherFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(TemplateURLFetcherFactory);
};
diff --git a/chrome/browser/search_engines/template_url_service_factory.cc b/chrome/browser/search_engines/template_url_service_factory.cc
index 7d7d0b5..6d8b0cb 100644
--- a/chrome/browser/search_engines/template_url_service_factory.cc
+++ b/chrome/browser/search_engines/template_url_service_factory.cc
@@ -80,11 +80,11 @@ void TemplateURLServiceFactory::RegisterUserPrefs(PrefService* prefs) {
PrefService::UNSYNCABLE_PREF);
}
-bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() {
+bool TemplateURLServiceFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() {
+bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/search_engines/template_url_service_factory.h b/chrome/browser/search_engines/template_url_service_factory.h
index dfb249b..0541426 100644
--- a/chrome/browser/search_engines/template_url_service_factory.h
+++ b/chrome/browser/search_engines/template_url_service_factory.h
@@ -32,8 +32,8 @@ class TemplateURLServiceFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
virtual void ProfileShutdown(Profile* profile) OVERRIDE;
virtual void ProfileDestroyed(Profile* profile) OVERRIDE;
};
diff --git a/chrome/browser/sessions/session_service_factory.cc b/chrome/browser/sessions/session_service_factory.cc
index 0cde1a1..7c27170 100644
--- a/chrome/browser/sessions/session_service_factory.cc
+++ b/chrome/browser/sessions/session_service_factory.cc
@@ -65,10 +65,10 @@ ProfileKeyedService* SessionServiceFactory::BuildServiceInstanceFor(
return service;
}
-bool SessionServiceFactory::ServiceIsCreatedWithProfile() {
+bool SessionServiceFactory::ServiceIsCreatedWithProfile() const {
return true;
}
-bool SessionServiceFactory::ServiceIsNULLWhileTesting() {
+bool SessionServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/sessions/session_service_factory.h b/chrome/browser/sessions/session_service_factory.h
index 15d3860..3a4fde8 100644
--- a/chrome/browser/sessions/session_service_factory.h
+++ b/chrome/browser/sessions/session_service_factory.h
@@ -57,8 +57,8 @@ class SessionServiceFactory : 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_SESSIONS_SESSION_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sessions/tab_restore_service_factory.cc b/chrome/browser/sessions/tab_restore_service_factory.cc
index e0fea58..d227075 100644
--- a/chrome/browser/sessions/tab_restore_service_factory.cc
+++ b/chrome/browser/sessions/tab_restore_service_factory.cc
@@ -39,6 +39,6 @@ ProfileKeyedService* TabRestoreServiceFactory::BuildServiceInstanceFor(
return service;
}
-bool TabRestoreServiceFactory::ServiceIsNULLWhileTesting() {
+bool TabRestoreServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/sessions/tab_restore_service_factory.h b/chrome/browser/sessions/tab_restore_service_factory.h
index dec246c..0471fa5 100644
--- a/chrome/browser/sessions/tab_restore_service_factory.h
+++ b/chrome/browser/sessions/tab_restore_service_factory.h
@@ -31,7 +31,7 @@ class TabRestoreServiceFactory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
#endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_FACTORY_H_
diff --git a/chrome/browser/speech/chrome_speech_recognition_preferences.cc b/chrome/browser/speech/chrome_speech_recognition_preferences.cc
index af94c88..f5ef511 100644
--- a/chrome/browser/speech/chrome_speech_recognition_preferences.cc
+++ b/chrome/browser/speech/chrome_speech_recognition_preferences.cc
@@ -68,17 +68,18 @@ void ChromeSpeechRecognitionPreferences::Factory::RegisterUserPrefs(
PrefService::UNSYNCABLE_PREF);
}
-bool
-ChromeSpeechRecognitionPreferences::Factory::ServiceRedirectedInIncognito() {
+bool ChromeSpeechRecognitionPreferences::Factory::
+ServiceRedirectedInIncognito() const {
return false;
}
-bool ChromeSpeechRecognitionPreferences::Factory::ServiceIsNULLWhileTesting() {
+bool ChromeSpeechRecognitionPreferences::Factory::
+ServiceIsNULLWhileTesting() const {
return true;
}
-bool
-ChromeSpeechRecognitionPreferences::Factory::ServiceIsCreatedWithProfile() {
+bool ChromeSpeechRecognitionPreferences::Factory::
+ServiceIsCreatedWithProfile() const {
return false;
}
diff --git a/chrome/browser/speech/chrome_speech_recognition_preferences.h b/chrome/browser/speech/chrome_speech_recognition_preferences.h
index 581a5c2..d926542 100644
--- a/chrome/browser/speech/chrome_speech_recognition_preferences.h
+++ b/chrome/browser/speech/chrome_speech_recognition_preferences.h
@@ -19,7 +19,7 @@
class PrefService;
-namespace base{
+namespace base {
class ListValue;
}
@@ -79,9 +79,9 @@ class ChromeSpeechRecognitionPreferences
virtual ProfileKeyedService* BuildServiceInstanceFor(Profile* profile)
const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(Factory);
};
diff --git a/chrome/browser/speech/speech_input_extension_manager.cc b/chrome/browser/speech/speech_input_extension_manager.cc
index 8703c27..c088cde 100644
--- a/chrome/browser/speech/speech_input_extension_manager.cc
+++ b/chrome/browser/speech/speech_input_extension_manager.cc
@@ -97,9 +97,9 @@ class SpeechInputExtensionManager::Factory : public ProfileKeyedServiceFactory {
// ProfileKeyedServiceFactory methods:
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE { return false; }
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE { return true; }
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE { return true; }
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE { return false; }
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE { return true; }
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE { return true; }
DISALLOW_COPY_AND_ASSIGN(Factory);
};
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
index fed1460..e833223 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -78,10 +78,10 @@ void SpellCheckFactory::RegisterUserPrefs(PrefService* user_prefs) {
PrefService::UNSYNCABLE_PREF);
}
-bool SpellCheckFactory::ServiceRedirectedInIncognito() {
+bool SpellCheckFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool SpellCheckFactory::ServiceIsNULLWhileTesting() {
+bool SpellCheckFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/spellchecker/spellcheck_factory.h b/chrome/browser/spellchecker/spellcheck_factory.h
index 98ef677..a3b3bb5 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.h
+++ b/chrome/browser/spellchecker/spellcheck_factory.h
@@ -42,8 +42,8 @@ class SpellCheckFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* user_prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(SpellCheckFactory);
};
diff --git a/chrome/browser/sync/credential_cache_service_factory_win.cc b/chrome/browser/sync/credential_cache_service_factory_win.cc
index 35f8697..8e56978 100644
--- a/chrome/browser/sync/credential_cache_service_factory_win.cc
+++ b/chrome/browser/sync/credential_cache_service_factory_win.cc
@@ -67,7 +67,7 @@ bool CredentialCacheServiceFactory::IsDefaultAlternateProfileForTest(
ProfileManager::GetDefaultProfileDir(alternate_user_data_dir);
}
-bool CredentialCacheServiceFactory::ServiceIsCreatedWithProfile() {
+bool CredentialCacheServiceFactory::ServiceIsCreatedWithProfile() const {
return true;
}
diff --git a/chrome/browser/sync/credential_cache_service_factory_win.h b/chrome/browser/sync/credential_cache_service_factory_win.h
index f284af2..45918a2 100644
--- a/chrome/browser/sync/credential_cache_service_factory_win.h
+++ b/chrome/browser/sync/credential_cache_service_factory_win.h
@@ -36,7 +36,7 @@ class CredentialCacheServiceFactory : public ProfileKeyedServiceFactory {
virtual ~CredentialCacheServiceFactory();
// ProfileKeyedServiceFactory implementation.
- virtual bool ServiceIsCreatedWithProfile() OVERRIDE;
+ virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
// ProfileKeyedServiceFactory implementation.
virtual ProfileKeyedService* BuildServiceInstanceFor(
diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc
index b3eae37..10a3b73 100644
--- a/chrome/browser/themes/theme_service_factory.cc
+++ b/chrome/browser/themes/theme_service_factory.cc
@@ -78,6 +78,6 @@ void ThemeServiceFactory::RegisterUserPrefs(PrefService* prefs) {
PrefService::UNSYNCABLE_PREF);
}
-bool ThemeServiceFactory::ServiceRedirectedInIncognito() {
+bool ThemeServiceFactory::ServiceRedirectedInIncognito() const {
return true;
}
diff --git a/chrome/browser/themes/theme_service_factory.h b/chrome/browser/themes/theme_service_factory.h
index 2b688ec..be7b956 100644
--- a/chrome/browser/themes/theme_service_factory.h
+++ b/chrome/browser/themes/theme_service_factory.h
@@ -43,7 +43,7 @@ class ThemeServiceFactory : public ProfileKeyedServiceFactory {
virtual ProfileKeyedService* BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
virtual void RegisterUserPrefs(PrefService* prefs) OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(ThemeServiceFactory);
};
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_
diff --git a/chrome/browser/user_style_sheet_watcher_factory.cc b/chrome/browser/user_style_sheet_watcher_factory.cc
index e096bff..f0f6b92 100644
--- a/chrome/browser/user_style_sheet_watcher_factory.cc
+++ b/chrome/browser/user_style_sheet_watcher_factory.cc
@@ -37,10 +37,10 @@ UserStyleSheetWatcherFactory::BuildServiceInstanceFor(Profile* profile) const {
return user_style_sheet_watcher;
}
-bool UserStyleSheetWatcherFactory::ServiceRedirectedInIncognito() {
+bool UserStyleSheetWatcherFactory::ServiceRedirectedInIncognito() const {
return true;
}
-bool UserStyleSheetWatcherFactory::ServiceIsNULLWhileTesting() {
+bool UserStyleSheetWatcherFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/user_style_sheet_watcher_factory.h b/chrome/browser/user_style_sheet_watcher_factory.h
index 0a756c4..51484f7 100644
--- a/chrome/browser/user_style_sheet_watcher_factory.h
+++ b/chrome/browser/user_style_sheet_watcher_factory.h
@@ -29,8 +29,8 @@ class UserStyleSheetWatcherFactory
// ProfileKeyedServiceFactory:
virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(UserStyleSheetWatcherFactory);
};
diff --git a/chrome/browser/webdata/web_data_service_factory.cc b/chrome/browser/webdata/web_data_service_factory.cc
index 006a0fc..f86f28f 100644
--- a/chrome/browser/webdata/web_data_service_factory.cc
+++ b/chrome/browser/webdata/web_data_service_factory.cc
@@ -39,7 +39,7 @@ WebDataServiceFactory* WebDataServiceFactory::GetInstance() {
return Singleton<WebDataServiceFactory>::get();
}
-bool WebDataServiceFactory::ServiceRedirectedInIncognito() {
+bool WebDataServiceFactory::ServiceRedirectedInIncognito() const {
return true;
}
@@ -56,6 +56,6 @@ WebDataServiceFactory::BuildServiceInstanceFor(Profile* profile) const {
return wds.get();
}
-bool WebDataServiceFactory::ServiceIsNULLWhileTesting() {
+bool WebDataServiceFactory::ServiceIsNULLWhileTesting() const {
return true;
}
diff --git a/chrome/browser/webdata/web_data_service_factory.h b/chrome/browser/webdata/web_data_service_factory.h
index 9e360fb..c77d056e 100644
--- a/chrome/browser/webdata/web_data_service_factory.h
+++ b/chrome/browser/webdata/web_data_service_factory.h
@@ -34,10 +34,10 @@ class WebDataServiceFactory : public RefcountedProfileKeyedServiceFactory {
virtual ~WebDataServiceFactory();
// |ProfileKeyedBaseFactory| methods:
- virtual bool ServiceRedirectedInIncognito() OVERRIDE;
+ virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor(
Profile* profile) const OVERRIDE;
- virtual bool ServiceIsNULLWhileTesting() OVERRIDE;
+ virtual bool ServiceIsNULLWhileTesting() const OVERRIDE;
};
#endif // CHROME_BROWSER_WEBDATA_WEB_DATA_SERVICE_FACTORY_H__