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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc

Issue 2784253004: Componentize safe_browsing: decouple threat_details* from the chrome/ layer. (Closed)
Patch Set: address comment 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 43afdfd53889e5e686d0b635f512351cc5e9e855..eaa8a85991731bd26c7496316afe4ac2b0dd8384 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
#include "base/lazy_instance.h"
+#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/interstitials/chrome_controller_client.h"
#include "chrome/browser/interstitials/chrome_metrics_helper.h"
#include "chrome/browser/profiles/profile.h"
@@ -118,8 +119,13 @@ SafeBrowsingBlockingPage::SafeBrowsingBlockingPage(
ShouldReportThreatDetails(unsafe_resources[0].threat_type) &&
threat_details_.get() == NULL &&
sb_error_ui()->CanShowExtendedReportingOption()) {
- threat_details_ = ThreatDetails::NewThreatDetails(ui_manager, web_contents,
- unsafe_resources[0]);
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ threat_details_ = ThreatDetails::NewThreatDetails(
+ ui_manager, web_contents, unsafe_resources[0],
+ profile->GetRequestContext(),
+ HistoryServiceFactory::GetForProfile(
+ profile, ServiceAccessType::EXPLICIT_ACCESS));
}
}
« 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