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

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

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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
« no previous file with comments | « components/rappor/rappor_service.cc ('k') | components/safe_browsing_db/v4_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/database_manager.h" 5 #include "components/safe_browsing_db/database_manager.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h" 8 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 v4_get_hash_protocol_manager_ = NULL; 94 v4_get_hash_protocol_manager_ = NULL;
95 } 95 }
96 96
97 // Delete pending checks, calling back any clients with empty metadata. 97 // Delete pending checks, calling back any clients with empty metadata.
98 for (auto* check : api_checks_) { 98 for (auto* check : api_checks_) {
99 if (check->client()) { 99 if (check->client()) {
100 check->client()-> 100 check->client()->
101 OnCheckApiBlacklistUrlResult(check->url(), ThreatMetadata()); 101 OnCheckApiBlacklistUrlResult(check->url(), ThreatMetadata());
102 } 102 }
103 } 103 }
104 STLDeleteElements(&api_checks_); 104 base::STLDeleteElements(&api_checks_);
105 } 105 }
106 106
107 SafeBrowsingDatabaseManager::ApiCheckSet::iterator 107 SafeBrowsingDatabaseManager::ApiCheckSet::iterator
108 SafeBrowsingDatabaseManager::FindClientApiCheck(Client* client) { 108 SafeBrowsingDatabaseManager::FindClientApiCheck(Client* client) {
109 DCHECK_CURRENTLY_ON(BrowserThread::IO); 109 DCHECK_CURRENTLY_ON(BrowserThread::IO);
110 for (ApiCheckSet::iterator it = api_checks_.begin(); 110 for (ApiCheckSet::iterator it = api_checks_.begin();
111 it != api_checks_.end(); ++it) { 111 it != api_checks_.end(); ++it) {
112 if ((*it)->client() == client) { 112 if ((*it)->client() == client) {
113 return it; 113 return it;
114 } 114 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 const std::vector<SBFullHashResult>& cached_results, 369 const std::vector<SBFullHashResult>& cached_results,
370 Client* client) 370 Client* client)
371 : url_(url), prefixes_(prefixes), full_hashes_(full_hashes), 371 : url_(url), prefixes_(prefixes), full_hashes_(full_hashes),
372 cached_results_(cached_results), client_(client) { 372 cached_results_(cached_results), client_(client) {
373 } 373 }
374 374
375 SafeBrowsingDatabaseManager::SafeBrowsingApiCheck::~SafeBrowsingApiCheck() { 375 SafeBrowsingDatabaseManager::SafeBrowsingApiCheck::~SafeBrowsingApiCheck() {
376 } 376 }
377 377
378 } // namespace safe_browsing 378 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/rappor/rappor_service.cc ('k') | components/safe_browsing_db/v4_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698