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

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

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 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
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_DELEGATE_ANDROID_H_ 5 #ifndef NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_ANDROID_H_
6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_ANDROID_H_ 6 #define NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_ANDROID_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 friend class BaseNetworkChangeNotifierAndroidTest; 76 friend class BaseNetworkChangeNotifierAndroidTest;
77 77
78 void SetCurrentConnectionType(ConnectionType connection_type); 78 void SetCurrentConnectionType(ConnectionType connection_type);
79 void SetCurrentMaxBandwidth(double max_bandwidth); 79 void SetCurrentMaxBandwidth(double max_bandwidth);
80 80
81 // Methods calling the Java side exposed for testing. 81 // Methods calling the Java side exposed for testing.
82 void SetOnline(); 82 void SetOnline();
83 void SetOffline(); 83 void SetOffline();
84 84
85 base::ThreadChecker thread_checker_; 85 base::ThreadChecker thread_checker_;
86 scoped_refptr<ObserverListThreadSafe<Observer> > observers_; 86 scoped_refptr<base::ObserverListThreadSafe<Observer>> observers_;
87 scoped_refptr<base::SingleThreadTaskRunner> jni_task_runner_; 87 scoped_refptr<base::SingleThreadTaskRunner> jni_task_runner_;
88 base::android::ScopedJavaGlobalRef<jobject> java_network_change_notifier_; 88 base::android::ScopedJavaGlobalRef<jobject> java_network_change_notifier_;
89 mutable base::Lock connection_lock_; // Protects the state below. 89 mutable base::Lock connection_lock_; // Protects the state below.
90 ConnectionType connection_type_; 90 ConnectionType connection_type_;
91 double connection_max_bandwidth_; 91 double connection_max_bandwidth_;
92 92
93 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierDelegateAndroid); 93 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierDelegateAndroid);
94 }; 94 };
95 95
96 } // namespace net 96 } // namespace net
97 97
98 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_H_ 98 #endif // NET_ANDROID_NETWORK_CHANGE_NOTIFIER_DELEGATE_H_
OLDNEW
« no previous file with comments | « net/android/network_change_notifier_android_unittest.cc ('k') | net/android/network_change_notifier_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698