| 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/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/chromeos/login/user.h" | 11 #include "chrome/browser/chromeos/login/user.h" |
| 12 #include "chrome/browser/chromeos/login/user_manager.h" | 12 #include "chrome/browser/chromeos/login/user_manager.h" |
| 13 #include "chrome/browser/chromeos/ui_proxy_config.h" | 13 #include "chrome/browser/chromeos/ui_proxy_config.h" |
| 14 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 14 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
| 15 #include "chromeos/network/managed_network_configuration_handler.h" |
| 15 #include "chromeos/network/network_configuration_handler.h" | 16 #include "chromeos/network/network_configuration_handler.h" |
| 16 #include "chromeos/network/network_handler.h" | 17 #include "chromeos/network/network_handler.h" |
| 17 #include "chromeos/network/network_profile.h" | 18 #include "chromeos/network/network_profile.h" |
| 18 #include "chromeos/network/network_profile_handler.h" | 19 #include "chromeos/network/network_profile_handler.h" |
| 19 #include "chromeos/network/network_ui_data.h" | 20 #include "chromeos/network/network_ui_data.h" |
| 20 #include "chromeos/network/onc/onc_normalizer.h" | 21 #include "chromeos/network/onc/onc_normalizer.h" |
| 21 #include "chromeos/network/onc/onc_signature.h" | 22 #include "chromeos/network/onc/onc_signature.h" |
| 22 #include "chromeos/network/onc/onc_translator.h" | 23 #include "chromeos/network/onc/onc_translator.h" |
| 23 #include "chromeos/network/onc/onc_utils.h" | 24 #include "chromeos/network/onc/onc_utils.h" |
| 24 #include "net/base/host_port_pair.h" | 25 #include "net/base/host_port_pair.h" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 shill_dict->SetStringWithoutPathExpansion(flimflam::kProfileProperty, | 237 shill_dict->SetStringWithoutPathExpansion(flimflam::kProfileProperty, |
| 237 profile->path); | 238 profile->path); |
| 238 | 239 |
| 239 NetworkHandler::Get()->network_configuration_handler()->CreateConfiguration( | 240 NetworkHandler::Get()->network_configuration_handler()->CreateConfiguration( |
| 240 *shill_dict, | 241 *shill_dict, |
| 241 network_handler::StringResultCallback(), | 242 network_handler::StringResultCallback(), |
| 242 network_handler::ErrorCallback()); | 243 network_handler::ErrorCallback()); |
| 243 } | 244 } |
| 244 } | 245 } |
| 245 | 246 |
| 247 const base::DictionaryValue* FindPolicyForActiveUser( |
| 248 const std::string& guid, |
| 249 onc::ONCSource* onc_source) { |
| 250 const User* user = UserManager::Get()->GetActiveUser(); |
| 251 std::string username_hash = user ? user->username_hash() : std::string(); |
| 252 return NetworkHandler::Get()->managed_network_configuration_handler()-> |
| 253 FindPolicyByGUID(username_hash, guid, onc_source); |
| 254 } |
| 255 |
| 246 } // namespace onc | 256 } // namespace onc |
| 247 } // namespace chromeos | 257 } // namespace chromeos |
| OLD | NEW |