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
3 // found in the LICENSE file.
5 #include "chrome/browser/browsing_data/mock_browsing_data_quota_helper.h"
7 #include "content/public/browser/browser_thread.h"
9 using content::BrowserThread
;
11 MockBrowsingDataQuotaHelper::MockBrowsingDataQuotaHelper(Profile
* profile
)
12 : BrowsingDataQuotaHelper(BrowserThread::GetMessageLoopProxyForThread(
13 BrowserThread::IO
).get()) {}
15 MockBrowsingDataQuotaHelper::~MockBrowsingDataQuotaHelper() {}
17 void MockBrowsingDataQuotaHelper::StartFetching(
18 const FetchResultCallback
& callback
) {
22 void MockBrowsingDataQuotaHelper::RevokeHostQuota(const std::string
& host
) {
25 void MockBrowsingDataQuotaHelper::AddHost(
26 const std::string
& host
,
27 int64 temporary_usage
,
28 int64 persistent_usage
,
29 int64 syncable_usage
) {
30 response_
.push_back(QuotaInfo(
37 void MockBrowsingDataQuotaHelper::AddQuotaSamples() {
38 AddHost("quotahost1", 1, 2, 1);
39 AddHost("quotahost2", 10, 20, 10);
42 void MockBrowsingDataQuotaHelper::Notify() {
43 CHECK_EQ(false, callback_
.is_null());
44 callback_
.Run(response_
);