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

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

Issue 506523002: net : Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 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 | « no previous file | net/base/sdch_dictionary_fetcher.h » ('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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 bool is_watching_; 88 bool is_watching_;
89 89
90 base::win::ObjectWatcher addr_watcher_; 90 base::win::ObjectWatcher addr_watcher_;
91 OVERLAPPED addr_overlapped_; 91 OVERLAPPED addr_overlapped_;
92 92
93 base::OneShotTimer<NetworkChangeNotifierWin> timer_; 93 base::OneShotTimer<NetworkChangeNotifierWin> timer_;
94 94
95 // Number of times WatchForAddressChange has failed in a row. 95 // Number of times WatchForAddressChange has failed in a row.
96 int sequential_failures_; 96 int sequential_failures_;
97 97
98 // Used for calling WatchForAddressChange again on failure.
99 base::WeakPtrFactory<NetworkChangeNotifierWin> weak_factory_;
100
101 // Thread on which we can run DnsConfigService. 98 // Thread on which we can run DnsConfigService.
102 scoped_ptr<DnsConfigServiceThread> dns_config_service_thread_; 99 scoped_ptr<DnsConfigServiceThread> dns_config_service_thread_;
103 100
104 mutable base::Lock last_computed_connection_type_lock_; 101 mutable base::Lock last_computed_connection_type_lock_;
105 ConnectionType last_computed_connection_type_; 102 ConnectionType last_computed_connection_type_;
106 103
107 // Result of IsOffline() when NotifyObserversOfConnectionTypeChange() 104 // Result of IsOffline() when NotifyObserversOfConnectionTypeChange()
108 // was last called. 105 // was last called.
109 bool last_announced_offline_; 106 bool last_announced_offline_;
110 // Number of times polled to check if still offline. 107 // Number of times polled to check if still offline.
111 int offline_polls_; 108 int offline_polls_;
112 109
110 // Used for calling WatchForAddressChange again on failure.
111 base::WeakPtrFactory<NetworkChangeNotifierWin> weak_factory_;
112
113 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierWin); 113 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierWin);
114 }; 114 };
115 115
116 } // namespace net 116 } // namespace net
117 117
118 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_ 118 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/sdch_dictionary_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698