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

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

Issue 910953002: Move SafeBrowsing to the blocking pool via an experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix browsertest. Created 5 years, 10 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 <algorithm> 9 #include <algorithm>
10 10
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 base::hash_set<SBPrefix> download_digest_prefix_; 249 base::hash_set<SBPrefix> download_digest_prefix_;
250 }; 250 };
251 251
252 // Factory that creates TestSafeBrowsingDatabase instances. 252 // Factory that creates TestSafeBrowsingDatabase instances.
253 class TestSafeBrowsingDatabaseFactory : public SafeBrowsingDatabaseFactory { 253 class TestSafeBrowsingDatabaseFactory : public SafeBrowsingDatabaseFactory {
254 public: 254 public:
255 TestSafeBrowsingDatabaseFactory() : db_(NULL) {} 255 TestSafeBrowsingDatabaseFactory() : db_(NULL) {}
256 ~TestSafeBrowsingDatabaseFactory() override {} 256 ~TestSafeBrowsingDatabaseFactory() override {}
257 257
258 SafeBrowsingDatabase* CreateSafeBrowsingDatabase( 258 SafeBrowsingDatabase* CreateSafeBrowsingDatabase(
259 const scoped_refptr<base::SequencedTaskRunner>& db_task_runner,
259 bool enable_download_protection, 260 bool enable_download_protection,
260 bool enable_client_side_whitelist, 261 bool enable_client_side_whitelist,
261 bool enable_download_whitelist, 262 bool enable_download_whitelist,
262 bool enable_extension_blacklist, 263 bool enable_extension_blacklist,
263 bool enable_side_effect_free_whitelist, 264 bool enable_side_effect_free_whitelist,
264 bool enable_ip_blacklist, 265 bool enable_ip_blacklist,
265 bool enabled_unwanted_software_list) override { 266 bool enabled_unwanted_software_list) override {
266 db_ = new TestSafeBrowsingDatabase(); 267 db_ = new TestSafeBrowsingDatabase();
267 return db_; 268 return db_;
268 } 269 }
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 content::WindowedNotificationObserver observer( 1237 content::WindowedNotificationObserver observer(
1237 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE, 1238 chrome::NOTIFICATION_SAFE_BROWSING_UPDATE_COMPLETE,
1238 content::Source<SafeBrowsingDatabaseManager>( 1239 content::Source<SafeBrowsingDatabaseManager>(
1239 sb_service_->database_manager().get())); 1240 sb_service_->database_manager().get()));
1240 BrowserThread::PostTask( 1241 BrowserThread::PostTask(
1241 BrowserThread::IO, 1242 BrowserThread::IO,
1242 FROM_HERE, 1243 FROM_HERE,
1243 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this)); 1244 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, this));
1244 observer.Wait(); 1245 observer.Wait();
1245 } 1246 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698