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_IMPL_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" | 16 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" |
17 #include "content/public/browser/browser_thread.h" | |
18 #include "webkit/quota/quota_types.h" | 17 #include "webkit/quota/quota_types.h" |
19 | 18 |
20 namespace quota { | 19 namespace quota { |
21 class QuotaManager; | 20 class QuotaManager; |
22 } | 21 } |
23 | 22 |
24 // Implementation of BrowsingDataQuotaHelper. Since a client of | 23 // Implementation of BrowsingDataQuotaHelper. Since a client of |
25 // BrowsingDataQuotaHelper should live in UI thread and QuotaManager lives in | 24 // BrowsingDataQuotaHelper should live in UI thread and QuotaManager lives in |
26 // IO thread, we have to communicate over thread using PostTask. | 25 // IO thread, we have to communicate over thread using PostTask. |
27 class BrowsingDataQuotaHelperImpl : public BrowsingDataQuotaHelper { | 26 class BrowsingDataQuotaHelperImpl : public BrowsingDataQuotaHelper { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 scoped_refptr<base::MessageLoopProxy> io_thread_; | 63 scoped_refptr<base::MessageLoopProxy> io_thread_; |
65 base::WeakPtrFactory<BrowsingDataQuotaHelperImpl> weak_factory_; | 64 base::WeakPtrFactory<BrowsingDataQuotaHelperImpl> weak_factory_; |
66 | 65 |
67 friend class BrowsingDataQuotaHelper; | 66 friend class BrowsingDataQuotaHelper; |
68 friend class BrowsingDataQuotaHelperTest; | 67 friend class BrowsingDataQuotaHelperTest; |
69 | 68 |
70 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelperImpl); | 69 DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelperImpl); |
71 }; | 70 }; |
72 | 71 |
73 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ | 72 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_IMPL_H_ |
OLD | NEW |