| 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/signin/about_signin_internals_factory.h" | 5 #include "chrome/browser/signin/about_signin_internals_factory.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/profiles/profile_dependency_manager.h" | 8 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 9 #include "chrome/browser/signin/about_signin_internals.h" | 9 #include "chrome/browser/signin/about_signin_internals.h" |
| 10 #include "chrome/browser/signin/signin_internals_util.h" | 10 #include "chrome/browser/signin/signin_internals_util.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 value.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); | 55 value.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 56 user_prefs->RegisterStringPref( | 56 user_prefs->RegisterStringPref( |
| 57 time.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); | 57 time.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 58 } | 58 } |
| 59 // TokenService information for about:signin-internals. | 59 // TokenService information for about:signin-internals. |
| 60 for (size_t i = 0; i < kNumTokenPrefs; i++) { | 60 for (size_t i = 0; i < kNumTokenPrefs; i++) { |
| 61 const std::string pref = TokenPrefPath(kTokenPrefsArray[i]); | 61 const std::string pref = TokenPrefPath(kTokenPrefsArray[i]); |
| 62 const std::string value = pref + ".value"; | 62 const std::string value = pref + ".value"; |
| 63 const std::string status = pref + ".status"; | 63 const std::string status = pref + ".status"; |
| 64 const std::string time = pref + ".time"; | 64 const std::string time = pref + ".time"; |
| 65 const std::string time_internal = pref + ".time_internal"; |
| 65 user_prefs->RegisterStringPref( | 66 user_prefs->RegisterStringPref( |
| 66 value.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); | 67 value.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 67 user_prefs->RegisterStringPref( | 68 user_prefs->RegisterStringPref( |
| 68 status.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); | 69 status.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 69 user_prefs->RegisterStringPref( | 70 user_prefs->RegisterStringPref( |
| 70 time.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); | 71 time.c_str(), std::string(), PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 72 user_prefs->RegisterInt64Pref( |
| 73 time_internal.c_str(), 0, PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 71 } | 74 } |
| 72 } | 75 } |
| 73 | 76 |
| 74 ProfileKeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( | 77 ProfileKeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( |
| 75 content::BrowserContext* profile) const { | 78 content::BrowserContext* profile) const { |
| 76 AboutSigninInternals* service = new AboutSigninInternals(); | 79 AboutSigninInternals* service = new AboutSigninInternals(); |
| 77 service->Initialize(static_cast<Profile*>(profile)); | 80 service->Initialize(static_cast<Profile*>(profile)); |
| 78 return service; | 81 return service; |
| 79 } | 82 } |
| OLD | NEW |