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 #include "chrome/browser/android/rappor/rappor_service_bridge.h" | 5 #include "chrome/browser/android/rappor/rappor_service_bridge.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "components/rappor/rappor_utils.h" | 9 #include "components/rappor/public/rappor_utils.h" |
| 10 #include "components/rappor/rappor_service_impl.h" |
10 #include "jni/RapporServiceBridge_jni.h" | 11 #include "jni/RapporServiceBridge_jni.h" |
11 #include "url/gurl.h" | 12 #include "url/gurl.h" |
12 | 13 |
13 using base::android::JavaParamRef; | 14 using base::android::JavaParamRef; |
14 | 15 |
15 namespace rappor { | 16 namespace rappor { |
16 | 17 |
17 void SampleDomainAndRegistryFromURL(JNIEnv* env, | 18 void SampleDomainAndRegistryFromURL(JNIEnv* env, |
18 const JavaParamRef<jclass>& caller, | 19 const JavaParamRef<jclass>& caller, |
19 const JavaParamRef<jstring>& j_metric, | 20 const JavaParamRef<jstring>& j_metric, |
(...skipping 14 matching lines...) Expand all Loading... |
34 std::string value(base::android::ConvertJavaStringToUTF8(env, j_value)); | 35 std::string value(base::android::ConvertJavaStringToUTF8(env, j_value)); |
35 rappor::SampleString(g_browser_process->rappor_service(), | 36 rappor::SampleString(g_browser_process->rappor_service(), |
36 metric, rappor::UMA_RAPPOR_TYPE, value); | 37 metric, rappor::UMA_RAPPOR_TYPE, value); |
37 } | 38 } |
38 | 39 |
39 bool RegisterRapporServiceBridge(JNIEnv* env) { | 40 bool RegisterRapporServiceBridge(JNIEnv* env) { |
40 return RegisterNativesImpl(env); | 41 return RegisterNativesImpl(env); |
41 } | 42 } |
42 | 43 |
43 } // namespace rappor | 44 } // namespace rappor |
OLD | NEW |