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

Side by Side Diff: chrome/browser/profile_resetter/automatic_profile_resetter_factory.cc

Issue 50883003: Added the ability to specify AutomaticProfileResetter's evaluation program through field trials. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting nit. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 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/extensions/extension_system_factory.h" 9 #include "chrome/browser/extensions/extension_system_factory.h"
10 #include "chrome/browser/google/google_url_tracker_factory.h" 10 #include "chrome/browser/google/google_url_tracker_factory.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 DependsOn(TemplateURLServiceFactory::GetInstance()); 44 DependsOn(TemplateURLServiceFactory::GetInstance());
45 } 45 }
46 46
47 AutomaticProfileResetterFactory::~AutomaticProfileResetterFactory() {} 47 AutomaticProfileResetterFactory::~AutomaticProfileResetterFactory() {}
48 48
49 BrowserContextKeyedService* 49 BrowserContextKeyedService*
50 AutomaticProfileResetterFactory::BuildServiceInstanceFor( 50 AutomaticProfileResetterFactory::BuildServiceInstanceFor(
51 content::BrowserContext* context) const { 51 content::BrowserContext* context) const {
52 Profile* profile = Profile::FromBrowserContext(context); 52 Profile* profile = Profile::FromBrowserContext(context);
53 AutomaticProfileResetter* service = new AutomaticProfileResetter(profile); 53 AutomaticProfileResetter* service = new AutomaticProfileResetter(profile);
54 service->Initialize();
54 service->Activate(); 55 service->Activate();
55 return service; 56 return service;
56 } 57 }
57 58
58 void AutomaticProfileResetterFactory::RegisterProfilePrefs( 59 void AutomaticProfileResetterFactory::RegisterProfilePrefs(
59 user_prefs::PrefRegistrySyncable* registry) { 60 user_prefs::PrefRegistrySyncable* registry) {
60 registry->RegisterStringPref( 61 registry->RegisterStringPref(
61 prefs::kProfileResetPromptMemento, 62 prefs::kProfileResetPromptMemento,
62 "", 63 "",
63 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 64 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
64 } 65 }
65 66
66 bool AutomaticProfileResetterFactory:: 67 bool AutomaticProfileResetterFactory::
67 ServiceIsCreatedWithBrowserContext() const { 68 ServiceIsCreatedWithBrowserContext() const {
68 return true; 69 return true;
69 } 70 }
70 71
71 bool AutomaticProfileResetterFactory::ServiceIsNULLWhileTesting() const { 72 bool AutomaticProfileResetterFactory::ServiceIsNULLWhileTesting() const {
72 return true; 73 return true;
73 } 74 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698