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

Side by Side Diff: chrome/browser/browsing_data/site_data_counter.cc

Issue 2092663002: Add a counter to calculate the total size of site data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
(Empty)
1 // Copyright 2016 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/browsing_data/site_data_counter.h"
6
7 #include "chrome/common/pref_names.h"
8
9 SiteDataCounter::SiteDataCounter() : pref_name_(prefs::kDeleteCookies),
10 weak_ptr_factory_(this) {
11 }
12
13 SiteDataCounter::~SiteDataCounter() {
14 }
15
16 const std::string& SiteDataCounter::GetPrefName() const {
17 return pref_name_;
18 }
19
20 void SiteDataCounter::Count() {
21 collector_.reset(new SiteDataSizeCollector(GetProfile()));
22 collector_->Fetch(base::Bind(&SiteDataCounter::OnSiteDataSizeFetched,
23 weak_ptr_factory_.GetWeakPtr()));
msramek 2016/06/23 21:30:35 nit: alignment.
fukino 2016/06/30 09:21:24 Done.
24 }
25
26 void SiteDataCounter::OnSiteDataSizeFetched(int64_t size) {
27 ReportResult(size);
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698