OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/mock_browsing_data_quota_helper.h" | 5 #include "chrome/browser/mock_browsing_data_quota_helper.h" |
6 | 6 |
| 7 using content::BrowserThread; |
| 8 |
7 MockBrowsingDataQuotaHelper::MockBrowsingDataQuotaHelper(Profile* profile) | 9 MockBrowsingDataQuotaHelper::MockBrowsingDataQuotaHelper(Profile* profile) |
8 : BrowsingDataQuotaHelper(BrowserThread::GetMessageLoopProxyForThread( | 10 : BrowsingDataQuotaHelper(BrowserThread::GetMessageLoopProxyForThread( |
9 BrowserThread::IO)) {} | 11 BrowserThread::IO)) {} |
10 | 12 |
11 MockBrowsingDataQuotaHelper::~MockBrowsingDataQuotaHelper() {} | 13 MockBrowsingDataQuotaHelper::~MockBrowsingDataQuotaHelper() {} |
12 | 14 |
13 void MockBrowsingDataQuotaHelper::StartFetching( | 15 void MockBrowsingDataQuotaHelper::StartFetching( |
14 FetchResultCallback* callback) { | 16 FetchResultCallback* callback) { |
15 callback_.reset(callback); | 17 callback_.reset(callback); |
16 } | 18 } |
(...skipping 19 matching lines...) Expand all Loading... |
36 AddHost("quotahost1", 1, 2); | 38 AddHost("quotahost1", 1, 2); |
37 AddHost("quotahost2", 10, 20); | 39 AddHost("quotahost2", 10, 20); |
38 } | 40 } |
39 | 41 |
40 void MockBrowsingDataQuotaHelper::Notify() { | 42 void MockBrowsingDataQuotaHelper::Notify() { |
41 CHECK(callback_.get()); | 43 CHECK(callback_.get()); |
42 callback_->Run(response_); | 44 callback_->Run(response_); |
43 callback_.reset(); | 45 callback_.reset(); |
44 response_.clear(); | 46 response_.clear(); |
45 } | 47 } |
OLD | NEW |