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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 // policy/extension. | 403 // policy/extension. |
404 NotifyPrefChanged(prefs::kUseSharedProxies, proxy_config::prefs::kProxy); | 404 NotifyPrefChanged(prefs::kUseSharedProxies, proxy_config::prefs::kProxy); |
405 return; | 405 return; |
406 } | 406 } |
407 ::options::CoreOptionsHandler::OnPreferenceChanged(service, pref_name); | 407 ::options::CoreOptionsHandler::OnPreferenceChanged(service, pref_name); |
408 } | 408 } |
409 | 409 |
410 void CoreChromeOSOptionsHandler::NotifySettingsChanged( | 410 void CoreChromeOSOptionsHandler::NotifySettingsChanged( |
411 const std::string& setting_name) { | 411 const std::string& setting_name) { |
412 DCHECK(CrosSettings::Get()->IsCrosSettings(setting_name)); | 412 DCHECK(CrosSettings::Get()->IsCrosSettings(setting_name)); |
413 scoped_ptr<base::Value> value(FetchPref(setting_name)); | 413 std::unique_ptr<base::Value> value(FetchPref(setting_name)); |
414 if (!value.get()) | 414 if (!value.get()) |
415 NOTREACHED(); | 415 NOTREACHED(); |
416 DispatchPrefChangeNotification(setting_name, std::move(value)); | 416 DispatchPrefChangeNotification(setting_name, std::move(value)); |
417 } | 417 } |
418 | 418 |
419 void CoreChromeOSOptionsHandler::NotifyProxyPrefsChanged() { | 419 void CoreChromeOSOptionsHandler::NotifyProxyPrefsChanged() { |
420 proxy_config_service_.UpdateFromPrefs(); | 420 proxy_config_service_.UpdateFromPrefs(); |
421 for (size_t i = 0; i < kProxySettingsCount; ++i) { | 421 for (size_t i = 0; i < kProxySettingsCount; ++i) { |
422 base::Value* value = NULL; | 422 base::Value* value = NULL; |
423 proxy_cros_settings_parser::GetProxyPrefValue( | 423 proxy_cros_settings_parser::GetProxyPrefValue( |
424 proxy_config_service_, kProxySettings[i], &value); | 424 proxy_config_service_, kProxySettings[i], &value); |
425 DCHECK(value); | 425 DCHECK(value); |
426 scoped_ptr<base::Value> ptr(value); | 426 std::unique_ptr<base::Value> ptr(value); |
427 DispatchPrefChangeNotification(kProxySettings[i], std::move(ptr)); | 427 DispatchPrefChangeNotification(kProxySettings[i], std::move(ptr)); |
428 } | 428 } |
429 } | 429 } |
430 | 430 |
431 } // namespace options | 431 } // namespace options |
432 } // namespace chromeos | 432 } // namespace chromeos |
OLD | NEW |