OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 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 | 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/metrics/launch_metrics.h" | 5 #include "chrome/browser/android/metrics/launch_metrics.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/metrics/histogram_macros.h" | 8 #include "base/metrics/histogram_macros.h" |
9 #include "base/metrics/user_metrics.h" | 9 #include "base/metrics/user_metrics.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "chrome/browser/android/shortcut_info.h" | 11 #include "chrome/browser/android/shortcut_info.h" |
12 #include "chrome/browser/banners/app_banner_settings_helper.h" | 12 #include "chrome/browser/banners/app_banner_settings_helper.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/engagement/site_engagement_service.h" | 14 #include "chrome/browser/engagement/site_engagement_service.h" |
15 #include "chrome/browser/prefs/pref_metrics_service.h" | 15 #include "chrome/browser/prefs/pref_metrics_service.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "components/rappor/rappor_utils.h" | 17 #include "components/rappor/public/rappor_utils.h" |
| 18 #include "components/rappor/rappor_service_impl.h" |
18 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
19 #include "jni/LaunchMetrics_jni.h" | 20 #include "jni/LaunchMetrics_jni.h" |
20 #include "url/gurl.h" | 21 #include "url/gurl.h" |
21 | 22 |
22 using base::android::JavaParamRef; | 23 using base::android::JavaParamRef; |
23 | 24 |
24 namespace metrics { | 25 namespace metrics { |
25 | 26 |
26 enum HomeScreenLaunch { | 27 enum HomeScreenLaunch { |
27 HOME_SCREEN_LAUNCH_STANDALONE = 0, | 28 HOME_SCREEN_LAUNCH_STANDALONE = 0, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 jboolean homepage_is_ntp, | 97 jboolean homepage_is_ntp, |
97 const JavaParamRef<jstring>& jhomepage_url) { | 98 const JavaParamRef<jstring>& jhomepage_url) { |
98 GURL homepage_url(base::android::ConvertJavaStringToUTF8(env, jhomepage_url)); | 99 GURL homepage_url(base::android::ConvertJavaStringToUTF8(env, jhomepage_url)); |
99 PrefMetricsService::RecordHomePageLaunchMetrics( | 100 PrefMetricsService::RecordHomePageLaunchMetrics( |
100 show_home_button, | 101 show_home_button, |
101 homepage_is_ntp, | 102 homepage_is_ntp, |
102 homepage_url); | 103 homepage_url); |
103 } | 104 } |
104 | 105 |
105 }; // namespace metrics | 106 }; // namespace metrics |
OLD | NEW |