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

Side by Side Diff: net/android/network_change_notifier_factory_android.h

Issue 10979048: Fix potential threading issues in NetworkChangeNotifierAndroid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
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_ANDROID_NETWORK_CHANGE_NOTIFIER_FACTORY_ANDROID_H_ 5 #ifndef NET_ANDROID_NETWORK_CHANGE_NOTIFIER_FACTORY_ANDROID_H_
6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_FACTORY_ANDROID_H_ 6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_FACTORY_ANDROID_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "net/base/network_change_notifier_factory.h" 9 #include "net/base/network_change_notifier_factory.h"
10 10
11 namespace base {
12
13 class TaskRunner;
14
15 } // namespace base
16
11 namespace net { 17 namespace net {
12 18
13 class NetworkChangeNotifier; 19 class NetworkChangeNotifier;
14 20
15 // NetworkChangeNotifierFactory creates Android-specific specialization of 21 // NetworkChangeNotifierFactory creates Android-specific specialization of
16 // NetworkChangeNotifier. 22 // NetworkChangeNotifier.
17 class NetworkChangeNotifierFactoryAndroid : 23 class NetworkChangeNotifierFactoryAndroid :
18 public NetworkChangeNotifierFactory { 24 public NetworkChangeNotifierFactory {
19 public: 25 public:
20 NetworkChangeNotifierFactoryAndroid(); 26 NetworkChangeNotifierFactoryAndroid(base::TaskRunner* ui_task_runner);
21 virtual ~NetworkChangeNotifierFactoryAndroid(); 27 virtual ~NetworkChangeNotifierFactoryAndroid();
22 28
23 // Overrides of NetworkChangeNotifierFactory. 29 // Overrides of NetworkChangeNotifierFactory.
24 virtual NetworkChangeNotifier* CreateInstance() OVERRIDE; 30 virtual NetworkChangeNotifier* CreateInstance() OVERRIDE;
31
32 private:
33 base::TaskRunner* const ui_task_runner_;
25 }; 34 };
26 35
27 } // namespace net 36 } // namespace net
28 37
29 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_FACTORY_H_ 38 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_FACTORY_H_
OLDNEW
« no previous file with comments | « net/android/network_change_notifier_android_unittest.cc ('k') | net/android/network_change_notifier_factory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698