OLD | NEW |
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 #include <utility> | 10 #include <utility> |
(...skipping 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2205 "BrowserOptions.setMetricsReportingCheckboxState", | 2205 "BrowserOptions.setMetricsReportingCheckboxState", |
2206 base::FundamentalValue(checked), base::FundamentalValue(policy_managed), | 2206 base::FundamentalValue(checked), base::FundamentalValue(policy_managed), |
2207 base::FundamentalValue(owner_managed)); | 2207 base::FundamentalValue(owner_managed)); |
2208 } | 2208 } |
2209 | 2209 |
2210 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, | 2210 void BrowserOptionsHandler::OnPolicyUpdated(const policy::PolicyNamespace& ns, |
2211 const policy::PolicyMap& previous, | 2211 const policy::PolicyMap& previous, |
2212 const policy::PolicyMap& current) { | 2212 const policy::PolicyMap& current) { |
2213 std::set<std::string> different_keys; | 2213 std::set<std::string> different_keys; |
2214 current.GetDifferingKeys(previous, &different_keys); | 2214 current.GetDifferingKeys(previous, &different_keys); |
2215 if (ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) | 2215 if (base::ContainsKey(different_keys, policy::key::kMetricsReportingEnabled)) |
2216 SetupMetricsReportingCheckbox(); | 2216 SetupMetricsReportingCheckbox(); |
2217 } | 2217 } |
2218 | 2218 |
2219 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { | 2219 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { |
2220 #if defined(OS_CHROMEOS) | 2220 #if defined(OS_CHROMEOS) |
2221 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); | 2221 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); |
2222 #else | 2222 #else |
2223 return true; | 2223 return true; |
2224 #endif | 2224 #endif |
2225 } | 2225 } |
2226 | 2226 |
2227 } // namespace options | 2227 } // namespace options |
OLD | NEW |