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

Side by Side Diff: components/variations/caching_permuted_entropy_provider.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
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/variations/caching_permuted_entropy_provider.h" 5 #include "components/variations/caching_permuted_entropy_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/prefs/pref_registry_simple.h" 11 #include "components/prefs/pref_registry_simple.h"
12 #include "base/prefs/pref_service.h" 12 #include "components/prefs/pref_service.h"
13 #include "components/variations/pref_names.h" 13 #include "components/variations/pref_names.h"
14 14
15 namespace metrics { 15 namespace metrics {
16 16
17 CachingPermutedEntropyProvider::CachingPermutedEntropyProvider( 17 CachingPermutedEntropyProvider::CachingPermutedEntropyProvider(
18 PrefService* local_state, 18 PrefService* local_state,
19 uint16_t low_entropy_source, 19 uint16_t low_entropy_source,
20 size_t low_entropy_source_max) 20 size_t low_entropy_source_max)
21 : PermutedEntropyProvider(low_entropy_source, low_entropy_source_max), 21 : PermutedEntropyProvider(low_entropy_source, low_entropy_source_max),
22 local_state_(local_state) { 22 local_state_(local_state) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 for (int i = 0; i < cache_.entry_size(); ++i) { 99 for (int i = 0; i < cache_.entry_size(); ++i) {
100 if (cache_.entry(i).randomization_seed() == randomization_seed) { 100 if (cache_.entry(i).randomization_seed() == randomization_seed) {
101 *value = cache_.entry(i).value(); 101 *value = cache_.entry(i).value();
102 return true; 102 return true;
103 } 103 }
104 } 104 }
105 return false; 105 return false;
106 } 106 }
107 107
108 } // namespace metrics 108 } // namespace metrics
OLDNEW
« no previous file with comments | « components/variations/DEPS ('k') | components/variations/caching_permuted_entropy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698