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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 2257173005: Add "learn more" links to SSL and SB interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update browser tests Created 4 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Implementation of the SafeBrowsingBlockingPage class. 5 // Implementation of the SafeBrowsingBlockingPage class.
6 6
7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 7 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // For malware interstitial pages, we link the problematic URL to Google's 61 // For malware interstitial pages, we link the problematic URL to Google's
62 // diagnostic page. 62 // diagnostic page.
63 #if defined(GOOGLE_CHROME_BUILD) 63 #if defined(GOOGLE_CHROME_BUILD)
64 const char kSbDiagnosticUrl[] = 64 const char kSbDiagnosticUrl[] =
65 "https://www.google.com/safebrowsing/diagnostic?site=%s&client=googlechrome" ; 65 "https://www.google.com/safebrowsing/diagnostic?site=%s&client=googlechrome" ;
66 #else 66 #else
67 const char kSbDiagnosticUrl[] = 67 const char kSbDiagnosticUrl[] =
68 "https://www.google.com/safebrowsing/diagnostic?site=%s&client=chromium"; 68 "https://www.google.com/safebrowsing/diagnostic?site=%s&client=chromium";
69 #endif 69 #endif
70 70
71 // URL for malware and phishing, V2. 71 // URL for the Help Center article on Safe Browsing warnings.
72 const char kLearnMoreMalwareUrlV2[] = 72 const char kLearnMore[] = "https://support.google.com/chrome/answer/99020";
Nathan Parker 2016/08/24 14:54:27 I wonder if there's a way to continue to verify th
felt 2016/08/24 15:48:16 Yeah, that's a good point. I have no idea how to d
73 "https://www.google.com/transparencyreport/safebrowsing/";
74 const char kLearnMorePhishingUrlV2[] =
75 "https://www.google.com/transparencyreport/safebrowsing/";
76 73
77 // After a safe browsing interstitial where the user opted-in to the report 74 // After a safe browsing interstitial where the user opted-in to the report
78 // but clicked "proceed anyway", we delay the call to 75 // but clicked "proceed anyway", we delay the call to
79 // ThreatDetails::FinishCollection() by this much time (in 76 // ThreatDetails::FinishCollection() by this much time (in
80 // milliseconds). 77 // milliseconds).
81 const int64_t kThreatDetailsProceedDelayMilliSeconds = 3000; 78 const int64_t kThreatDetailsProceedDelayMilliSeconds = 3000;
82 79
83 // Constants for the Experience Sampling instrumentation. 80 // Constants for the Experience Sampling instrumentation.
84 const char kEventNameMalware[] = "safebrowsing_interstitial_"; 81 const char kEventNameMalware[] = "safebrowsing_interstitial_";
85 const char kEventNameHarmful[] = "harmful_interstitial_"; 82 const char kEventNameHarmful[] = "harmful_interstitial_";
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 243 }
247 case security_interstitials::CMD_DONT_REPORT: { 244 case security_interstitials::CMD_DONT_REPORT: {
248 // User disabled SB Extended Reporting via the checkbox. 245 // User disabled SB Extended Reporting via the checkbox.
249 SetReportingPreference(false); 246 SetReportingPreference(false);
250 break; 247 break;
251 } 248 }
252 case security_interstitials::CMD_OPEN_HELP_CENTER: { 249 case security_interstitials::CMD_OPEN_HELP_CENTER: {
253 // User pressed "Learn more". 250 // User pressed "Learn more".
254 metrics_helper()->RecordUserInteraction( 251 metrics_helper()->RecordUserInteraction(
255 security_interstitials::MetricsHelper::SHOW_LEARN_MORE); 252 security_interstitials::MetricsHelper::SHOW_LEARN_MORE);
256 GURL learn_more_url( 253 GURL learn_more_url(kLearnMore);
257 interstitial_reason_ == SB_REASON_PHISHING ?
258 kLearnMorePhishingUrlV2 : kLearnMoreMalwareUrlV2);
259 learn_more_url = google_util::AppendGoogleLocaleParam( 254 learn_more_url = google_util::AppendGoogleLocaleParam(
260 learn_more_url, g_browser_process->GetApplicationLocale()); 255 learn_more_url, g_browser_process->GetApplicationLocale());
261 OpenURLParams params(learn_more_url, 256 OpenURLParams params(learn_more_url,
262 Referrer(), 257 Referrer(),
263 CURRENT_TAB, 258 CURRENT_TAB,
264 ui::PAGE_TRANSITION_LINK, 259 ui::PAGE_TRANSITION_LINK,
265 false); 260 false);
266 web_contents()->OpenURL(params); 261 web_contents()->OpenURL(params);
267 break; 262 break;
268 } 263 }
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 l10n_util::GetStringFUTF16(IDS_PHISHING_V4_EXPLANATION_PARAGRAPH, 727 l10n_util::GetStringFUTF16(IDS_PHISHING_V4_EXPLANATION_PARAGRAPH,
733 GetFormattedHostName())); 728 GetFormattedHostName()));
734 load_time_data->SetString( 729 load_time_data->SetString(
735 "finalParagraph", 730 "finalParagraph",
736 l10n_util::GetStringUTF16(IDS_PHISHING_V4_PROCEED_AND_REPORT_PARAGRAPH)); 731 l10n_util::GetStringUTF16(IDS_PHISHING_V4_PROCEED_AND_REPORT_PARAGRAPH));
737 732
738 PopulateExtendedReportingOption(load_time_data); 733 PopulateExtendedReportingOption(load_time_data);
739 } 734 }
740 735
741 } // namespace safe_browsing 736 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698