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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 1825173003: [Policy Experimental] Add "recommended" policies for URL exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 4 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 bool owner_managed) { 2127 bool owner_managed) {
2128 web_ui()->CallJavascriptFunction( 2128 web_ui()->CallJavascriptFunction(
2129 "BrowserOptions.setMetricsReportingCheckboxState", 2129 "BrowserOptions.setMetricsReportingCheckboxState",
2130 base::FundamentalValue(checked), base::FundamentalValue(policy_managed), 2130 base::FundamentalValue(checked), base::FundamentalValue(policy_managed),
2131 base::FundamentalValue(owner_managed)); 2131 base::FundamentalValue(owner_managed));
2132 } 2132 }
2133 2133
2134 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, 2134 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns,
2135 const policy::PolicyMap& previous, 2135 const policy::PolicyMap& previous,
2136 const policy::PolicyMap& current) { 2136 const policy::PolicyMap& current) {
2137 std::set<std::string> different_keys; 2137 std::set<std::string> different_key_names;
2138 current.GetDifferingKeys(previous, &different_keys); 2138 current.GetDifferingKeyNames(previous, &different_key_names);
2139 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) 2139 if (ContainsKey(different_key_names, policy::key::kMetricsReportingEnabled))
2140 SetupMetricsReportingCheckbox(); 2140 SetupMetricsReportingCheckbox();
2141 } 2141 }
2142 2142
2143 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2143 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2144 #if defined(OS_CHROMEOS) 2144 #if defined(OS_CHROMEOS)
2145 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2145 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2146 #else 2146 #else
2147 return true; 2147 return true;
2148 #endif 2148 #endif
2149 } 2149 }
2150 2150
2151 } // namespace options 2151 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698