| 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/chromeos/core_chromeos_options_handler
.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler
.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 pref_name)).release()); | 247 pref_name)).release()); |
| 248 pref_subscription_map_.insert(make_pair(pref_name, subscription)); | 248 pref_subscription_map_.insert(make_pair(pref_name, subscription)); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void CoreChromeOSOptionsHandler::SetPref(const std::string& pref_name, | 251 void CoreChromeOSOptionsHandler::SetPref(const std::string& pref_name, |
| 252 const base::Value* value, | 252 const base::Value* value, |
| 253 const std::string& metric) { | 253 const std::string& metric) { |
| 254 if (proxy_cros_settings_parser::IsProxyPref(pref_name)) { | 254 if (proxy_cros_settings_parser::IsProxyPref(pref_name)) { |
| 255 proxy_cros_settings_parser::SetProxyPrefValue( | 255 proxy_cros_settings_parser::SetProxyPrefValue( |
| 256 network_guid_, pref_name, value, GetUiProxyConfigService()); | 256 network_guid_, pref_name, value, GetUiProxyConfigService()); |
| 257 base::StringValue proxy_type(pref_name); | 257 base::Value proxy_type(pref_name); |
| 258 web_ui()->CallJavascriptFunctionUnsafe( | 258 web_ui()->CallJavascriptFunctionUnsafe( |
| 259 "options.internet.DetailsInternetPage.updateProxySettings", proxy_type); | 259 "options.internet.DetailsInternetPage.updateProxySettings", proxy_type); |
| 260 ProcessUserMetric(value, metric); | 260 ProcessUserMetric(value, metric); |
| 261 return; | 261 return; |
| 262 } | 262 } |
| 263 if (!CrosSettings::IsCrosSettings(pref_name)) | 263 if (!CrosSettings::IsCrosSettings(pref_name)) |
| 264 return ::options::CoreOptionsHandler::SetPref(pref_name, value, metric); | 264 return ::options::CoreOptionsHandler::SetPref(pref_name, value, metric); |
| 265 OwnerSettingsServiceChromeOS* service = | 265 OwnerSettingsServiceChromeOS* service = |
| 266 OwnerSettingsServiceChromeOS::FromWebUI(web_ui()); | 266 OwnerSettingsServiceChromeOS::FromWebUI(web_ui()); |
| 267 if (service && service->HandlesSetting(pref_name)) | 267 if (service && service->HandlesSetting(pref_name)) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 GetUiProxyConfigService(), &value); | 418 GetUiProxyConfigService(), &value); |
| 419 DCHECK(value); | 419 DCHECK(value); |
| 420 std::unique_ptr<base::Value> ptr(value); | 420 std::unique_ptr<base::Value> ptr(value); |
| 421 DispatchPrefChangeNotification( | 421 DispatchPrefChangeNotification( |
| 422 proxy_cros_settings_parser::kProxySettings[i], std::move(ptr)); | 422 proxy_cros_settings_parser::kProxySettings[i], std::move(ptr)); |
| 423 } | 423 } |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace options | 426 } // namespace options |
| 427 } // namespace chromeos | 427 } // namespace chromeos |
| OLD | NEW |