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

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

Issue 1306653003: Add connection type to NCN::MaxBandwidthChanged (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra space in comment Created 5 years, 3 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_unittest.cc ('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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (last_announced_offline_ && current_offline && offline_polls_ <= 20) { 311 if (last_announced_offline_ && current_offline && offline_polls_ <= 20) {
312 timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(1), this, 312 timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(1), this,
313 &NetworkChangeNotifierWin::NotifyParentOfConnectionTypeChange); 313 &NetworkChangeNotifierWin::NotifyParentOfConnectionTypeChange);
314 return; 314 return;
315 } 315 }
316 if (last_announced_offline_) 316 if (last_announced_offline_)
317 UMA_HISTOGRAM_CUSTOM_COUNTS("NCN.OfflinePolls", offline_polls_, 1, 50, 50); 317 UMA_HISTOGRAM_CUSTOM_COUNTS("NCN.OfflinePolls", offline_polls_, 1, 50, 50);
318 last_announced_offline_ = current_offline; 318 last_announced_offline_ = current_offline;
319 319
320 NotifyObserversOfConnectionTypeChange(); 320 NotifyObserversOfConnectionTypeChange();
321 double max_bandwidth_mbps = 0.0;
322 ConnectionType connection_type = CONNECTION_NONE;
323 GetCurrentMaxBandwidthAndConnectionType(&max_bandwidth_mbps,
324 &connection_type);
325 NotifyObserversOfMaxBandwidthChange(max_bandwidth_mbps, connection_type);
321 } 326 }
322 327
323 } // namespace net 328 } // namespace net
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698