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

Side by Side Diff: components/safe_browsing_db/remote_database_manager.cc

Issue 2890293004: Add the ability to check the CSD Whitelist asynchronously, for PhishGuard. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "components/safe_browsing_db/remote_database_manager.h" 5 #include "components/safe_browsing_db/remote_database_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 base::Bind(&ClientRequest::OnRequestDoneWeak, req->GetWeakPtr()), url, 250 base::Bind(&ClientRequest::OnRequestDoneWeak, req->GetWeakPtr()), url,
251 {SB_THREAT_TYPE_SUBRESOURCE_FILTER}); 251 {SB_THREAT_TYPE_SUBRESOURCE_FILTER});
252 252
253 LogPendingChecks(current_requests_.size()); 253 LogPendingChecks(current_requests_.size());
254 current_requests_.push_back(req.release()); 254 current_requests_.push_back(req.release());
255 255
256 // Defer the resource load. 256 // Defer the resource load.
257 return false; 257 return false;
258 } 258 }
259 259
260 AsyncMatch RemoteSafeBrowsingDatabaseManager::CheckCsdWhitelistUrl(
261 const GURL& url,
262 Client* client) {
263 NOTREACHED();
264 return AsyncMatch::MATCH;
265 }
266
260 bool RemoteSafeBrowsingDatabaseManager::MatchCsdWhitelistUrl(const GURL& url) { 267 bool RemoteSafeBrowsingDatabaseManager::MatchCsdWhitelistUrl(const GURL& url) {
261 NOTREACHED(); 268 NOTREACHED();
262 return true; 269 return true;
263 } 270 }
264 271
265 bool RemoteSafeBrowsingDatabaseManager::MatchDownloadWhitelistString( 272 bool RemoteSafeBrowsingDatabaseManager::MatchDownloadWhitelistString(
266 const std::string& str) { 273 const std::string& str) {
267 NOTREACHED(); 274 NOTREACHED();
268 return true; 275 return true;
269 } 276 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 for (auto* req : to_callback) { 335 for (auto* req : to_callback) {
329 DVLOG(1) << "Stopping: Invoking unfinished req for URL " << req->url(); 336 DVLOG(1) << "Stopping: Invoking unfinished req for URL " << req->url();
330 req->OnRequestDone(SB_THREAT_TYPE_SAFE, ThreatMetadata()); 337 req->OnRequestDone(SB_THREAT_TYPE_SAFE, ThreatMetadata());
331 } 338 }
332 enabled_ = false; 339 enabled_ = false;
333 340
334 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown); 341 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown);
335 } 342 }
336 343
337 } // namespace safe_browsing 344 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698