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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 #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 <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 int GetOriginSetMask() { 621 int GetOriginSetMask() {
622 return called_with_details_->origin_set_mask; 622 return called_with_details_->origin_set_mask;
623 } 623 }
624 624
625 quota::MockQuotaManager* GetMockManager() { 625 quota::MockQuotaManager* GetMockManager() {
626 if (!quota_manager_.get()) { 626 if (!quota_manager_.get()) {
627 quota_manager_ = new quota::MockQuotaManager( 627 quota_manager_ = new quota::MockQuotaManager(
628 profile_->IsOffTheRecord(), 628 profile_->IsOffTheRecord(),
629 profile_->GetPath(), 629 profile_->GetPath(),
630 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), 630 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(),
631 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), 631 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB).get(),
632 profile_->GetExtensionSpecialStoragePolicy()); 632 profile_->GetExtensionSpecialStoragePolicy());
633 } 633 }
634 return quota_manager_.get(); 634 return quota_manager_.get();
635 } 635 }
636 636
637 // content::NotificationObserver implementation. 637 // content::NotificationObserver implementation.
638 virtual void Observe(int type, 638 virtual void Observe(int type,
639 const content::NotificationSource& source, 639 const content::NotificationSource& source,
640 const content::NotificationDetails& details) OVERRIDE { 640 const content::NotificationDetails& details) OVERRIDE {
641 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSING_DATA_REMOVED); 641 DCHECK_EQ(type, chrome::NOTIFICATION_BROWSING_DATA_REMOVED);
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 BlockUntilBrowsingDataRemoved( 1392 BlockUntilBrowsingDataRemoved(
1393 BrowsingDataRemover::LAST_HOUR, 1393 BrowsingDataRemover::LAST_HOUR,
1394 BrowsingDataRemover::REMOVE_HISTORY, false); 1394 BrowsingDataRemover::REMOVE_HISTORY, false);
1395 1395
1396 EXPECT_EQ(BrowsingDataRemover::REMOVE_HISTORY, GetRemovalMask()); 1396 EXPECT_EQ(BrowsingDataRemover::REMOVE_HISTORY, GetRemovalMask());
1397 EXPECT_EQ(BrowsingDataHelper::UNPROTECTED_WEB, GetOriginSetMask()); 1397 EXPECT_EQ(BrowsingDataHelper::UNPROTECTED_WEB, GetOriginSetMask());
1398 EXPECT_TRUE(tester.HasOrigin(std::string())); 1398 EXPECT_TRUE(tester.HasOrigin(std::string()));
1399 EXPECT_FALSE(tester.HasOrigin(kWebOrigin)); 1399 EXPECT_FALSE(tester.HasOrigin(kWebOrigin));
1400 EXPECT_TRUE(tester.HasOrigin(kChromeOrigin)); 1400 EXPECT_TRUE(tester.HasOrigin(kChromeOrigin));
1401 } 1401 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | chrome/browser/browsing_data/cookies_tree_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698