Chromium Code Reviews| Index: chrome/browser/safe_browsing/threat_details.cc |
| diff --git a/chrome/browser/safe_browsing/threat_details.cc b/chrome/browser/safe_browsing/threat_details.cc |
| index 27929cb652df7664d90101349be13cadab9cc6b7..d5b8467d14a5c89fe827fc32740d03c851a4ce2b 100644 |
| --- a/chrome/browser/safe_browsing/threat_details.cc |
| +++ b/chrome/browser/safe_browsing/threat_details.cc |
| @@ -15,9 +15,11 @@ |
| #include "base/macros.h" |
| #include "base/metrics/histogram_macros.h" |
| #include "base/strings/string_util.h" |
| +#include "chrome/browser/history/history_service_factory.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/safe_browsing/threat_details_cache.h" |
| #include "chrome/browser/safe_browsing/threat_details_history.h" |
| +#include "components/history/core/browser/history_service.h" |
| #include "components/safe_browsing/common/safebrowsing_messages.h" |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/navigation_controller.h" |
| @@ -179,8 +181,13 @@ ThreatDetails::ThreatDetails(BaseUIManager* ui_manager, |
| did_proceed_(false), |
| num_visits_(0), |
| ambiguous_dom_(false), |
| - cache_collector_(new ThreatDetailsCacheCollector), |
| - redirects_collector_(new ThreatDetailsRedirectsCollector(profile_)) { |
| + cache_collector_(new ThreatDetailsCacheCollector) { |
| + history::HistoryService* history_service = |
| + HistoryServiceFactory::GetForProfile(profile_, |
| + ServiceAccessType::EXPLICIT_ACCESS); |
| + redirects_collector_ = new ThreatDetailsRedirectsCollector( |
|
Jialiu Lin
2017/04/05 18:19:47
If history_service is not available, maybe we don'
timvolodine
2017/04/06 14:15:23
Yes that would seem reasonable, because the redire
|
| + history_service ? history_service->AsWeakPtr() |
| + : base::WeakPtr<history::HistoryService>()); |
| StartCollection(); |
| } |