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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover_unittest.cc

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 years, 1 month 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 #include "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 base::Closure quit_closure_; 337 base::Closure quit_closure_;
338 net::CookieStore* cookie_store_ = nullptr; 338 net::CookieStore* cookie_store_ = nullptr;
339 339
340 DISALLOW_COPY_AND_ASSIGN(RemoveCookieTester); 340 DISALLOW_COPY_AND_ASSIGN(RemoveCookieTester);
341 }; 341 };
342 342
343 class RemoveSafeBrowsingCookieTester : public RemoveCookieTester { 343 class RemoveSafeBrowsingCookieTester : public RemoveCookieTester {
344 public: 344 public:
345 RemoveSafeBrowsingCookieTester() 345 RemoveSafeBrowsingCookieTester()
346 : browser_process_(TestingBrowserProcess::GetGlobal()) { 346 : browser_process_(TestingBrowserProcess::GetGlobal()) {
347 scoped_refptr<SafeBrowsingService> sb_service = 347 scoped_refptr<safe_browsing::SafeBrowsingService> sb_service =
348 SafeBrowsingService::CreateSafeBrowsingService(); 348 safe_browsing::SafeBrowsingService::CreateSafeBrowsingService();
349 browser_process_->SetSafeBrowsingService(sb_service.get()); 349 browser_process_->SetSafeBrowsingService(sb_service.get());
350 sb_service->Initialize(); 350 sb_service->Initialize();
351 base::MessageLoop::current()->RunUntilIdle(); 351 base::MessageLoop::current()->RunUntilIdle();
352 352
353 // Create a cookiemonster that does not have persistant storage, and replace 353 // Create a cookiemonster that does not have persistant storage, and replace
354 // the SafeBrowsingService created one with it. 354 // the SafeBrowsingService created one with it.
355 net::CookieStore* monster = 355 net::CookieStore* monster =
356 content::CreateCookieStore(content::CookieStoreConfig()); 356 content::CreateCookieStore(content::CookieStoreConfig());
357 sb_service->url_request_context()->GetURLRequestContext()-> 357 sb_service->url_request_context()->GetURLRequestContext()->
358 set_cookie_store(monster); 358 set_cookie_store(monster);
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 TEST_F(BrowsingDataRemoverTest, RemoveSameOriginDownloads) { 2109 TEST_F(BrowsingDataRemoverTest, RemoveSameOriginDownloads) {
2110 RemoveDownloadsTester tester(GetProfile()); 2110 RemoveDownloadsTester tester(GetProfile());
2111 const url::Origin expectedOrigin(kOrigin1); 2111 const url::Origin expectedOrigin(kOrigin1);
2112 2112
2113 EXPECT_CALL(*tester.download_manager(), 2113 EXPECT_CALL(*tester.download_manager(),
2114 RemoveDownloadsByOriginAndTime(SameOrigin(expectedOrigin), _, _)); 2114 RemoveDownloadsByOriginAndTime(SameOrigin(expectedOrigin), _, _));
2115 2115
2116 BlockUntilOriginDataRemoved(BrowsingDataRemover::EVERYTHING, 2116 BlockUntilOriginDataRemoved(BrowsingDataRemover::EVERYTHING,
2117 BrowsingDataRemover::REMOVE_DOWNLOADS, kOrigin1); 2117 BrowsingDataRemover::REMOVE_DOWNLOADS, kOrigin1);
2118 } 2118 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698