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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc

Issue 2230203002: chrome: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed accidental components/ change 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This test creates a safebrowsing service using test safebrowsing database 5 // This test creates a safebrowsing service using test safebrowsing database
6 // and a test protocol manager. It is used to test logics in safebrowsing 6 // and a test protocol manager. It is used to test logics in safebrowsing
7 // service. 7 // service.
8 8
9 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 9 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
10 10
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 std::vector<SBPrefix>* prefix_hits) { 290 std::vector<SBPrefix>* prefix_hits) {
291 bool hit = false; 291 bool hit = false;
292 for (const GURL& url : urls) { 292 for (const GURL& url : urls) {
293 base::hash_map<std::string, Hits>::const_iterator badurls_it = 293 base::hash_map<std::string, Hits>::const_iterator badurls_it =
294 badurls_.find(url.spec()); 294 badurls_.find(url.spec());
295 295
296 if (badurls_it == badurls_.end()) 296 if (badurls_it == badurls_.end())
297 continue; 297 continue;
298 298
299 std::vector<int> list_ids_for_url = badurls_it->second.list_ids; 299 std::vector<int> list_ids_for_url = badurls_it->second.list_ids;
300 if (ContainsValue(list_ids_for_url, list_id0) || 300 if (base::ContainsValue(list_ids_for_url, list_id0) ||
301 ContainsValue(list_ids_for_url, list_id1)) { 301 base::ContainsValue(list_ids_for_url, list_id1)) {
302 prefix_hits->insert(prefix_hits->end(), 302 prefix_hits->insert(prefix_hits->end(),
303 badurls_it->second.prefix_hits.begin(), 303 badurls_it->second.prefix_hits.begin(),
304 badurls_it->second.prefix_hits.end()); 304 badurls_it->second.prefix_hits.end());
305 hit = true; 305 hit = true;
306 } 306 }
307 } 307 }
308 return hit; 308 return hit;
309 } 309 }
310 310
311 std::vector<GURL> UrlsForHashes(const std::vector<SBFullHash>& full_hashes) { 311 std::vector<GURL> UrlsForHashes(const std::vector<SBFullHash>& full_hashes) {
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 content::Source<SafeBrowsingDatabaseManager>( 1757 content::Source<SafeBrowsingDatabaseManager>(
1758 sb_factory_->test_safe_browsing_service()->database_manager().get())); 1758 sb_factory_->test_safe_browsing_service()->database_manager().get()));
1759 BrowserThread::PostTask( 1759 BrowserThread::PostTask(
1760 BrowserThread::IO, FROM_HERE, 1760 BrowserThread::IO, FROM_HERE,
1761 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, 1761 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate,
1762 base::Unretained(this))); 1762 base::Unretained(this)));
1763 observer.Wait(); 1763 observer.Wait();
1764 } 1764 }
1765 1765
1766 } // namespace safe_browsing 1766 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/sessions/session_restore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698