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

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

Issue 13357004: Clear browsing data clears data for type kStorageTypeTemporary but not for kStorageTypeSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again Created 7 years, 8 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSING_DATA_QUOTA_HELPER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
(...skipping 23 matching lines...) Expand all
34 : public base::RefCountedThreadSafe<BrowsingDataQuotaHelper, 34 : public base::RefCountedThreadSafe<BrowsingDataQuotaHelper,
35 BrowsingDataQuotaHelperDeleter> { 35 BrowsingDataQuotaHelperDeleter> {
36 public: 36 public:
37 // QuotaInfo contains host-based quota and usage information for persistent 37 // QuotaInfo contains host-based quota and usage information for persistent
38 // and temporary storage. 38 // and temporary storage.
39 struct QuotaInfo { 39 struct QuotaInfo {
40 QuotaInfo(); 40 QuotaInfo();
41 explicit QuotaInfo(const std::string& host); 41 explicit QuotaInfo(const std::string& host);
42 QuotaInfo(const std::string& host, 42 QuotaInfo(const std::string& host,
43 int64 temporary_usage, 43 int64 temporary_usage,
44 int64 persistent_usage); 44 int64 persistent_usage,
45 int64 syncable_usage);
45 ~QuotaInfo(); 46 ~QuotaInfo();
46 47
47 // Certain versions of MSVC 2008 have bad implementations of ADL for nested 48 // Certain versions of MSVC 2008 have bad implementations of ADL for nested
48 // classes so they require these operators to be declared here instead of in 49 // classes so they require these operators to be declared here instead of in
49 // the global namespace. 50 // the global namespace.
50 bool operator <(const QuotaInfo& rhs) const; 51 bool operator <(const QuotaInfo& rhs) const;
51 bool operator ==(const QuotaInfo& rhs) const; 52 bool operator ==(const QuotaInfo& rhs) const;
52 53
53 std::string host; 54 std::string host;
54 int64 temporary_usage; 55 int64 temporary_usage;
55 int64 persistent_usage; 56 int64 persistent_usage;
57 int64 syncable_usage;
56 }; 58 };
57 59
58 typedef std::list<QuotaInfo> QuotaInfoArray; 60 typedef std::list<QuotaInfo> QuotaInfoArray;
59 typedef base::Callback<void(const QuotaInfoArray&)> FetchResultCallback; 61 typedef base::Callback<void(const QuotaInfoArray&)> FetchResultCallback;
60 62
61 static BrowsingDataQuotaHelper* Create(Profile* profile); 63 static BrowsingDataQuotaHelper* Create(Profile* profile);
62 64
63 virtual void StartFetching(const FetchResultCallback& callback) = 0; 65 virtual void StartFetching(const FetchResultCallback& callback) = 0;
64 66
65 virtual void RevokeHostQuota(const std::string& host) = 0; 67 virtual void RevokeHostQuota(const std::string& host) = 0;
66 68
67 protected: 69 protected:
68 explicit BrowsingDataQuotaHelper(base::MessageLoopProxy* io_thread_); 70 explicit BrowsingDataQuotaHelper(base::MessageLoopProxy* io_thread_);
69 virtual ~BrowsingDataQuotaHelper(); 71 virtual ~BrowsingDataQuotaHelper();
70 72
71 private: 73 private:
72 friend class base::DeleteHelper<BrowsingDataQuotaHelper>; 74 friend class base::DeleteHelper<BrowsingDataQuotaHelper>;
73 friend struct BrowsingDataQuotaHelperDeleter; 75 friend struct BrowsingDataQuotaHelperDeleter;
74 scoped_refptr<base::MessageLoopProxy> io_thread_; 76 scoped_refptr<base::MessageLoopProxy> io_thread_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelper); 78 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelper);
77 }; 79 };
78 80
79 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_H_ 81 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698