Chromium Code Reviews| 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 CONTENT_BROWER_IN_PROCESS_WEBKIT_QUOTA_CLIENT_H_ | 5 #ifndef CONTENT_BROWER_IN_PROCESS_WEBKIT_QUOTA_CLIENT_H_ |
| 6 #define CONTENT_BROWER_IN_PROCESS_WEBKIT_QUOTA_CLIENT_H_ | 6 #define CONTENT_BROWER_IN_PROCESS_WEBKIT_QUOTA_CLIENT_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 IndexedDBQuotaClient( | 25 IndexedDBQuotaClient( |
| 26 base::MessageLoopProxy* tracker_thread, | 26 base::MessageLoopProxy* tracker_thread, |
| 27 IndexedDBContext* indexed_db_context); | 27 IndexedDBContext* indexed_db_context); |
| 28 virtual ~IndexedDBQuotaClient(); | 28 virtual ~IndexedDBQuotaClient(); |
| 29 | 29 |
| 30 // QuotaClient method overrides | 30 // QuotaClient method overrides |
| 31 virtual ID id() const OVERRIDE; | 31 virtual ID id() const OVERRIDE; |
| 32 virtual void OnQuotaManagerDestroyed() OVERRIDE; | 32 virtual void OnQuotaManagerDestroyed() OVERRIDE; |
| 33 virtual void GetOriginUsage(const GURL& origin_url, | 33 virtual void GetOriginUsage(const GURL& origin_url, |
| 34 quota::StorageType type, | 34 quota::StorageType type, |
| 35 GetUsageCallback* callback) OVERRIDE; | 35 GetUsageCallback callback) OVERRIDE; |
|
awong
2011/09/29 18:05:15
It's better to pass the Callback by const &.
tzik
2011/10/11 04:53:57
Done.
| |
| 36 virtual void GetOriginsForType(quota::StorageType type, | 36 virtual void GetOriginsForType(quota::StorageType type, |
| 37 GetOriginsCallback* callback) OVERRIDE; | 37 GetOriginsCallback callback) OVERRIDE; |
|
awong
2011/09/29 18:05:15
pass by const &
tzik
2011/10/11 04:53:57
Done.
| |
| 38 virtual void GetOriginsForHost(quota::StorageType type, | 38 virtual void GetOriginsForHost(quota::StorageType type, |
| 39 const std::string& host, | 39 const std::string& host, |
| 40 GetOriginsCallback* callback) OVERRIDE; | 40 GetOriginsCallback callback) OVERRIDE; |
|
awong
2011/09/29 18:05:15
pass by const &
tzik
2011/10/11 04:53:57
Done.
| |
| 41 virtual void DeleteOriginData(const GURL& origin, | 41 virtual void DeleteOriginData(const GURL& origin, |
| 42 quota::StorageType type, | 42 quota::StorageType type, |
| 43 DeletionCallback* callback) OVERRIDE; | 43 DeletionCallback callback) OVERRIDE; |
|
awong
2011/09/29 18:05:15
pass by const &
tzik
2011/10/11 04:53:57
Done.
| |
| 44 private: | 44 private: |
| 45 class HelperTask; | 45 class HelperTask; |
| 46 class GetOriginUsageTask; | 46 class GetOriginUsageTask; |
| 47 class GetOriginsTaskBase; | 47 class GetOriginsTaskBase; |
| 48 class GetAllOriginsTask; | 48 class GetAllOriginsTask; |
| 49 class GetOriginsForHostTask; | 49 class GetOriginsForHostTask; |
| 50 class DeleteOriginTask; | 50 class DeleteOriginTask; |
| 51 | 51 |
| 52 typedef quota::CallbackQueueMap1 | 52 typedef quota::CallbackQueueMap1 |
| 53 <GetUsageCallback*, | 53 <GetUsageCallback, |
| 54 GURL, // origin | 54 GURL, // origin |
| 55 int64 | 55 int64 |
| 56 > UsageForOriginCallbackMap; | 56 > UsageForOriginCallbackMap; |
| 57 typedef quota::CallbackQueue2 | 57 typedef quota::CallbackQueue2 |
| 58 <GetOriginsCallback*, | 58 <GetOriginsCallback, |
| 59 const std::set<GURL>&, | 59 const std::set<GURL>&, |
| 60 quota::StorageType | 60 quota::StorageType |
| 61 > OriginsForTypeCallbackQueue; | 61 > OriginsForTypeCallbackQueue; |
| 62 typedef quota::CallbackQueueMap2 | 62 typedef quota::CallbackQueueMap2 |
| 63 <GetOriginsCallback*, | 63 <GetOriginsCallback, |
| 64 std::string, // host | 64 std::string, // host |
| 65 const std::set<GURL>&, | 65 const std::set<GURL>&, |
| 66 quota::StorageType | 66 quota::StorageType |
| 67 > OriginsForHostCallbackMap; | 67 > OriginsForHostCallbackMap; |
| 68 | 68 |
| 69 void DidGetOriginUsage(const GURL& origin_url, int64 usage); | 69 void DidGetOriginUsage(const GURL& origin_url, int64 usage); |
| 70 void DidGetAllOrigins(const std::set<GURL>& origins, quota::StorageType type); | 70 void DidGetAllOrigins(const std::set<GURL>& origins, quota::StorageType type); |
| 71 void DidGetOriginsForHost( | 71 void DidGetOriginsForHost( |
| 72 const std::string& host, const std::set<GURL>& origins, | 72 const std::string& host, const std::set<GURL>& origins, |
| 73 quota::StorageType type); | 73 quota::StorageType type); |
| 74 | 74 |
| 75 scoped_refptr<base::MessageLoopProxy> webkit_thread_message_loop_; | 75 scoped_refptr<base::MessageLoopProxy> webkit_thread_message_loop_; |
| 76 scoped_refptr<IndexedDBContext> indexed_db_context_; | 76 scoped_refptr<IndexedDBContext> indexed_db_context_; |
| 77 UsageForOriginCallbackMap usage_for_origin_callbacks_; | 77 UsageForOriginCallbackMap usage_for_origin_callbacks_; |
| 78 OriginsForTypeCallbackQueue origins_for_type_callbacks_; | 78 OriginsForTypeCallbackQueue origins_for_type_callbacks_; |
| 79 OriginsForHostCallbackMap origins_for_host_callbacks_; | 79 OriginsForHostCallbackMap origins_for_host_callbacks_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(IndexedDBQuotaClient); | 81 DISALLOW_COPY_AND_ASSIGN(IndexedDBQuotaClient); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 #endif // CONTENT_BROWER_IN_PROCESS_WEBKIT_QUOTA_CLIENT_H_ | 84 #endif // CONTENT_BROWER_IN_PROCESS_WEBKIT_QUOTA_CLIENT_H_ |
| OLD | NEW |