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

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

Issue 2831583006: Fix incorrect |main_frame_url_| parameter to BaseBlockingPage (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 SafeBrowsingBlockingPage::SafeBrowsingBlockingPage( 100 SafeBrowsingBlockingPage::SafeBrowsingBlockingPage(
101 BaseUIManager* ui_manager, 101 BaseUIManager* ui_manager,
102 WebContents* web_contents, 102 WebContents* web_contents,
103 const GURL& main_frame_url, 103 const GURL& main_frame_url,
104 const UnsafeResourceList& unsafe_resources, 104 const UnsafeResourceList& unsafe_resources,
105 const SafeBrowsingErrorUI::SBErrorDisplayOptions& display_options) 105 const SafeBrowsingErrorUI::SBErrorDisplayOptions& display_options)
106 : BaseBlockingPage( 106 : BaseBlockingPage(
107 ui_manager, 107 ui_manager,
108 web_contents, 108 web_contents,
109 unsafe_resources[0].url, 109 main_frame_url,
110 unsafe_resources, 110 unsafe_resources,
111 CreateControllerClient(web_contents, unsafe_resources, ui_manager), 111 CreateControllerClient(web_contents, unsafe_resources, ui_manager),
112 display_options) { 112 display_options) {
113 // Start computing threat details. They will be sent only 113 // Start computing threat details. They will be sent only
114 // if the user opts-in on the blocking page later. 114 // if the user opts-in on the blocking page later.
115 // If there's more than one malicious resources, it means the user 115 // If there's more than one malicious resources, it means the user
116 // clicked through the first warning, so we don't prepare additional 116 // clicked through the first warning, so we don't prepare additional
117 // reports. 117 // reports.
118 if (unsafe_resources.size() == 1 && 118 if (unsafe_resources.size() == 1 &&
119 ShouldReportThreatDetails(unsafe_resources[0].threat_type) && 119 ShouldReportThreatDetails(unsafe_resources[0].threat_type) &&
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 web_contents, unsafe_resources[0].url, 269 web_contents, unsafe_resources[0].url,
270 GetReportingInfo(unsafe_resources), 270 GetReportingInfo(unsafe_resources),
271 GetSamplingEventName(GetInterstitialReason(unsafe_resources))); 271 GetSamplingEventName(GetInterstitialReason(unsafe_resources)));
272 272
273 return base::MakeUnique<SecurityInterstitialControllerClient>( 273 return base::MakeUnique<SecurityInterstitialControllerClient>(
274 web_contents, std::move(metrics_helper), profile->GetPrefs(), 274 web_contents, std::move(metrics_helper), profile->GetPrefs(),
275 ui_manager->app_locale(), ui_manager->default_safe_page()); 275 ui_manager->app_locale(), ui_manager->default_safe_page());
276 } 276 }
277 277
278 } // namespace safe_browsing 278 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698