| Index: chrome/browser/browsing_data_remover_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/browsing_data_remover_unittest.cc (revision 122721)
|
| +++ chrome/browser/browsing_data_remover_unittest.cc (working copy)
|
| @@ -292,6 +292,8 @@
|
| db_thread_(BrowserThread::DB, &message_loop_),
|
| webkit_thread_(BrowserThread::WEBKIT_DEPRECATED, &message_loop_),
|
| file_thread_(BrowserThread::FILE, &message_loop_),
|
| + file_user_blocking_thread_(
|
| + BrowserThread::FILE_USER_BLOCKING, &message_loop_),
|
| io_thread_(BrowserThread::IO, &message_loop_),
|
| profile_(new TestingProfile()) {
|
| registrar_.Add(this, chrome::NOTIFICATION_BROWSING_DATA_REMOVED,
|
| @@ -317,6 +319,7 @@
|
| BrowsingDataRemover* remover = new BrowsingDataRemover(
|
| profile_.get(), period,
|
| base::Time::Now() + base::TimeDelta::FromMilliseconds(10));
|
| + remover->OverrideQuotaManagerForTesting(GetMockManager());
|
| remover->AddObserver(tester);
|
|
|
| called_with_details_.reset(new BrowsingDataRemover::NotificationDetails());
|
| @@ -333,6 +336,7 @@
|
| BrowsingDataRemover* remover = new BrowsingDataRemover(
|
| profile_.get(), period,
|
| base::Time::Now() + base::TimeDelta::FromMilliseconds(10));
|
| + remover->OverrideQuotaManagerForTesting(GetMockManager());
|
| remover->AddObserver(tester);
|
|
|
| called_with_details_.reset(new BrowsingDataRemover::NotificationDetails());
|
| @@ -355,15 +359,15 @@
|
| }
|
|
|
| quota::MockQuotaManager* GetMockManager() {
|
| - if (profile_->GetQuotaManager() == NULL) {
|
| - profile_->SetQuotaManager(new quota::MockQuotaManager(
|
| + if (!quota_manager_) {
|
| + quota_manager_ = new quota::MockQuotaManager(
|
| profile_->IsOffTheRecord(),
|
| profile_->GetPath(),
|
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
|
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
|
| - profile_->GetExtensionSpecialStoragePolicy()));
|
| + profile_->GetExtensionSpecialStoragePolicy());
|
| }
|
| - return (quota::MockQuotaManager*) profile_->GetQuotaManager();
|
| + return quota_manager_;
|
| }
|
|
|
| // content::NotificationObserver implementation.
|
| @@ -392,8 +396,10 @@
|
| content::TestBrowserThread db_thread_;
|
| content::TestBrowserThread webkit_thread_;
|
| content::TestBrowserThread file_thread_;
|
| + content::TestBrowserThread file_user_blocking_thread_;
|
| content::TestBrowserThread io_thread_;
|
| scoped_ptr<TestingProfile> profile_;
|
| + scoped_refptr<quota::MockQuotaManager> quota_manager_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemoverTest);
|
| };
|
|
|