| Index: components/safe_browsing_db/remote_database_manager.cc
|
| diff --git a/components/safe_browsing_db/remote_database_manager.cc b/components/safe_browsing_db/remote_database_manager.cc
|
| index 74c6c0c3a13e1b59122da46dda32fed9a97af38b..47d80627032d99d07ce09c2949da84c324a506fb 100644
|
| --- a/components/safe_browsing_db/remote_database_manager.cc
|
| +++ b/components/safe_browsing_db/remote_database_manager.cc
|
| @@ -42,9 +42,9 @@ class RemoteSafeBrowsingDatabaseManager::ClientRequest {
|
|
|
| static void OnRequestDoneWeak(const base::WeakPtr<ClientRequest>& req,
|
| SBThreatType matched_threat_type,
|
| - const std::string& metadata);
|
| + const ThreatMetadata& metadata);
|
| void OnRequestDone(SBThreatType matched_threat_type,
|
| - const std::string& metadata);
|
| + const ThreatMetadata& metadata);
|
|
|
| // Accessors
|
| Client* client() const { return client_; }
|
| @@ -74,7 +74,7 @@ RemoteSafeBrowsingDatabaseManager::ClientRequest::ClientRequest(
|
| void RemoteSafeBrowsingDatabaseManager::ClientRequest::OnRequestDoneWeak(
|
| const base::WeakPtr<ClientRequest>& req,
|
| SBThreatType matched_threat_type,
|
| - const std::string& metadata) {
|
| + const ThreatMetadata& metadata) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| if (!req)
|
| return; // Previously canceled
|
| @@ -83,7 +83,7 @@ void RemoteSafeBrowsingDatabaseManager::ClientRequest::OnRequestDoneWeak(
|
|
|
| void RemoteSafeBrowsingDatabaseManager::ClientRequest::OnRequestDone(
|
| SBThreatType matched_threat_type,
|
| - const std::string& metadata) {
|
| + const ThreatMetadata& metadata) {
|
| DVLOG(1) << "OnRequestDone took " << timer_.Elapsed().InMilliseconds()
|
| << " ms for client " << client_ << " and URL " << url_;
|
| client_->OnCheckBrowseUrlResult(url_, matched_threat_type, metadata);
|
| @@ -251,7 +251,7 @@ bool RemoteSafeBrowsingDatabaseManager::CheckBrowseUrl(const GURL& url,
|
| DVLOG(1) << "Checking for client " << client << " and URL " << url;
|
| SafeBrowsingApiHandler* api_handler = SafeBrowsingApiHandler::GetInstance();
|
| // This shouldn't happen since SafeBrowsingResourceThrottle checks
|
| - // IsSupported() ealier.
|
| + // IsSupported() earlier.
|
| DCHECK(api_handler) << "SafeBrowsingApiHandler was never constructed";
|
| api_handler->StartURLCheck(
|
| base::Bind(&ClientRequest::OnRequestDoneWeak, req->GetWeakPtr()), url,
|
| @@ -298,7 +298,7 @@ void RemoteSafeBrowsingDatabaseManager::StopOnIOThread(bool shutdown) {
|
| std::vector<ClientRequest*> to_callback(current_requests_);
|
| for (auto req : to_callback) {
|
| DVLOG(1) << "Stopping: Invoking unfinished req for URL " << req->url();
|
| - req->OnRequestDone(SB_THREAT_TYPE_SAFE, std::string());
|
| + req->OnRequestDone(SB_THREAT_TYPE_SAFE, ThreatMetadata());
|
| }
|
| enabled_ = false;
|
|
|
|
|