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

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

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: Remove an accidentally added file. Created 4 years, 5 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 #ifndef CHROME_BROWSER_BROWSING_DATA_SITE_DATA_COUNTER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_SITE_DATA_COUNTER_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11 #include <string>
12
13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h"
15 #include "chrome/browser/browsing_data/browsing_data_counter.h"
16 #include "chrome/browser/browsing_data/site_data_size_collector.h"
17
18 class SiteDataCounter: public BrowsingDataCounter {
19 public:
20 SiteDataCounter();
21 ~SiteDataCounter() override;
22
23 // BrowsingDataCounter:
24 const std::string& GetPrefName() const override;
25
26 private:
27 // BrowsingDataCounter:
28 void Count() override;
29
30 void OnSiteDataSizeFetched(int64_t size);
31
32 const std::string pref_name_;
33 std::unique_ptr<SiteDataSizeCollector> collector_;
34 base::WeakPtrFactory<SiteDataCounter> weak_ptr_factory_;
35
36 DISALLOW_COPY_AND_ASSIGN(SiteDataCounter);
37 };
38
39 #endif // CHROME_BROWSER_BROWSING_DATA_SITE_DATA_COUNTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698