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

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

Issue 11360108: Start calculating new combined NetworkChangeNotifier signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to default argument constructor Created 8 years 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
« no previous file with comments | « net/base/network_change_notifier_mac.cc ('k') | net/base/network_change_notifier_win.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 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_
6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Forwards connection type notifications to parent class. 65 // Forwards connection type notifications to parent class.
66 void NotifyParentOfConnectionTypeChange(); 66 void NotifyParentOfConnectionTypeChange();
67 67
68 // Tries to start listening for a single subsequent address change. Returns 68 // Tries to start listening for a single subsequent address change. Returns
69 // false on failure. The caller is responsible for updating |is_watching_|. 69 // false on failure. The caller is responsible for updating |is_watching_|.
70 // Virtual for unit tests. Must only be called on the thread |this| was 70 // Virtual for unit tests. Must only be called on the thread |this| was
71 // created on. 71 // created on.
72 virtual bool WatchForAddressChangeInternal(); 72 virtual bool WatchForAddressChangeInternal();
73 73
74 static NetworkChangeCalculatorParams NetworkChangeCalculatorParamsWin();
75
74 // All member variables may only be accessed on the thread |this| was created 76 // All member variables may only be accessed on the thread |this| was created
75 // on. 77 // on.
76 78
77 // False when not currently watching for network change events. This only 79 // False when not currently watching for network change events. This only
78 // happens on initialization and when WatchForAddressChangeInternal fails and 80 // happens on initialization and when WatchForAddressChangeInternal fails and
79 // there is a pending task to try again. Needed for safe cleanup. 81 // there is a pending task to try again. Needed for safe cleanup.
80 bool is_watching_; 82 bool is_watching_;
81 83
82 base::win::ObjectWatcher addr_watcher_; 84 base::win::ObjectWatcher addr_watcher_;
83 OVERLAPPED addr_overlapped_; 85 OVERLAPPED addr_overlapped_;
(...skipping 14 matching lines...) Expand all
98 bool last_announced_offline_; 100 bool last_announced_offline_;
99 // Number of times polled to check if still offline. 101 // Number of times polled to check if still offline.
100 int offline_polls_; 102 int offline_polls_;
101 103
102 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierWin); 104 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierWin);
103 }; 105 };
104 106
105 } // namespace net 107 } // namespace net
106 108
107 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ 109 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_mac.cc ('k') | net/base/network_change_notifier_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698