OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/profile_resetter/automatic_profile_resetter_factory.h" | 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter_factory.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
9 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h" | 9 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 content::BrowserContext* context) const { | 49 content::BrowserContext* context) const { |
50 Profile* profile = Profile::FromBrowserContext(context); | 50 Profile* profile = Profile::FromBrowserContext(context); |
51 AutomaticProfileResetter* service = new AutomaticProfileResetter(profile); | 51 AutomaticProfileResetter* service = new AutomaticProfileResetter(profile); |
52 service->Initialize(); | 52 service->Initialize(); |
53 service->Activate(); | 53 service->Activate(); |
54 return service; | 54 return service; |
55 } | 55 } |
56 | 56 |
57 void AutomaticProfileResetterFactory::RegisterProfilePrefs( | 57 void AutomaticProfileResetterFactory::RegisterProfilePrefs( |
58 user_prefs::PrefRegistrySyncable* registry) { | 58 user_prefs::PrefRegistrySyncable* registry) { |
59 registry->RegisterStringPref( | 59 registry->RegisterStringPref(prefs::kProfileResetPromptMementoInProfilePrefs, |
60 prefs::kProfileResetPromptMementoInProfilePrefs, | 60 ""); |
61 "", | |
62 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
63 } | 61 } |
64 | 62 |
65 bool AutomaticProfileResetterFactory:: | 63 bool AutomaticProfileResetterFactory:: |
66 ServiceIsCreatedWithBrowserContext() const { | 64 ServiceIsCreatedWithBrowserContext() const { |
67 return true; | 65 return true; |
68 } | 66 } |
69 | 67 |
70 bool AutomaticProfileResetterFactory::ServiceIsNULLWhileTesting() const { | 68 bool AutomaticProfileResetterFactory::ServiceIsNULLWhileTesting() const { |
71 return true; | 69 return true; |
72 } | 70 } |
OLD | NEW |