Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Side by Side Diff: chrome/browser/mock_browsing_data_quota_helper.cc

Issue 7387007: Adding usage and quota entry to chrome://settings/cookies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed leak suppressions. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 : BrowsingDataQuotaHelper(BrowserThread::GetMessageLoopProxyForThread(
9 BrowserThread::IO)) {}
10
11 MockBrowsingDataQuotaHelper::~MockBrowsingDataQuotaHelper() {}
12
13 void MockBrowsingDataQuotaHelper::StartFetching(
14 FetchResultCallback* callback) {
15 callback_.reset(callback);
16 }
17
18 void MockBrowsingDataQuotaHelper::CancelNotification() {
19 callback_.reset(NULL);
20 }
21
22 void MockBrowsingDataQuotaHelper::AddHost(
23 const std::string& host,
24 int64 temporary_usage,
25 int64 persistent_usage) {
26 response_.push_back(QuotaInfo(
27 host,
28 temporary_usage,
29 persistent_usage));
30 }
31
32 void MockBrowsingDataQuotaHelper::AddQuotaSamples() {
33 AddHost("quotahost1", 1, 2);
34 AddHost("quotahost2", 10, 20);
35 }
36
37 void MockBrowsingDataQuotaHelper::Notify() {
38 CHECK(callback_.get());
39 callback_->Run(response_);
40 callback_.reset();
41 response_.clear();
42 }
OLDNEW
« no previous file with comments | « chrome/browser/mock_browsing_data_quota_helper.h ('k') | chrome/browser/resources/options/cookies_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698