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

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

Issue 10551002: TabContentsWrapper -> TabContents, part 56. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Not killing GetSelectedWebContents yet Created 8 years, 6 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 | Annotate | Revision Log
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 "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 TestSafeBrowsingDatabase* db = db_factory_.GetDb(); 366 TestSafeBrowsingDatabase* db = db_factory_.GetDb();
367 SBFullHash full_hash; 367 SBFullHash full_hash;
368 safe_browsing_util::StringToSBFullHash(digest, &full_hash); 368 safe_browsing_util::StringToSBFullHash(digest, &full_hash);
369 db->AddDownloadPrefix(full_hash.prefix); 369 db->AddDownloadPrefix(full_hash.prefix);
370 370
371 TestProtocolManager* pm = pm_factory_.GetProtocolManager(); 371 TestProtocolManager* pm = pm_factory_.GetProtocolManager();
372 pm->SetGetFullHashResponse(hash_result); 372 pm->SetGetFullHashResponse(hash_result);
373 } 373 }
374 374
375 bool ShowingInterstitialPage() { 375 bool ShowingInterstitialPage() {
376 WebContents* contents = browser()->GetSelectedWebContents(); 376 WebContents* contents = browser()->GetActiveWebContents();
377 InterstitialPage* interstitial_page = contents->GetInterstitialPage(); 377 InterstitialPage* interstitial_page = contents->GetInterstitialPage();
378 return interstitial_page != NULL; 378 return interstitial_page != NULL;
379 } 379 }
380 380
381 void IntroduceGetHashDelay(int64 ms) { 381 void IntroduceGetHashDelay(int64 ms) {
382 pm_factory_.GetProtocolManager()->IntroduceDelay(ms); 382 pm_factory_.GetProtocolManager()->IntroduceDelay(ms);
383 } 383 }
384 384
385 int64 DownloadUrlCheckTimeout(SafeBrowsingService* sb_service) { 385 int64 DownloadUrlCheckTimeout(SafeBrowsingService* sb_service) {
386 return sb_service->download_urlcheck_timeout_ms_; 386 return sb_service->download_urlcheck_timeout_ms_;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 759
760 // Delete the Profile. SBS stops again. 760 // Delete the Profile. SBS stops again.
761 pref_service2 = NULL; 761 pref_service2 = NULL;
762 profile2.reset(); 762 profile2.reset();
763 WaitForIOThread(); 763 WaitForIOThread();
764 EXPECT_FALSE(sb_service->enabled()); 764 EXPECT_FALSE(sb_service->enabled());
765 EXPECT_FALSE(csd_service->enabled()); 765 EXPECT_FALSE(csd_service->enabled());
766 } 766 }
767 767
768 } // namespace 768 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/client_side_detection_host_unittest.cc ('k') | chrome/browser/sync/glue/synced_tab_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698