| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/net/proxy_config_handler.h" | 5 #include "chrome/browser/chromeos/net/proxy_config_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 11 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| 12 #include "chrome/common/pref_names.h" |
| 12 #include "chromeos/dbus/dbus_thread_manager.h" | 13 #include "chromeos/dbus/dbus_thread_manager.h" |
| 13 #include "chromeos/dbus/shill_service_client.h" | 14 #include "chromeos/dbus/shill_service_client.h" |
| 14 #include "chromeos/network/network_handler_callbacks.h" | 15 #include "chromeos/network/network_handler_callbacks.h" |
| 15 #include "chromeos/network/network_state.h" | 16 #include "chromeos/network/network_state.h" |
| 16 #include "chromeos/network/network_state_handler.h" | 17 #include "chromeos/network/network_state_handler.h" |
| 18 #include "components/user_prefs/pref_registry_syncable.h" |
| 17 #include "dbus/object_path.h" | 19 #include "dbus/object_path.h" |
| 18 #include "third_party/cros_system_api/dbus/service_constants.h" | 20 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 19 | 21 |
| 20 namespace chromeos { | 22 namespace chromeos { |
| 21 | 23 |
| 22 namespace proxy_config { | 24 namespace proxy_config { |
| 23 | 25 |
| 24 scoped_ptr<ProxyConfigDictionary> GetProxyConfigForNetwork( | 26 scoped_ptr<ProxyConfigDictionary> GetProxyConfigForNetwork( |
| 25 const NetworkState& network) { | 27 const NetworkState& network) { |
| 26 const base::DictionaryValue& value = network.proxy_config(); | 28 const base::DictionaryValue& value = network.proxy_config(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 57 "SetProxyConfig.SetProperty Failed", | 59 "SetProxyConfig.SetProperty Failed", |
| 58 network.path(), network_handler::ErrorCallback())); | 60 network.path(), network_handler::ErrorCallback())); |
| 59 } | 61 } |
| 60 | 62 |
| 61 if (NetworkHandler::IsInitialized()) { | 63 if (NetworkHandler::IsInitialized()) { |
| 62 NetworkHandler::Get()->network_state_handler()-> | 64 NetworkHandler::Get()->network_state_handler()-> |
| 63 RequestUpdateForNetwork(network.path()); | 65 RequestUpdateForNetwork(network.path()); |
| 64 } | 66 } |
| 65 } | 67 } |
| 66 | 68 |
| 69 void RegisterProfilePrefs( |
| 70 user_prefs::PrefRegistrySyncable* registry) { |
| 71 registry->RegisterBooleanPref( |
| 72 prefs::kUseSharedProxies, |
| 73 false, |
| 74 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 75 } |
| 76 |
| 67 } // namespace proxy_config | 77 } // namespace proxy_config |
| 68 | 78 |
| 69 } // namespace chromeos | 79 } // namespace chromeos |
| OLD | NEW |