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

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

Issue 15233002: Add NetworkStateHandler::RequestUpdateForNetwork (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "chrome/browser/chromeos/cros/network_constants.h" 12 #include "chrome/browser/chromeos/cros/network_constants.h"
13 #include "chrome/browser/chromeos/login/user_manager.h" 13 #include "chrome/browser/chromeos/login/user_manager.h"
14 #include "chrome/browser/chromeos/net/onc_utils.h" 14 #include "chrome/browser/chromeos/net/onc_utils.h"
15 #include "chrome/browser/chromeos/network_login_observer.h" 15 #include "chrome/browser/chromeos/network_login_observer.h"
16 #include "chromeos/network/network_state_handler.h"
16 #include "chromeos/network/network_ui_data.h" 17 #include "chromeos/network/network_ui_data.h"
17 #include "chromeos/network/onc/onc_constants.h" 18 #include "chromeos/network/onc/onc_constants.h"
18 #include "chromeos/network/onc/onc_normalizer.h" 19 #include "chromeos/network/onc/onc_normalizer.h"
19 #include "chromeos/network/onc/onc_signature.h" 20 #include "chromeos/network/onc/onc_signature.h"
20 #include "chromeos/network/onc/onc_translator.h" 21 #include "chromeos/network/onc/onc_translator.h"
21 #include "chromeos/network/onc/onc_utils.h" 22 #include "chromeos/network/onc/onc_utils.h"
22 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
23 #include "crypto/nss_util.h" // crypto::GetTPMTokenInfo() for 802.1X and VPN. 24 #include "crypto/nss_util.h" // crypto::GetTPMTokenInfo() for 802.1X and VPN.
24 #include "third_party/cros_system_api/dbus/service_constants.h" 25 #include "third_party/cros_system_api/dbus/service_constants.h"
25 26
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 1191
1191 if (from_policy) { 1192 if (from_policy) {
1192 // For policy-managed networks, go through the list of existing remembered 1193 // For policy-managed networks, go through the list of existing remembered
1193 // networks and clean out the ones that no longer have a definition in the 1194 // networks and clean out the ones that no longer have a definition in the
1194 // ONC blob. We first collect the networks and do the actual deletion later 1195 // ONC blob. We first collect the networks and do the actual deletion later
1195 // because ForgetNetwork() changes the remembered network vectors. 1196 // because ForgetNetwork() changes the remembered network vectors.
1196 ForgetNetworksById(source, network_ids, false); 1197 ForgetNetworksById(source, network_ids, false);
1197 } else if (source == onc::ONC_SOURCE_USER_IMPORT && !removal_ids.empty()) { 1198 } else if (source == onc::ONC_SOURCE_USER_IMPORT && !removal_ids.empty()) {
1198 ForgetNetworksById(source, removal_ids, true); 1199 ForgetNetworksById(source, removal_ids, true);
1199 } 1200 }
1201 // Ensure NetworkStateHandler properties are up-to-date.
1202 NetworkStateHandler::Get()->RequestUpdateForAllNetworks();
1200 } 1203 }
1201 1204
1202 //////////////////////////////////////////////////////////////////////////// 1205 ////////////////////////////////////////////////////////////////////////////
1203 // Testing functions. 1206 // Testing functions.
1204 1207
1205 bool NetworkLibraryImplBase::SetActiveNetwork( 1208 bool NetworkLibraryImplBase::SetActiveNetwork(
1206 ConnectionType type, const std::string& service_path) { 1209 ConnectionType type, const std::string& service_path) {
1207 Network* network = NULL; 1210 Network* network = NULL;
1208 if (!service_path.empty()) 1211 if (!service_path.empty())
1209 network = FindNetworkByPath(service_path); 1212 network = FindNetworkByPath(service_path);
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 GetTpmInfo(); 1716 GetTpmInfo();
1714 return tpm_slot_; 1717 return tpm_slot_;
1715 } 1718 }
1716 1719
1717 const std::string& NetworkLibraryImplBase::GetTpmPin() { 1720 const std::string& NetworkLibraryImplBase::GetTpmPin() {
1718 GetTpmInfo(); 1721 GetTpmInfo();
1719 return tpm_pin_; 1722 return tpm_pin_;
1720 } 1723 }
1721 1724
1722 } // namespace chromeos 1725 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698