OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_PROXY_H_ | 5 #ifndef WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_PROXY_H_ |
6 #define WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_PROXY_H_ | 6 #define WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 const GetUsageAndQuotaCallback& callback); | 56 const GetUsageAndQuotaCallback& callback); |
57 | 57 |
58 // This method may only be called on the IO thread. | 58 // This method may only be called on the IO thread. |
59 // It may return NULL if the manager has already been deleted. | 59 // It may return NULL if the manager has already been deleted. |
60 QuotaManager* quota_manager() const; | 60 QuotaManager* quota_manager() const; |
61 | 61 |
62 protected: | 62 protected: |
63 friend class QuotaManager; | 63 friend class QuotaManager; |
64 friend class base::RefCountedThreadSafe<QuotaManagerProxy>; | 64 friend class base::RefCountedThreadSafe<QuotaManagerProxy>; |
65 | 65 |
66 QuotaManagerProxy(QuotaManager* manager, | 66 QuotaManagerProxy( |
67 base::SingleThreadTaskRunner* io_thread); | 67 QuotaManager* manager, |
| 68 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread); |
68 virtual ~QuotaManagerProxy(); | 69 virtual ~QuotaManagerProxy(); |
69 | 70 |
70 QuotaManager* manager_; // only accessed on the io thread | 71 QuotaManager* manager_; // only accessed on the io thread |
71 scoped_refptr<base::SingleThreadTaskRunner> io_thread_; | 72 scoped_refptr<base::SingleThreadTaskRunner> io_thread_; |
72 | 73 |
73 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); | 74 DISALLOW_COPY_AND_ASSIGN(QuotaManagerProxy); |
74 }; | 75 }; |
75 | 76 |
76 } // namespace storage | 77 } // namespace storage |
77 | 78 |
78 #endif // WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_PROXY_H_ | 79 #endif // WEBKIT_BROWSER_QUOTA_QUOTA_MANAGER_PROXY_H_ |
OLD | NEW |