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

Unified Diff: components/policy/core/browser/configuration_policy_handler.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/browser/configuration_policy_handler.cc
diff --git a/components/policy/core/browser/configuration_policy_handler.cc b/components/policy/core/browser/configuration_policy_handler.cc
index 2ad8a4013a727806f0941b909f1030f7047f0299..fab246a542cfd145daeec15d8aea54af84bb7b30 100644
--- a/components/policy/core/browser/configuration_policy_handler.cc
+++ b/components/policy/core/browser/configuration_policy_handler.cc
@@ -217,7 +217,7 @@ std::unique_ptr<base::Value> StringMappingListPolicyHandler::Map(
map_getter_.Run(&map_);
std::unique_ptr<base::Value> return_value;
- for (const auto& mapping_entry : map_) {
+ for (const auto* mapping_entry : map_) {
if (mapping_entry->enum_value == entry_value) {
return_value = base::WrapUnique(mapping_entry->mapped_value->DeepCopy());
break;
@@ -430,7 +430,7 @@ bool LegacyPoliciesDeprecatingPolicyHandler::CheckPolicySettings(
// The new policy is not set, fall back to legacy ones.
ScopedVector<ConfigurationPolicyHandler>::iterator handler;
bool valid_policy_found = false;
- for (const auto& handler : legacy_policy_handlers_) {
+ for (auto* handler : legacy_policy_handlers_) {
if (handler->CheckPolicySettings(policies, errors))
valid_policy_found = true;
}
@@ -449,7 +449,7 @@ void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettingsWithParameters(
// The new policy is not set, fall back to legacy ones.
PolicyErrorMap scoped_errors;
- for (const auto& handler : legacy_policy_handlers_) {
+ for (auto* handler : legacy_policy_handlers_) {
if (handler->CheckPolicySettings(policies, &scoped_errors))
handler->ApplyPolicySettingsWithParameters(policies, parameters, prefs);
}
« no previous file with comments | « components/password_manager/core/browser/password_store.cc ('k') | components/precache/core/precache_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698