| 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 WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 class GetOriginsTaskBase; | 58 class GetOriginsTaskBase; |
| 59 class GetOriginsForTypeTask; | 59 class GetOriginsForTypeTask; |
| 60 class GetOriginsForHostTask; | 60 class GetOriginsForHostTask; |
| 61 class DeleteOriginTask; | 61 class DeleteOriginTask; |
| 62 | 62 |
| 63 typedef std::pair<fileapi::FileSystemType, std::string> TypeAndHostOrOrigin; | 63 typedef std::pair<fileapi::FileSystemType, std::string> TypeAndHostOrOrigin; |
| 64 typedef quota::CallbackQueueMap1<GetUsageCallback*, | 64 typedef quota::CallbackQueueMap1<GetUsageCallback*, |
| 65 TypeAndHostOrOrigin, | 65 TypeAndHostOrOrigin, |
| 66 int64 | 66 int64 |
| 67 > UsageCallbackMap; | 67 > UsageCallbackMap; |
| 68 typedef quota::CallbackQueueMap1<GetOriginsCallback*, | 68 typedef quota::CallbackQueueMap2<GetOriginsCallback*, |
| 69 fileapi::FileSystemType, | 69 fileapi::FileSystemType, |
| 70 const std::set<GURL>& | 70 const std::set<GURL>&, |
| 71 quota::StorageType |
| 71 > OriginsForTypeCallbackMap; | 72 > OriginsForTypeCallbackMap; |
| 72 typedef quota::CallbackQueueMap1<GetOriginsCallback*, | 73 typedef quota::CallbackQueueMap2<GetOriginsCallback*, |
| 73 TypeAndHostOrOrigin, | 74 TypeAndHostOrOrigin, |
| 74 const std::set<GURL>& | 75 const std::set<GURL>&, |
| 76 quota::StorageType |
| 75 > OriginsForHostCallbackMap; | 77 > OriginsForHostCallbackMap; |
| 76 | 78 |
| 77 void DidGetOriginUsage(fileapi::FileSystemType type, | 79 void DidGetOriginUsage(fileapi::FileSystemType type, |
| 78 const GURL& origin, int64 usage); | 80 const GURL& origin, int64 usage); |
| 79 void DidGetOriginsForType(fileapi::FileSystemType type, | 81 void DidGetOriginsForType(fileapi::FileSystemType type, |
| 80 const std::set<GURL>& origins); | 82 const std::set<GURL>& origins); |
| 81 void DidGetOriginsForHost(const TypeAndHostOrOrigin& type_and_host, | 83 void DidGetOriginsForHost(const TypeAndHostOrOrigin& type_and_host, |
| 82 const std::set<GURL>& origins); | 84 const std::set<GURL>& origins); |
| 83 | 85 |
| 84 scoped_refptr<base::MessageLoopProxy> file_message_loop_; | 86 scoped_refptr<base::MessageLoopProxy> file_message_loop_; |
| 85 scoped_refptr<FileSystemContext> file_system_context_; | 87 scoped_refptr<FileSystemContext> file_system_context_; |
| 86 | 88 |
| 87 bool is_incognito_; | 89 bool is_incognito_; |
| 88 | 90 |
| 89 // Pending callbacks. | 91 // Pending callbacks. |
| 90 UsageCallbackMap pending_usage_callbacks_; | 92 UsageCallbackMap pending_usage_callbacks_; |
| 91 OriginsForTypeCallbackMap pending_origins_for_type_callbacks_; | 93 OriginsForTypeCallbackMap pending_origins_for_type_callbacks_; |
| 92 OriginsForHostCallbackMap pending_origins_for_host_callbacks_; | 94 OriginsForHostCallbackMap pending_origins_for_host_callbacks_; |
| 93 | 95 |
| 94 DISALLOW_COPY_AND_ASSIGN(FileSystemQuotaClient); | 96 DISALLOW_COPY_AND_ASSIGN(FileSystemQuotaClient); |
| 95 }; | 97 }; |
| 96 | 98 |
| 97 } // namespace fileapi | 99 } // namespace fileapi |
| 98 | 100 |
| 99 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_ | 101 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_ |
| OLD | NEW |