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

Side by Side Diff: chrome/browser/prefs/profile_pref_store_manager.cc

Issue 2752533002: Convert PrefHashFilter enums to enum class. (Closed)
Patch Set: Created 3 years, 9 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 "chrome/browser/prefs/profile_pref_store_manager.h" 5 #include "chrome/browser/prefs/profile_pref_store_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 std::vector<PrefHashFilter::TrackedPreferenceMetadata> 113 std::vector<PrefHashFilter::TrackedPreferenceMetadata>
114 unprotected_configuration; 114 unprotected_configuration;
115 std::vector<PrefHashFilter::TrackedPreferenceMetadata> 115 std::vector<PrefHashFilter::TrackedPreferenceMetadata>
116 protected_configuration; 116 protected_configuration;
117 std::set<std::string> protected_pref_names; 117 std::set<std::string> protected_pref_names;
118 std::set<std::string> unprotected_pref_names; 118 std::set<std::string> unprotected_pref_names;
119 for (std::vector<PrefHashFilter::TrackedPreferenceMetadata>::const_iterator 119 for (std::vector<PrefHashFilter::TrackedPreferenceMetadata>::const_iterator
120 it = tracking_configuration_.begin(); 120 it = tracking_configuration_.begin();
121 it != tracking_configuration_.end(); 121 it != tracking_configuration_.end();
122 ++it) { 122 ++it) {
123 if (it->enforcement_level > PrefHashFilter::NO_ENFORCEMENT) { 123 if (it->enforcement_level >
124 PrefHashFilter::EnforcementLevel::NO_ENFORCEMENT) {
124 protected_configuration.push_back(*it); 125 protected_configuration.push_back(*it);
125 protected_pref_names.insert(it->name); 126 protected_pref_names.insert(it->name);
126 } else { 127 } else {
127 unprotected_configuration.push_back(*it); 128 unprotected_configuration.push_back(*it);
128 unprotected_pref_names.insert(it->name); 129 unprotected_pref_names.insert(it->name);
129 } 130 }
130 } 131 }
131 132
132 std::unique_ptr<PrefHashFilter> unprotected_pref_hash_filter( 133 std::unique_ptr<PrefHashFilter> unprotected_pref_hash_filter(
133 new PrefHashFilter(GetPrefHashStore(false), 134 new PrefHashFilter(GetPrefHashStore(false),
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 ? base::MakeUnique<RegistryHashStoreContentsWin>( 221 ? base::MakeUnique<RegistryHashStoreContentsWin>(
221 *g_preference_validation_registry_path_for_testing, 222 *g_preference_validation_registry_path_for_testing,
222 profile_path_.BaseName().LossyDisplayName()) 223 profile_path_.BaseName().LossyDisplayName())
223 : base::MakeUnique<RegistryHashStoreContentsWin>( 224 : base::MakeUnique<RegistryHashStoreContentsWin>(
224 install_static::GetRegistryPath(), 225 install_static::GetRegistryPath(),
225 profile_path_.BaseName().LossyDisplayName())); 226 profile_path_.BaseName().LossyDisplayName()));
226 #else 227 #else
227 return std::make_pair(nullptr, nullptr); 228 return std::make_pair(nullptr, nullptr);
228 #endif 229 #endif
229 } 230 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_factory.cc ('k') | chrome/browser/prefs/profile_pref_store_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698