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 CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 18 matching lines...) Expand all Loading... |
29 // used on the IO thread by the quota manager. This class deletes | 29 // used on the IO thread by the quota manager. This class deletes |
30 // itself when both the quota manager and the appcache service have | 30 // itself when both the quota manager and the appcache service have |
31 // been destroyed. | 31 // been destroyed. |
32 class AppCacheQuotaClient : public storage::QuotaClient { | 32 class AppCacheQuotaClient : public storage::QuotaClient { |
33 public: | 33 public: |
34 typedef std::deque<base::Closure> RequestQueue; | 34 typedef std::deque<base::Closure> RequestQueue; |
35 | 35 |
36 virtual ~AppCacheQuotaClient(); | 36 virtual ~AppCacheQuotaClient(); |
37 | 37 |
38 // QuotaClient method overrides | 38 // QuotaClient method overrides |
39 virtual ID id() const OVERRIDE; | 39 virtual ID id() const override; |
40 virtual void OnQuotaManagerDestroyed() OVERRIDE; | 40 virtual void OnQuotaManagerDestroyed() override; |
41 virtual void GetOriginUsage(const GURL& origin, | 41 virtual void GetOriginUsage(const GURL& origin, |
42 storage::StorageType type, | 42 storage::StorageType type, |
43 const GetUsageCallback& callback) OVERRIDE; | 43 const GetUsageCallback& callback) override; |
44 virtual void GetOriginsForType(storage::StorageType type, | 44 virtual void GetOriginsForType(storage::StorageType type, |
45 const GetOriginsCallback& callback) OVERRIDE; | 45 const GetOriginsCallback& callback) override; |
46 virtual void GetOriginsForHost(storage::StorageType type, | 46 virtual void GetOriginsForHost(storage::StorageType type, |
47 const std::string& host, | 47 const std::string& host, |
48 const GetOriginsCallback& callback) OVERRIDE; | 48 const GetOriginsCallback& callback) override; |
49 virtual void DeleteOriginData(const GURL& origin, | 49 virtual void DeleteOriginData(const GURL& origin, |
50 storage::StorageType type, | 50 storage::StorageType type, |
51 const DeletionCallback& callback) OVERRIDE; | 51 const DeletionCallback& callback) override; |
52 virtual bool DoesSupport(storage::StorageType type) const OVERRIDE; | 52 virtual bool DoesSupport(storage::StorageType type) const override; |
53 | 53 |
54 private: | 54 private: |
55 friend class content::AppCacheQuotaClientTest; | 55 friend class content::AppCacheQuotaClientTest; |
56 friend class AppCacheServiceImpl; // for NotifyAppCacheIsDestroyed | 56 friend class AppCacheServiceImpl; // for NotifyAppCacheIsDestroyed |
57 friend class AppCacheStorageImpl; // for NotifyAppCacheIsReady | 57 friend class AppCacheStorageImpl; // for NotifyAppCacheIsReady |
58 | 58 |
59 CONTENT_EXPORT | 59 CONTENT_EXPORT |
60 explicit AppCacheQuotaClient(AppCacheServiceImpl* service); | 60 explicit AppCacheQuotaClient(AppCacheServiceImpl* service); |
61 | 61 |
62 void DidDeleteAppCachesForOrigin(int rv); | 62 void DidDeleteAppCachesForOrigin(int rv); |
(...skipping 22 matching lines...) Expand all Loading... |
85 AppCacheServiceImpl* service_; | 85 AppCacheServiceImpl* service_; |
86 bool appcache_is_ready_; | 86 bool appcache_is_ready_; |
87 bool quota_manager_is_destroyed_; | 87 bool quota_manager_is_destroyed_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(AppCacheQuotaClient); | 89 DISALLOW_COPY_AND_ASSIGN(AppCacheQuotaClient); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace content | 92 } // namespace content |
93 | 93 |
94 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ | 94 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_QUOTA_CLIENT_H_ |
OLD | NEW |