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