| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 time.c_str(), | 60 time.c_str(), |
| 61 std::string(), | 61 std::string(), |
| 62 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 62 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 63 } | 63 } |
| 64 // TokenService information for about:signin-internals. | 64 // TokenService information for about:signin-internals. |
| 65 for (size_t i = 0; i < kNumTokenPrefs; i++) { | 65 for (size_t i = 0; i < kNumTokenPrefs; i++) { |
| 66 const std::string pref = TokenPrefPath(kTokenPrefsArray[i]); | 66 const std::string pref = TokenPrefPath(kTokenPrefsArray[i]); |
| 67 const std::string value = pref + ".value"; | 67 const std::string value = pref + ".value"; |
| 68 const std::string status = pref + ".status"; | 68 const std::string status = pref + ".status"; |
| 69 const std::string time = pref + ".time"; | 69 const std::string time = pref + ".time"; |
| 70 const std::string time_internal = pref + ".time_internal"; |
| 70 user_prefs->RegisterStringPref( | 71 user_prefs->RegisterStringPref( |
| 71 value.c_str(), | 72 value.c_str(), |
| 72 std::string(), | 73 std::string(), |
| 73 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 74 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 74 user_prefs->RegisterStringPref( | 75 user_prefs->RegisterStringPref( |
| 75 status.c_str(), | 76 status.c_str(), |
| 76 std::string(), | 77 std::string(), |
| 77 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 78 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 78 user_prefs->RegisterStringPref( | 79 user_prefs->RegisterStringPref( |
| 79 time.c_str(), | 80 time.c_str(), |
| 80 std::string(), | 81 std::string(), |
| 81 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 82 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 83 user_prefs->RegisterInt64Pref( |
| 84 time_internal.c_str(), |
| 85 0, |
| 86 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 82 } | 87 } |
| 83 } | 88 } |
| 84 | 89 |
| 85 ProfileKeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( | 90 ProfileKeyedService* AboutSigninInternalsFactory::BuildServiceInstanceFor( |
| 86 content::BrowserContext* profile) const { | 91 content::BrowserContext* profile) const { |
| 87 AboutSigninInternals* service = new AboutSigninInternals(); | 92 AboutSigninInternals* service = new AboutSigninInternals(); |
| 88 service->Initialize(static_cast<Profile*>(profile)); | 93 service->Initialize(static_cast<Profile*>(profile)); |
| 89 return service; | 94 return service; |
| 90 } | 95 } |
| OLD | NEW |