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

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

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/net_util_linux.cc ('k') | net/base/upload_file_element_reader.cc » ('j') | 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void NetworkChangeNotifierWin::SetCurrentConnectionType( 220 void NetworkChangeNotifierWin::SetCurrentConnectionType(
221 ConnectionType connection_type) { 221 ConnectionType connection_type) {
222 base::AutoLock auto_lock(last_computed_connection_type_lock_); 222 base::AutoLock auto_lock(last_computed_connection_type_lock_);
223 last_computed_connection_type_ = connection_type; 223 last_computed_connection_type_ = connection_type;
224 } 224 }
225 225
226 void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) { 226 void NetworkChangeNotifierWin::OnObjectSignaled(HANDLE object) {
227 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed. 227 // TODO(vadimt): Remove ScopedTracker below once crbug.com/418183 is fixed.
228 tracked_objects::ScopedTracker tracking_profile( 228 tracked_objects::ScopedTracker tracking_profile(
229 FROM_HERE_WITH_EXPLICIT_FUNCTION( 229 FROM_HERE_WITH_EXPLICIT_FUNCTION(
230 "NetworkChangeNotifierWin_OnObjectSignaled")); 230 "418183 NetworkChangeNotifierWin::OnObjectSignaled"));
231 231
232 DCHECK(CalledOnValidThread()); 232 DCHECK(CalledOnValidThread());
233 DCHECK(is_watching_); 233 DCHECK(is_watching_);
234 is_watching_ = false; 234 is_watching_ = false;
235 235
236 // Start watching for the next address change. 236 // Start watching for the next address change.
237 WatchForAddressChange(); 237 WatchForAddressChange();
238 238
239 NotifyObservers(); 239 NotifyObservers();
240 } 240 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return; 329 return;
330 } 330 }
331 if (last_announced_offline_) 331 if (last_announced_offline_)
332 UMA_HISTOGRAM_CUSTOM_COUNTS("NCN.OfflinePolls", offline_polls_, 1, 50, 50); 332 UMA_HISTOGRAM_CUSTOM_COUNTS("NCN.OfflinePolls", offline_polls_, 1, 50, 50);
333 last_announced_offline_ = current_offline; 333 last_announced_offline_ = current_offline;
334 334
335 NotifyObserversOfConnectionTypeChange(); 335 NotifyObserversOfConnectionTypeChange();
336 } 336 }
337 337
338 } // namespace net 338 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_util_linux.cc ('k') | net/base/upload_file_element_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698