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

Unified Diff: components/search_engines/default_search_policy_handler.cc

Issue 2400703002: Fix policy checks for chrome://policy (Closed)
Patch Set: Add comment so that this doesnt get broken again Created 4 years, 2 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
« no previous file with comments | « components/policy/core/browser/configuration_policy_handler_list.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/default_search_policy_handler.cc
diff --git a/components/search_engines/default_search_policy_handler.cc b/components/search_engines/default_search_policy_handler.cc
index a2837ee8a1232e0a9a5df5dc1e99bd1ce4574e14..4c273ec1c66ab28e919a6640d3e9cda19e2e1a8c 100644
--- a/components/search_engines/default_search_policy_handler.cc
+++ b/components/search_engines/default_search_policy_handler.cc
@@ -301,11 +301,12 @@ void DefaultSearchPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
bool DefaultSearchPolicyHandler::CheckIndividualPolicies(
const PolicyMap& policies,
PolicyErrorMap* errors) {
+ bool all_ok = true;
Peter Kasting 2016/10/10 19:39:33 Nit: I had to look at several things to understand
aberent 2016/10/13 15:10:01 Done.
for (const auto& handler : handlers_) {
if (!handler->CheckPolicySettings(policies, errors))
- return false;
+ all_ok = false;
Peter Kasting 2016/10/10 19:39:33 Nit: Shorter: for (const auto& handler : handle
aberent 2016/10/13 15:10:01 Done.
}
- return true;
+ return all_ok;
}
bool DefaultSearchPolicyHandler::HasDefaultSearchPolicy(
« no previous file with comments | « components/policy/core/browser/configuration_policy_handler_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698