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

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

Issue 2860573004: [Offline Pages] Add cached offline page utils and show usage in settings. (Closed)
Patch Set: address missed comment Created 3 years, 7 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
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_BROWSING_DATA_CACHE_COUNTER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_CACHE_COUNTER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_CACHE_COUNTER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_CACHE_COUNTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 24 matching lines...) Expand all
35 DISALLOW_COPY_AND_ASSIGN(CacheResult); 35 DISALLOW_COPY_AND_ASSIGN(CacheResult);
36 }; 36 };
37 37
38 explicit CacheCounter(Profile* profile); 38 explicit CacheCounter(Profile* profile);
39 ~CacheCounter() override; 39 ~CacheCounter() override;
40 40
41 const char* GetPrefName() const override; 41 const char* GetPrefName() const override;
42 42
43 private: 43 private:
44 void Count() override; 44 void Count() override;
45 void OnCacheSizeCalculated(int64_t bytes, bool is_upper_limit); 45 void OnCacheSizeCalculated(bool is_upper_limit, int64_t cache_bytes);
46 void FetchEstimate( 46 void FetchEstimate(
47 base::WeakPtr<browsing_data::ConditionalCacheCountingHelper>); 47 base::WeakPtr<browsing_data::ConditionalCacheCountingHelper>);
48 48
49 Profile* profile_; 49 Profile* profile_;
50 bool pending_; 50 int64_t calculated_size_;
51 bool is_upper_limit_;
52 int pending_sources_;
51 53
52 base::WeakPtrFactory<CacheCounter> weak_ptr_factory_; 54 base::WeakPtrFactory<CacheCounter> weak_ptr_factory_;
53
54 }; 55 };
55 56
56 #endif // CHROME_BROWSER_BROWSING_DATA_CACHE_COUNTER_H_ 57 #endif // CHROME_BROWSER_BROWSING_DATA_CACHE_COUNTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/offline_page_utils_unittest.cc ('k') | chrome/browser/browsing_data/cache_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698