Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: chrome/browser/android/webapps/webapp_metrics.cc

Issue 989523003: Add metrics for tracking how Chrome handled shortcut launches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renaming Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/android/webapps/webapp_metrics.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « chrome/browser/android/webapps/webapp_metrics.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698