OLD | NEW |
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/mock_browsing_data_quota_helper.h" | 5 #include "chrome/browser/browsing_data/mock_browsing_data_quota_helper.h" |
6 | 6 |
| 7 #include "content/public/browser/browser_thread.h" |
| 8 |
7 using content::BrowserThread; | 9 using content::BrowserThread; |
8 | 10 |
9 MockBrowsingDataQuotaHelper::MockBrowsingDataQuotaHelper(Profile* profile) | 11 MockBrowsingDataQuotaHelper::MockBrowsingDataQuotaHelper(Profile* profile) |
10 : BrowsingDataQuotaHelper(BrowserThread::GetMessageLoopProxyForThread( | 12 : BrowsingDataQuotaHelper(BrowserThread::GetMessageLoopProxyForThread( |
11 BrowserThread::IO)) {} | 13 BrowserThread::IO)) {} |
12 | 14 |
13 MockBrowsingDataQuotaHelper::~MockBrowsingDataQuotaHelper() {} | 15 MockBrowsingDataQuotaHelper::~MockBrowsingDataQuotaHelper() {} |
14 | 16 |
15 void MockBrowsingDataQuotaHelper::StartFetching( | 17 void MockBrowsingDataQuotaHelper::StartFetching( |
16 const FetchResultCallback& callback) { | 18 const FetchResultCallback& callback) { |
(...skipping 17 matching lines...) Expand all Loading... |
34 AddHost("quotahost1", 1, 2); | 36 AddHost("quotahost1", 1, 2); |
35 AddHost("quotahost2", 10, 20); | 37 AddHost("quotahost2", 10, 20); |
36 } | 38 } |
37 | 39 |
38 void MockBrowsingDataQuotaHelper::Notify() { | 40 void MockBrowsingDataQuotaHelper::Notify() { |
39 CHECK_EQ(false, callback_.is_null()); | 41 CHECK_EQ(false, callback_.is_null()); |
40 callback_.Run(response_); | 42 callback_.Run(response_); |
41 callback_.Reset(); | 43 callback_.Reset(); |
42 response_.clear(); | 44 response_.clear(); |
43 } | 45 } |
OLD | NEW |