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

Side by Side Diff: chrome/common/net/network_change_notifier_thread.h

Issue 2802015: Massively simplify the NetworkChangeNotifier infrastructure:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_NET_NETWORK_CHANGE_NOTIFIER_THREAD_H_
6 #define CHROME_COMMON_NET_NETWORK_CHANGE_NOTIFIER_THREAD_H_
7
8 // A simple interface that represents a thread which owns a
9 // NetworkChangeNotifier.
10
11 class MessageLoop;
12
13 namespace net {
14 class NetworkChangeNotifier;
15 } // namespace net
16
17 namespace chrome_common_net {
18
19 // An instance of this interface must live no longer than the thread
20 // it represents and its message loop and network change notifier.
21 class NetworkChangeNotifierThread {
22 public:
23 virtual ~NetworkChangeNotifierThread() {}
24
25 // Returns the message loop for the thread that owns the
26 // NetworkChangeNotifier. Can be called on any thread.
27 virtual MessageLoop* GetMessageLoop() const = 0;
28
29 // Returns the NetworkChangeNotifier of the thread. This method
30 // must be called only from the owning thread (i.e., by posting a
31 // task onto the message loop returned by GetMessageLoop()).
32 virtual net::NetworkChangeNotifier* GetNetworkChangeNotifier() const = 0;
33 };
34
35 } // namespace chrome_common_net
36
37 #endif // CHROME_COMMON_NET_NETWORK_CHANGE_NOTIFIER_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698