| Index: chrome/browser/protector/protector_service_factory.cc
|
| diff --git a/chrome/browser/protector/protector_service_factory.cc b/chrome/browser/protector/protector_service_factory.cc
|
| index 504673ce323e3e425f7c3064712679daa713f920..ceb487b912f4be35e4610395384ca862c0e9087d 100644
|
| --- a/chrome/browser/protector/protector_service_factory.cc
|
| +++ b/chrome/browser/protector/protector_service_factory.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_dependency_manager.h"
|
| +#include "chrome/browser/protector/protected_prefs_watcher.h"
|
| #include "chrome/browser/protector/protector_service.h"
|
| #include "chrome/browser/search_engines/template_url_service_factory.h"
|
|
|
| @@ -25,8 +26,13 @@ ProtectorServiceFactory* ProtectorServiceFactory::GetInstance() {
|
| ProtectorServiceFactory::ProtectorServiceFactory()
|
| : ProfileKeyedServiceFactory("ProtectorService",
|
| ProfileDependencyManager::GetInstance()) {
|
| + // Dependencies for the correct service shutdown order.
|
| DependsOn(GlobalErrorServiceFactory::GetInstance());
|
| DependsOn(TemplateURLServiceFactory::GetInstance());
|
| + // BUG(ivankr): to be bullet-proof, ProtectorService must outlive the
|
| + // ExtensionService as well and be the second to last thing destroyed in
|
| + // ProfileImpl (the last being the PrefService itself). This cannot be
|
| + // accomplished with ProfileKeyedService implementation.
|
| }
|
|
|
| ProtectorServiceFactory::~ProtectorServiceFactory() {
|
| @@ -37,6 +43,16 @@ ProfileKeyedService* ProtectorServiceFactory::BuildServiceInstanceFor(
|
| return new ProtectorService(profile);
|
| }
|
|
|
| +void ProtectorServiceFactory::RegisterUserPrefs(PrefService* user_prefs) {
|
| + ProtectedPrefsWatcher::RegisterUserPrefs(user_prefs);
|
| +}
|
| +
|
| +bool ProtectorServiceFactory::ServiceIsCreatedWithProfile() {
|
| + // ProtectorService watches changes for protected prefs so it must be started
|
| + // right with the profile creation.
|
| + return true;
|
| +}
|
| +
|
| bool ProtectorServiceFactory::ServiceRedirectedInIncognito() {
|
| return true;
|
| }
|
|
|