OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/mock_browsing_data_quota_helper.h" |
| 6 |
| 7 MockBrowsingDataQuotaHelper::MockBrowsingDataQuotaHelper(Profile* profile) { } |
| 8 |
| 9 MockBrowsingDataQuotaHelper::~MockBrowsingDataQuotaHelper() { } |
| 10 |
| 11 void MockBrowsingDataQuotaHelper::StartFetching( |
| 12 FetchResultCallback* callback) { |
| 13 callback_.reset(callback); |
| 14 } |
| 15 |
| 16 void MockBrowsingDataQuotaHelper::CancelNotification() { |
| 17 callback_.reset(NULL); |
| 18 } |
| 19 |
| 20 void MockBrowsingDataQuotaHelper::AddHost( |
| 21 const std::string& host, |
| 22 int64 temporary_usage, |
| 23 int64 persistent_usage, |
| 24 int64 persistent_quota) { |
| 25 response_.push_back(QuotaInfo( |
| 26 host, |
| 27 temporary_usage, |
| 28 persistent_usage, |
| 29 persistent_quota)); |
| 30 } |
| 31 |
| 32 void MockBrowsingDataQuotaHelper::Notify() { |
| 33 CHECK(callback_.get()); |
| 34 callback_->Run(response_); |
| 35 callback_.reset(); |
| 36 response_.clear(); |
| 37 } |
OLD | NEW |