| 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/invalidation/invalidator_storage.h" | 5 #include "chrome/browser/invalidation/invalidator_storage.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (state.expected.IsValid()) | 88 if (state.expected.IsValid()) |
| 89 value->Set(kExpectedAckHandleKey, state.expected.ToValue().release()); | 89 value->Set(kExpectedAckHandleKey, state.expected.ToValue().release()); |
| 90 return value; | 90 return value; |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace | 93 } // namespace |
| 94 | 94 |
| 95 namespace invalidation { | 95 namespace invalidation { |
| 96 | 96 |
| 97 // static | 97 // static |
| 98 void InvalidatorStorage::RegisterUserPrefs( | 98 void InvalidatorStorage::RegisterProfilePrefs( |
| 99 user_prefs::PrefRegistrySyncable* registry) { | 99 user_prefs::PrefRegistrySyncable* registry) { |
| 100 registry->RegisterListPref(prefs::kInvalidatorMaxInvalidationVersions, | 100 registry->RegisterListPref(prefs::kInvalidatorMaxInvalidationVersions, |
| 101 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 101 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 102 registry->RegisterStringPref( | 102 registry->RegisterStringPref( |
| 103 prefs::kInvalidatorInvalidationState, | 103 prefs::kInvalidatorInvalidationState, |
| 104 std::string(), | 104 std::string(), |
| 105 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 105 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 106 registry->RegisterStringPref( | 106 registry->RegisterStringPref( |
| 107 prefs::kInvalidatorClientId, | 107 prefs::kInvalidatorClientId, |
| 108 std::string(), | 108 std::string(), |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 return; | 339 return; |
| 340 it->second.current = ack_handle; | 340 it->second.current = ack_handle; |
| 341 | 341 |
| 342 base::ListValue state_map_list; | 342 base::ListValue state_map_list; |
| 343 SerializeToList(state_map, &state_map_list); | 343 SerializeToList(state_map, &state_map_list); |
| 344 pref_service_->Set(prefs::kInvalidatorMaxInvalidationVersions, | 344 pref_service_->Set(prefs::kInvalidatorMaxInvalidationVersions, |
| 345 state_map_list); | 345 state_map_list); |
| 346 } | 346 } |
| 347 | 347 |
| 348 } // namespace invalidation | 348 } // namespace invalidation |
| OLD | NEW |