Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Side by Side Diff: chrome/browser/chromeos/net/onc_utils.cc

Issue 22796014: Eliminate c/b/chromeos/options/network_connect.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix clang Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698