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 "chromeos/network/proxy/proxy_config_handler.h" | 5 #include "chromeos/network/proxy/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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 dbus::ObjectPath(network.path()), shill::kProxyConfigProperty, | 108 dbus::ObjectPath(network.path()), shill::kProxyConfigProperty, |
109 base::Bind(&NotifyNetworkStateHandler, network.path()), | 109 base::Bind(&NotifyNetworkStateHandler, network.path()), |
110 base::Bind(&network_handler::ShillErrorCallbackFunction, | 110 base::Bind(&network_handler::ShillErrorCallbackFunction, |
111 "SetProxyConfig.ClearProperty Failed", network.path(), | 111 "SetProxyConfig.ClearProperty Failed", network.path(), |
112 network_handler::ErrorCallback())); | 112 network_handler::ErrorCallback())); |
113 } else { | 113 } else { |
114 std::string proxy_config_str; | 114 std::string proxy_config_str; |
115 base::JSONWriter::Write(proxy_config.GetDictionary(), &proxy_config_str); | 115 base::JSONWriter::Write(proxy_config.GetDictionary(), &proxy_config_str); |
116 shill_service_client->SetProperty( | 116 shill_service_client->SetProperty( |
117 dbus::ObjectPath(network.path()), shill::kProxyConfigProperty, | 117 dbus::ObjectPath(network.path()), shill::kProxyConfigProperty, |
118 base::StringValue(proxy_config_str), | 118 base::Value(proxy_config_str), |
119 base::Bind(&NotifyNetworkStateHandler, network.path()), | 119 base::Bind(&NotifyNetworkStateHandler, network.path()), |
120 base::Bind(&network_handler::ShillErrorCallbackFunction, | 120 base::Bind(&network_handler::ShillErrorCallbackFunction, |
121 "SetProxyConfig.SetProperty Failed", network.path(), | 121 "SetProxyConfig.SetProperty Failed", network.path(), |
122 network_handler::ErrorCallback())); | 122 network_handler::ErrorCallback())); |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 } // namespace proxy_config | 126 } // namespace proxy_config |
127 | 127 |
128 } // namespace chromeos | 128 } // namespace chromeos |
OLD | NEW |