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

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

Issue 2540563002: Move SafeBrowsingUIManager::UnsafeResource to security_interstitials namespace (Closed)
Patch Set: rebase update Created 4 years 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 private: 456 private:
457 // Owned by the SafebrowsingService. 457 // Owned by the SafebrowsingService.
458 TestProtocolManager* pm_; 458 TestProtocolManager* pm_;
459 }; 459 };
460 460
461 class MockObserver : public SafeBrowsingUIManager::Observer { 461 class MockObserver : public SafeBrowsingUIManager::Observer {
462 public: 462 public:
463 MockObserver() {} 463 MockObserver() {}
464 virtual ~MockObserver() {} 464 virtual ~MockObserver() {}
465 MOCK_METHOD1(OnSafeBrowsingHit, 465 MOCK_METHOD1(OnSafeBrowsingHit,
466 void(const SafeBrowsingUIManager::UnsafeResource&)); 466 void(const security_interstitials::UnsafeResource&));
467 }; 467 };
468 468
469 MATCHER_P(IsUnsafeResourceFor, url, "") { 469 MATCHER_P(IsUnsafeResourceFor, url, "") {
470 return (arg.url.spec() == url.spec() && 470 return (arg.url.spec() == url.spec() &&
471 arg.threat_type != SB_THREAT_TYPE_SAFE); 471 arg.threat_type != SB_THREAT_TYPE_SAFE);
472 } 472 }
473 473
474 class ServiceEnabledHelper : public base::ThreadTestHelper { 474 class ServiceEnabledHelper : public base::ThreadTestHelper {
475 public: 475 public:
476 ServiceEnabledHelper( 476 ServiceEnabledHelper(
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 content::Source<SafeBrowsingDatabaseManager>( 1824 content::Source<SafeBrowsingDatabaseManager>(
1825 sb_factory_->test_safe_browsing_service()->database_manager().get())); 1825 sb_factory_->test_safe_browsing_service()->database_manager().get()));
1826 BrowserThread::PostTask( 1826 BrowserThread::PostTask(
1827 BrowserThread::IO, FROM_HERE, 1827 BrowserThread::IO, FROM_HERE,
1828 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate, 1828 base::Bind(&SafeBrowsingDatabaseManagerCookieTest::ForceUpdate,
1829 base::Unretained(this))); 1829 base::Unretained(this)));
1830 observer.Wait(); 1830 observer.Wait();
1831 } 1831 }
1832 1832
1833 } // namespace safe_browsing 1833 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc ('k') | chrome/browser/safe_browsing/threat_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698