Index: net/android/cellular_signal_strength.h |
diff --git a/net/android/cellular_signal_strength.h b/net/android/cellular_signal_strength.h |
index 4165a73da782acd0e38ba19bbd5dec5daba87f5d..8abb180045a1ef8d627694867c7f9c2e182b7510 100644 |
--- a/net/android/cellular_signal_strength.h |
+++ b/net/android/cellular_signal_strength.h |
@@ -8,29 +8,36 @@ |
#include <jni.h> |
#include <stdint.h> |
+#include "base/android/scoped_java_ref.h" |
#include "base/compiler_specific.h" |
+#include "base/macros.h" |
+#include "base/threading/thread_checker.h" |
#include "net/base/net_export.h" |
namespace net { |
namespace android { |
-namespace cellular_signal_strength { |
+class NET_EXPORT_PRIVATE CellularSignalStrength { |
+ public: |
+ CellularSignalStrength(); |
-// Returns true if the signal strength (in dbM) of the currently registered |
-// cellular connection is available, and sets |*signal_strength_dbm| to that |
-// value. |
-NET_EXPORT bool GetSignalStrengthDbm(int32_t* signal_strength_dbm) |
- WARN_UNUSED_RESULT; |
+ ~CellularSignalStrength(); |
-// Returns true if the signal strength level (between 0 and 4, both inclusive) |
-// of the currently registered cellular connection is available, and sets |
-// |*signal_strength_level| to that value with lower value indicating lower |
-// signal strength. |
-NET_EXPORT bool GetSignalStrengthLevel(int32_t* signal_strength_level) |
- WARN_UNUSED_RESULT; |
+ // Returns true if the signal strength level (between 0 and 4, both inclusive) |
+ // of the currently registered cellular connection is available, and sets |
+ // |*signal_strength_level| to that value with lower value indicating lower |
+ // signal strength. |
+ bool GetSignalStrengthLevel(int32_t* signal_strength_level) const |
RyanSturm
2017/03/22 21:51:08
nit: Could be a base::optional.
tbansal1
2017/03/23 18:28:53
Done.
|
+ WARN_UNUSED_RESULT; |
-} // namespace cellular_signal_strength |
+ private: |
+ base::android::ScopedJavaGlobalRef<jobject> j_cellular_signal_strength_; |
+ |
+ base::ThreadChecker thread_checker_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CellularSignalStrength); |
+}; |
} // namespace android |