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

Side by Side Diff: chrome/browser/interstitials/chrome_metrics_helper.cc

Issue 2575623002: Componentizing SafeBrowsingBlockingPage Part 1 (Closed)
Patch Set: address comments from estark@ Created 4 years 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
OLDNEW
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/interstitials/chrome_metrics_helper.h" 5 #include "chrome/browser/interstitials/chrome_metrics_helper.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/history/history_service_factory.h" 8 #include "chrome/browser/history/history_service_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/features.h" 10 #include "chrome/common/features.h"
11 #include "components/history/core/browser/history_service.h" 11 #include "components/history/core/browser/history_service.h"
12 #include "components/rappor/rappor_service_impl.h"
13 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
14 #include "extensions/features/features.h" 13 #include "extensions/features/features.h"
15 14
16 #if BUILDFLAG(ENABLE_EXTENSIONS) 15 #if BUILDFLAG(ENABLE_EXTENSIONS)
17 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s ampling.h" 16 #include "chrome/browser/extensions/api/experience_sampling_private/experience_s ampling.h"
18 #endif 17 #endif
19 18
20 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) 19 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
21 #include "chrome/browser/ssl/captive_portal_metrics_recorder.h" 20 #include "chrome/browser/ssl/captive_portal_metrics_recorder.h"
22 #endif 21 #endif
23 22
24 ChromeMetricsHelper::ChromeMetricsHelper( 23 ChromeMetricsHelper::ChromeMetricsHelper(
25 content::WebContents* web_contents, 24 content::WebContents* web_contents,
26 const GURL& request_url, 25 const GURL& request_url,
27 const security_interstitials::MetricsHelper::ReportDetails settings, 26 const security_interstitials::MetricsHelper::ReportDetails settings,
28 const std::string& sampling_event_name) 27 const std::string& sampling_event_name)
29 : security_interstitials::MetricsHelper( 28 : security_interstitials::MetricsHelper(
30 request_url, 29 request_url,
31 settings, 30 settings,
32 HistoryServiceFactory::GetForProfile( 31 HistoryServiceFactory::GetForProfile(
33 Profile::FromBrowserContext(web_contents->GetBrowserContext()), 32 Profile::FromBrowserContext(web_contents->GetBrowserContext()),
34 ServiceAccessType::EXPLICIT_ACCESS), 33 ServiceAccessType::EXPLICIT_ACCESS)),
35 g_browser_process->rappor_service()
36 ? g_browser_process->rappor_service()->AsWeakPtr()
37 : base::WeakPtr<rappor::RapporService>()),
38 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) || BUILDFLAG(ENABLE_EXTENSIONS) 34 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) || BUILDFLAG(ENABLE_EXTENSIONS)
39 web_contents_(web_contents), 35 web_contents_(web_contents),
40 #endif 36 #endif
41 request_url_(request_url), 37 request_url_(request_url),
42 sampling_event_name_(sampling_event_name) { 38 sampling_event_name_(sampling_event_name) {
43 DCHECK(!sampling_event_name_.empty()); 39 DCHECK(!sampling_event_name_.empty());
44 } 40 }
45 41
46 ChromeMetricsHelper::~ChromeMetricsHelper() {} 42 ChromeMetricsHelper::~ChromeMetricsHelper() {}
47 43
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 case SET_EXTENDED_REPORTING_ENABLED: 107 case SET_EXTENDED_REPORTING_ENABLED:
112 case SET_EXTENDED_REPORTING_DISABLED: 108 case SET_EXTENDED_REPORTING_DISABLED:
113 case EXTENDED_REPORTING_IS_ENABLED: 109 case EXTENDED_REPORTING_IS_ENABLED:
114 case REPORT_PHISHING_ERROR: 110 case REPORT_PHISHING_ERROR:
115 case SHOW_WHITEPAPER: 111 case SHOW_WHITEPAPER:
116 case MAX_INTERACTION: 112 case MAX_INTERACTION:
117 break; 113 break;
118 } 114 }
119 #endif 115 #endif
120 } 116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698