Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: components/suggestions/blacklist_store.cc

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/blacklist_store.h" 5 #include "components/suggestions/blacklist_store.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 205 }
206 } 206 }
207 207
208 // Swap |profile| and |filtered_profile|. 208 // Swap |profile| and |filtered_profile|.
209 profile->Swap(&filtered_profile); 209 profile->Swap(&filtered_profile);
210 } 210 }
211 211
212 // static 212 // static
213 void BlacklistStore::RegisterProfilePrefs( 213 void BlacklistStore::RegisterProfilePrefs(
214 user_prefs::PrefRegistrySyncable* registry) { 214 user_prefs::PrefRegistrySyncable* registry) {
215 registry->RegisterStringPref( 215 registry->RegisterStringPref(prefs::kSuggestionsBlacklist, std::string());
216 prefs::kSuggestionsBlacklist, std::string(),
217 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
218 } 216 }
219 217
220 218
221 // Test seam. For simplicity of mock creation. 219 // Test seam. For simplicity of mock creation.
222 BlacklistStore::BlacklistStore() { 220 BlacklistStore::BlacklistStore() {
223 } 221 }
224 222
225 bool BlacklistStore::LoadBlacklist(SuggestionsBlacklist* blacklist) { 223 bool BlacklistStore::LoadBlacklist(SuggestionsBlacklist* blacklist) {
226 DCHECK(blacklist); 224 DCHECK(blacklist);
227 225
(...skipping 27 matching lines...) Expand all
255 253
256 pref_service_->SetString(prefs::kSuggestionsBlacklist, base64_blacklist_data); 254 pref_service_->SetString(prefs::kSuggestionsBlacklist, base64_blacklist_data);
257 return true; 255 return true;
258 } 256 }
259 257
260 void BlacklistStore::ClearBlacklist() { 258 void BlacklistStore::ClearBlacklist() {
261 pref_service_->ClearPref(prefs::kSuggestionsBlacklist); 259 pref_service_->ClearPref(prefs::kSuggestionsBlacklist);
262 } 260 }
263 261
264 } // namespace suggestions 262 } // namespace suggestions
OLDNEW
« no previous file with comments | « components/search_engines/template_url_prepopulate_data.cc ('k') | components/suggestions/suggestions_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698