OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_ANDROID_DATA_USAGE_EXTERNAL_DATA_USE_OBSERVER_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_DATA_USAGE_EXTERNAL_DATA_USE_OBSERVER_BRIDGE_H_ |
6 #define CHROME_BROWSER_ANDROID_DATA_USAGE_EXTERNAL_DATA_USE_OBSERVER_BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_DATA_USAGE_EXTERNAL_DATA_USE_OBSERVER_BRIDGE_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 const base::android::JavaParamRef<jobjectArray>& domain_path_regex, | 68 const base::android::JavaParamRef<jobjectArray>& domain_path_regex, |
69 const base::android::JavaParamRef<jobjectArray>& label); | 69 const base::android::JavaParamRef<jobjectArray>& label); |
70 | 70 |
71 // Reports data use to Java. Returns result asynchronously via | 71 // Reports data use to Java. Returns result asynchronously via |
72 // OnReportDataUseDone. ReportDataUse should not be called if a | 72 // OnReportDataUseDone. ReportDataUse should not be called if a |
73 // request to submit data use is already in progress. | 73 // request to submit data use is already in progress. |
74 void ReportDataUse(const std::string& label, | 74 void ReportDataUse(const std::string& label, |
75 const std::string& tag, | 75 const std::string& tag, |
76 net::NetworkChangeNotifier::ConnectionType connection_type, | 76 net::NetworkChangeNotifier::ConnectionType connection_type, |
77 const std::string& mcc_mnc, | 77 const std::string& mcc_mnc, |
78 const base::Time& start_time, | 78 const base::Time start_time, |
tbansal1
2016/07/21 15:45:01
const not needed (although it is unrelated to this
Raj
2016/07/21 17:56:56
Done.
| |
79 const base::Time& end_time, | 79 const base::Time end_time, |
80 int64_t bytes_downloaded, | 80 int64_t bytes_downloaded, |
81 int64_t bytes_uploaded) const; | 81 int64_t bytes_uploaded) const; |
82 | 82 |
83 // Called by Java when the reporting of data usage has finished. |success| | 83 // Called by Java when the reporting of data usage has finished. |success| |
84 // is true if the request was successfully submitted to the external data | 84 // is true if the request was successfully submitted to the external data |
85 // use observer by Java. | 85 // use observer by Java. |
86 void OnReportDataUseDone(JNIEnv* env, | 86 void OnReportDataUseDone(JNIEnv* env, |
87 const base::android::JavaParamRef<jobject>& obj, | 87 const base::android::JavaParamRef<jobject>& obj, |
88 bool success); | 88 bool success); |
89 | 89 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
125 DISALLOW_COPY_AND_ASSIGN(ExternalDataUseObserverBridge); | 125 DISALLOW_COPY_AND_ASSIGN(ExternalDataUseObserverBridge); |
126 }; | 126 }; |
127 | 127 |
128 bool RegisterExternalDataUseObserver(JNIEnv* env); | 128 bool RegisterExternalDataUseObserver(JNIEnv* env); |
129 | 129 |
130 } // namespace android | 130 } // namespace android |
131 | 131 |
132 } // namespace chrome | 132 } // namespace chrome |
133 | 133 |
134 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_EXTERNAL_DATA_USE_OBSERVER_BRIDGE_H _ | 134 #endif // CHROME_BROWSER_ANDROID_DATA_USAGE_EXTERNAL_DATA_USE_OBSERVER_BRIDGE_H _ |
OLD | NEW |