OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_QUOTA_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_QUOTA_HELPER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_QUOTA_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_QUOTA_HELPER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/message_loop_helpers.h" | |
15 #include "base/message_loop_proxy.h" | 14 #include "base/message_loop_proxy.h" |
16 #include "base/time.h" | 15 #include "base/time.h" |
17 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
18 #include "webkit/quota/quota_types.h" | 17 #include "webkit/quota/quota_types.h" |
19 | 18 |
20 class BrowsingDataQuotaHelper; | 19 class BrowsingDataQuotaHelper; |
21 class Profile; | 20 class Profile; |
22 | 21 |
23 struct BrowsingDataQuotaHelperDeleter { | 22 struct BrowsingDataQuotaHelperDeleter { |
24 static void Destruct(const BrowsingDataQuotaHelper* helper); | 23 static void Destruct(const BrowsingDataQuotaHelper* helper); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 virtual void StartFetching(const FetchResultCallback& callback) = 0; | 66 virtual void StartFetching(const FetchResultCallback& callback) = 0; |
68 virtual void CancelNotification() = 0; | 67 virtual void CancelNotification() = 0; |
69 | 68 |
70 virtual void RevokeHostQuota(const std::string& host) = 0; | 69 virtual void RevokeHostQuota(const std::string& host) = 0; |
71 | 70 |
72 protected: | 71 protected: |
73 explicit BrowsingDataQuotaHelper(base::MessageLoopProxy* io_thread_); | 72 explicit BrowsingDataQuotaHelper(base::MessageLoopProxy* io_thread_); |
74 virtual ~BrowsingDataQuotaHelper(); | 73 virtual ~BrowsingDataQuotaHelper(); |
75 | 74 |
76 private: | 75 private: |
77 friend class base::DeleteHelper<BrowsingDataQuotaHelper>; | 76 friend class DeleteTask<const BrowsingDataQuotaHelper>; |
78 friend struct BrowsingDataQuotaHelperDeleter; | 77 friend struct BrowsingDataQuotaHelperDeleter; |
79 scoped_refptr<base::MessageLoopProxy> io_thread_; | 78 scoped_refptr<base::MessageLoopProxy> io_thread_; |
80 | 79 |
81 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelper); | 80 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelper); |
82 }; | 81 }; |
83 | 82 |
84 #endif // CHROME_BROWSER_BROWSING_DATA_QUOTA_HELPER_H_ | 83 #endif // CHROME_BROWSER_BROWSING_DATA_QUOTA_HELPER_H_ |
OLD | NEW |