OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/profiles/gaia_info_update_service_factory.h" | 5 #include "chrome/browser/profiles/gaia_info_update_service_factory.h" |
6 | 6 |
7 #include "chrome/browser/profiles/gaia_info_update_service.h" | 7 #include "chrome/browser/profiles/gaia_info_update_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 BrowserContextKeyedService* | 33 BrowserContextKeyedService* |
34 GAIAInfoUpdateServiceFactory::BuildServiceInstanceFor( | 34 GAIAInfoUpdateServiceFactory::BuildServiceInstanceFor( |
35 content::BrowserContext* context) const { | 35 content::BrowserContext* context) const { |
36 Profile* profile = static_cast<Profile*>(context); | 36 Profile* profile = static_cast<Profile*>(context); |
37 if (!GAIAInfoUpdateService::ShouldUseGAIAProfileInfo(profile)) | 37 if (!GAIAInfoUpdateService::ShouldUseGAIAProfileInfo(profile)) |
38 return NULL; | 38 return NULL; |
39 return new GAIAInfoUpdateService(profile); | 39 return new GAIAInfoUpdateService(profile); |
40 } | 40 } |
41 | 41 |
42 void GAIAInfoUpdateServiceFactory::RegisterUserPrefs( | 42 void GAIAInfoUpdateServiceFactory::RegisterProfilePrefs( |
43 user_prefs::PrefRegistrySyncable* prefs) { | 43 user_prefs::PrefRegistrySyncable* prefs) { |
44 prefs->RegisterInt64Pref(prefs::kProfileGAIAInfoUpdateTime, | 44 prefs->RegisterInt64Pref(prefs::kProfileGAIAInfoUpdateTime, |
45 0, | 45 0, |
46 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 46 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
47 prefs->RegisterStringPref(prefs::kProfileGAIAInfoPictureURL, | 47 prefs->RegisterStringPref(prefs::kProfileGAIAInfoPictureURL, |
48 std::string(), | 48 std::string(), |
49 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 49 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
50 } | 50 } |
51 | 51 |
52 bool GAIAInfoUpdateServiceFactory::ServiceIsNULLWhileTesting() const { | 52 bool GAIAInfoUpdateServiceFactory::ServiceIsNULLWhileTesting() const { |
53 return true; | 53 return true; |
54 } | 54 } |
OLD | NEW |