Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/message_loop/message_loop_proxy.h" | 13 #include "base/message_loop/message_loop_proxy.h" |
|
Bernhard Bauer
2015/04/29 09:25:02
This include can be removed.
Pranay
2015/05/04 03:28:21
Done.
Pranay
2015/05/04 03:30:31
Done.
| |
| 14 #include "base/sequenced_task_runner_helpers.h" | 14 #include "base/sequenced_task_runner_helpers.h" |
| 15 #include "base/single_thread_task_runner.h" | |
|
Bernhard Bauer
2015/04/29 09:25:02
You can forward-declare SingleThreadTaskRunner ins
Pranay
2015/05/04 03:28:21
Done.
Pranay
2015/05/04 03:30:31
Done.
| |
| 15 #include "storage/common/quota/quota_types.h" | 16 #include "storage/common/quota/quota_types.h" |
| 16 | 17 |
| 17 class BrowsingDataQuotaHelper; | 18 class BrowsingDataQuotaHelper; |
| 18 class Profile; | 19 class Profile; |
| 19 | 20 |
| 20 struct BrowsingDataQuotaHelperDeleter { | 21 struct BrowsingDataQuotaHelperDeleter { |
| 21 static void Destruct(const BrowsingDataQuotaHelper* helper); | 22 static void Destruct(const BrowsingDataQuotaHelper* helper); |
| 22 }; | 23 }; |
| 23 | 24 |
| 24 // This class is an interface class to bridge between Cookies Tree and Unified | 25 // This class is an interface class to bridge between Cookies Tree and Unified |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 typedef std::list<QuotaInfo> QuotaInfoArray; | 61 typedef std::list<QuotaInfo> QuotaInfoArray; |
| 61 typedef base::Callback<void(const QuotaInfoArray&)> FetchResultCallback; | 62 typedef base::Callback<void(const QuotaInfoArray&)> FetchResultCallback; |
| 62 | 63 |
| 63 static BrowsingDataQuotaHelper* Create(Profile* profile); | 64 static BrowsingDataQuotaHelper* Create(Profile* profile); |
| 64 | 65 |
| 65 virtual void StartFetching(const FetchResultCallback& callback) = 0; | 66 virtual void StartFetching(const FetchResultCallback& callback) = 0; |
| 66 | 67 |
| 67 virtual void RevokeHostQuota(const std::string& host) = 0; | 68 virtual void RevokeHostQuota(const std::string& host) = 0; |
| 68 | 69 |
| 69 protected: | 70 protected: |
| 70 explicit BrowsingDataQuotaHelper(base::MessageLoopProxy* io_thread_); | 71 explicit BrowsingDataQuotaHelper(base::SingleThreadTaskRunner* io_thread_); |
| 71 virtual ~BrowsingDataQuotaHelper(); | 72 virtual ~BrowsingDataQuotaHelper(); |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 friend class base::DeleteHelper<BrowsingDataQuotaHelper>; | 75 friend class base::DeleteHelper<BrowsingDataQuotaHelper>; |
| 75 friend struct BrowsingDataQuotaHelperDeleter; | 76 friend struct BrowsingDataQuotaHelperDeleter; |
| 76 scoped_refptr<base::MessageLoopProxy> io_thread_; | 77 scoped_refptr<base::SingleThreadTaskRunner> io_thread_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelper); | 79 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelper); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_H_ | 82 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_H_ |
| OLD | NEW |