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

Side by Side Diff: chrome/browser/chromeos/cros/network_library_impl_base.cc

Issue 14729017: Add NetworkHandler to own network handlers in src/chromeos/network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos_unittests Created 7 years, 7 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/cros/network_library_impl_base.h" 5 #include "chrome/browser/chromeos/cros/network_library_impl_base.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/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 if (from_policy) { 1197 if (from_policy) {
1198 // For policy-managed networks, go through the list of existing remembered 1198 // For policy-managed networks, go through the list of existing remembered
1199 // networks and clean out the ones that no longer have a definition in the 1199 // networks and clean out the ones that no longer have a definition in the
1200 // ONC blob. We first collect the networks and do the actual deletion later 1200 // ONC blob. We first collect the networks and do the actual deletion later
1201 // because ForgetNetwork() changes the remembered network vectors. 1201 // because ForgetNetwork() changes the remembered network vectors.
1202 ForgetNetworksById(source, network_ids, false); 1202 ForgetNetworksById(source, network_ids, false);
1203 } else if (source == onc::ONC_SOURCE_USER_IMPORT && !removal_ids.empty()) { 1203 } else if (source == onc::ONC_SOURCE_USER_IMPORT && !removal_ids.empty()) {
1204 ForgetNetworksById(source, removal_ids, true); 1204 ForgetNetworksById(source, removal_ids, true);
1205 } 1205 }
1206 // Ensure NetworkStateHandler properties are up-to-date. 1206 // Ensure NetworkStateHandler properties are up-to-date.
1207 if (NetworkStateHandler::IsInitialized()) 1207 if (NetworkHandler::IsInitialized()) {
1208 NetworkStateHandler::Get()->RequestUpdateForAllNetworks(); 1208 NetworkHandler::Get()->network_state_handler()->
1209 RequestUpdateForAllNetworks();
1210 }
1209 } 1211 }
1210 1212
1211 //////////////////////////////////////////////////////////////////////////// 1213 ////////////////////////////////////////////////////////////////////////////
1212 // Testing functions. 1214 // Testing functions.
1213 1215
1214 bool NetworkLibraryImplBase::SetActiveNetwork( 1216 bool NetworkLibraryImplBase::SetActiveNetwork(
1215 ConnectionType type, const std::string& service_path) { 1217 ConnectionType type, const std::string& service_path) {
1216 Network* network = NULL; 1218 Network* network = NULL;
1217 if (!service_path.empty()) 1219 if (!service_path.empty())
1218 network = FindNetworkByPath(service_path); 1220 network = FindNetworkByPath(service_path);
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 GetTpmInfo(); 1724 GetTpmInfo();
1723 return tpm_slot_; 1725 return tpm_slot_;
1724 } 1726 }
1725 1727
1726 const std::string& NetworkLibraryImplBase::GetTpmPin() { 1728 const std::string& NetworkLibraryImplBase::GetTpmPin() {
1727 GetTpmInfo(); 1729 GetTpmInfo();
1728 return tpm_pin_; 1730 return tpm_pin_;
1729 } 1731 }
1730 1732
1731 } // namespace chromeos 1733 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/network_library.cc ('k') | chrome/browser/chromeos/cros/network_library_impl_cros.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698