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

Side by Side Diff: net/base/network_change_notifier_win.cc

Issue 899573002: Add WiFi SSID getter to NetworkChangeNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 5 years, 10 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
« no previous file with comments | « net/base/network_change_notifier_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/base/network_change_notifier_win.h" 5 #include "net/base/network_change_notifier_win.h"
6 6
7 #include <iphlpapi.h> 7 #include <iphlpapi.h>
8 #include <winsock2.h> 8 #include <winsock2.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 NetworkChangeNotifierWin::GetCurrentConnectionType() const { 210 NetworkChangeNotifierWin::GetCurrentConnectionType() const {
211 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 211 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
212 tracked_objects::ScopedTracker tracking_profile( 212 tracked_objects::ScopedTracker tracking_profile(
213 FROM_HERE_WITH_EXPLICIT_FUNCTION( 213 FROM_HERE_WITH_EXPLICIT_FUNCTION(
214 "422516 NetworkChangeNotifierWin::GetCurrentConnectionType")); 214 "422516 NetworkChangeNotifierWin::GetCurrentConnectionType"));
215 215
216 base::AutoLock auto_lock(last_computed_connection_type_lock_); 216 base::AutoLock auto_lock(last_computed_connection_type_lock_);
217 return last_computed_connection_type_; 217 return last_computed_connection_type_;
218 } 218 }
219 219
220 std::string NetworkChangeNotifierWin::GetCurrentWiFiSSID() const {
221 // Not implemented. See https://crbug.com/451272
222 return "";
223 }
224
220 void NetworkChangeNotifierWin::SetCurrentConnectionType( 225 void NetworkChangeNotifierWin::SetCurrentConnectionType(
221 ConnectionType connection_type) { 226 ConnectionType connection_type) {
222 base::AutoLock auto_lock(last_computed_connection_type_lock_); 227 base::AutoLock auto_lock(last_computed_connection_type_lock_);
223 last_computed_connection_type_ = connection_type; 228 last_computed_connection_type_ = connection_type;
224 } 229 }
225 230
226 void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) { 231 void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) {
227 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. 232 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed.
228 tracked_objects::ScopedTracker tracking_profile( 233 tracked_objects::ScopedTracker tracking_profile(
229 FROM_HERE_WITH_EXPLICIT_FUNCTION( 234 FROM_HERE_WITH_EXPLICIT_FUNCTION(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return; 334 return;
330 } 335 }
331 if (last_announced_offline_) 336 if (last_announced_offline_)
332 UMA_HISTOGRAM_CUSTOM_COUNTS("NCN.OfflinePolls", offline_polls_, 1, 50, 50); 337 UMA_HISTOGRAM_CUSTOM_COUNTS("NCN.OfflinePolls", offline_polls_, 1, 50, 50);
333 last_announced_offline_ = current_offline; 338 last_announced_offline_ = current_offline;
334 339
335 NotifyObserversOfConnectionTypeChange(); 340 NotifyObserversOfConnectionTypeChange();
336 } 341 }
337 342
338 } // namespace net 343 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698