Index: components/safe_browsing/password_protection/password_protection_request.cc |
diff --git a/components/safe_browsing/password_protection/password_protection_request.cc b/components/safe_browsing/password_protection/password_protection_request.cc |
index e4c7183089a8d73383533279190072f57d714598..042414f0a0c3b78e9d7554989b507465f49f7eb9 100644 |
--- a/components/safe_browsing/password_protection/password_protection_request.cc |
+++ b/components/safe_browsing/password_protection/password_protection_request.cc |
@@ -7,17 +7,19 @@ |
#include "base/memory/weak_ptr.h" |
#include "base/metrics/histogram_macros.h" |
#include "components/data_use_measurement/core/data_use_user_data.h" |
-#include "components/safe_browsing_db/database_manager.h" |
+#include "content/public/browser/web_contents.h" |
#include "net/base/escape.h" |
#include "net/base/load_flags.h" |
#include "net/base/url_util.h" |
#include "net/http/http_status_code.h" |
using content::BrowserThread; |
+using content::WebContents; |
namespace safe_browsing { |
PasswordProtectionRequest::PasswordProtectionRequest( |
+ WebContents* web_contents, |
const GURL& main_frame_url, |
const GURL& password_form_action, |
const GURL& password_form_frame_url, |
@@ -25,13 +27,13 @@ PasswordProtectionRequest::PasswordProtectionRequest( |
LoginReputationClientRequest::TriggerType type, |
PasswordProtectionService* pps, |
int request_timeout_in_ms) |
- : main_frame_url_(main_frame_url), |
+ : web_contents_(web_contents), |
+ main_frame_url_(main_frame_url), |
password_form_action_(password_form_action), |
password_form_frame_url_(password_form_frame_url), |
saved_domain_(saved_domain), |
request_type_(type), |
password_protection_service_(pps), |
- database_manager_(password_protection_service_->database_manager()), |
request_timeout_in_ms_(request_timeout_in_ms), |
weakptr_factory_(this) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
@@ -49,9 +51,7 @@ void PasswordProtectionRequest::Start() { |
void PasswordProtectionRequest::CheckWhitelistOnUIThread() { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
bool* match_whitelist = new bool(false); |
- // TODO(jialiul): Move CheckCsdWhitelistOnIOThread to |
- // PasswordProtectionRequest class, since PasswordProtectionService no longer |
- // need it. |
+ |
tracker_.PostTaskAndReply( |
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO).get(), FROM_HERE, |
base::Bind(&PasswordProtectionService::CheckCsdWhitelistOnIOThread, |