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/chromeos/net/onc_utils.h" | 5 #include "chrome/browser/chromeos/net/onc_utils.h" |
6 | 6 |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.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/macros.h" | 10 #include "base/macros.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 ethernet->path(), *shill_dict, | 134 ethernet->path(), *shill_dict, |
135 NetworkConfigurationObserver::SOURCE_USER_ACTION, base::Closure(), | 135 NetworkConfigurationObserver::SOURCE_USER_ACTION, base::Closure(), |
136 network_handler::ErrorCallback()); | 136 network_handler::ErrorCallback()); |
137 } else { | 137 } else { |
138 ethernet_not_found = true; | 138 ethernet_not_found = true; |
139 } | 139 } |
140 | 140 |
141 } else { | 141 } else { |
142 config_handler->CreateShillConfiguration( | 142 config_handler->CreateShillConfiguration( |
143 *shill_dict, NetworkConfigurationObserver::SOURCE_USER_ACTION, | 143 *shill_dict, NetworkConfigurationObserver::SOURCE_USER_ACTION, |
144 network_handler::StringResultCallback(), | 144 network_handler::ServiceResultCallback(), |
145 network_handler::ErrorCallback()); | 145 network_handler::ErrorCallback()); |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 if (ethernet_not_found) | 149 if (ethernet_not_found) |
150 *error = "No Ethernet available to configure."; | 150 *error = "No Ethernet available to configure."; |
151 } | 151 } |
152 | 152 |
153 const base::DictionaryValue* FindPolicyForActiveUser( | 153 const base::DictionaryValue* FindPolicyForActiveUser( |
154 const std::string& guid, | 154 const std::string& guid, |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 const PrefService* local_state_prefs, | 337 const PrefService* local_state_prefs, |
338 const NetworkState& network) { | 338 const NetworkState& network) { |
339 ::onc::ONCSource ignored_onc_source; | 339 ::onc::ONCSource ignored_onc_source; |
340 const base::DictionaryValue* policy = onc::GetPolicyForNetwork( | 340 const base::DictionaryValue* policy = onc::GetPolicyForNetwork( |
341 profile_prefs, local_state_prefs, network, &ignored_onc_source); | 341 profile_prefs, local_state_prefs, network, &ignored_onc_source); |
342 return policy != NULL; | 342 return policy != NULL; |
343 } | 343 } |
344 | 344 |
345 } // namespace onc | 345 } // namespace onc |
346 } // namespace chromeos | 346 } // namespace chromeos |
OLD | NEW |