| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/suggestions/suggestions_store.h" | 5 #include "components/suggestions/suggestions_store.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/base64.h" | 11 #include "base/base64.h" |
| 12 #include "base/prefs/pref_service.h" | |
| 13 #include "base/time/default_clock.h" | 12 #include "base/time/default_clock.h" |
| 14 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 15 #include "components/pref_registry/pref_registry_syncable.h" | 14 #include "components/pref_registry/pref_registry_syncable.h" |
| 15 #include "components/prefs/pref_service.h" |
| 16 #include "components/suggestions/suggestions_pref_names.h" | 16 #include "components/suggestions/suggestions_pref_names.h" |
| 17 | 17 |
| 18 namespace suggestions { | 18 namespace suggestions { |
| 19 | 19 |
| 20 SuggestionsStore::SuggestionsStore(PrefService* profile_prefs) | 20 SuggestionsStore::SuggestionsStore(PrefService* profile_prefs) |
| 21 : pref_service_(profile_prefs), clock_(new base::DefaultClock()) { | 21 : pref_service_(profile_prefs), clock_(new base::DefaultClock()) { |
| 22 DCHECK(profile_prefs); | 22 DCHECK(profile_prefs); |
| 23 } | 23 } |
| 24 | 24 |
| 25 SuggestionsStore::SuggestionsStore() { | 25 SuggestionsStore::SuggestionsStore() { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 pref_service_->ClearPref(prefs::kSuggestionsData); | 98 pref_service_->ClearPref(prefs::kSuggestionsData); |
| 99 } | 99 } |
| 100 | 100 |
| 101 // static | 101 // static |
| 102 void SuggestionsStore::RegisterProfilePrefs( | 102 void SuggestionsStore::RegisterProfilePrefs( |
| 103 user_prefs::PrefRegistrySyncable* registry) { | 103 user_prefs::PrefRegistrySyncable* registry) { |
| 104 registry->RegisterStringPref(prefs::kSuggestionsData, std::string()); | 104 registry->RegisterStringPref(prefs::kSuggestionsData, std::string()); |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace suggestions | 107 } // namespace suggestions |
| OLD | NEW |