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

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

Issue 1651203002: Update components for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « components/suggestions/DEPS ('k') | components/suggestions/suggestions_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 12
13 #include "base/base64.h" 13 #include "base/base64.h"
14 #include "base/metrics/histogram_macros.h" 14 #include "base/metrics/histogram_macros.h"
15 #include "base/prefs/pref_service.h"
16 #include "components/pref_registry/pref_registry_syncable.h" 15 #include "components/pref_registry/pref_registry_syncable.h"
16 #include "components/prefs/pref_service.h"
17 #include "components/suggestions/suggestions_pref_names.h" 17 #include "components/suggestions/suggestions_pref_names.h"
18 18
19 using base::TimeDelta; 19 using base::TimeDelta;
20 using base::TimeTicks; 20 using base::TimeTicks;
21 21
22 namespace suggestions { 22 namespace suggestions {
23 namespace { 23 namespace {
24 24
25 void PopulateBlacklistSet(const SuggestionsBlacklist& blacklist_proto, 25 void PopulateBlacklistSet(const SuggestionsBlacklist& blacklist_proto,
26 std::set<std::string>* blacklist_set) { 26 std::set<std::string>* blacklist_set) {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 pref_service_->SetString(prefs::kSuggestionsBlacklist, base64_blacklist_data); 256 pref_service_->SetString(prefs::kSuggestionsBlacklist, base64_blacklist_data);
257 return true; 257 return true;
258 } 258 }
259 259
260 void BlacklistStore::ClearBlacklist() { 260 void BlacklistStore::ClearBlacklist() {
261 pref_service_->ClearPref(prefs::kSuggestionsBlacklist); 261 pref_service_->ClearPref(prefs::kSuggestionsBlacklist);
262 } 262 }
263 263
264 } // namespace suggestions 264 } // namespace suggestions
OLDNEW
« no previous file with comments | « components/suggestions/DEPS ('k') | components/suggestions/suggestions_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698