| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/android/webapps/webapp_metrics.h" | |
| 6 | |
| 7 #include "base/android/jni_string.h" | |
| 8 #include "base/metrics/user_metrics.h" | |
| 9 #include "chrome/browser/metrics/rappor/sampling.h" | |
| 10 #include "jni/WebappMetrics_jni.h" | |
| 11 #include "url/gurl.h" | |
| 12 | |
| 13 namespace webapps { | |
| 14 | |
| 15 bool WebappMetrics::Register(JNIEnv* env) { | |
| 16 return RegisterNativesImpl(env); | |
| 17 } | |
| 18 | |
| 19 static void RecordActivityStart(JNIEnv* env, jclass caller, | |
| 20 jstring jurl) { | |
| 21 std::string url = base::android::ConvertJavaStringToUTF8(env, jurl); | |
| 22 base::RecordAction(base::UserMetricsAction("webapps.LaunchedFromHome")); | |
| 23 rappor::SampleDomainAndRegistryFromGURL("webapps.LaunchURL", GURL(url)); | |
| 24 } | |
| 25 | |
| 26 }; // namespace webapps | |
| 27 | |
| OLD | NEW |