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 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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "webkit/fileapi/fileapi_export.h" |
16 #include "webkit/fileapi/file_system_quota_util.h" | 17 #include "webkit/fileapi/file_system_quota_util.h" |
17 #include "webkit/fileapi/file_system_types.h" | 18 #include "webkit/fileapi/file_system_types.h" |
18 #include "webkit/quota/quota_client.h" | 19 #include "webkit/quota/quota_client.h" |
19 #include "webkit/quota/quota_task.h" | 20 #include "webkit/quota/quota_task.h" |
20 | 21 |
21 namespace base { | 22 namespace base { |
22 class SequencedTaskRunner; | 23 class SequencedTaskRunner; |
23 } | 24 } |
24 | 25 |
25 namespace fileapi { | 26 namespace fileapi { |
26 | 27 |
27 class FileSystemContext; | 28 class FileSystemContext; |
28 | 29 |
29 // An instance of this class is created per-profile. This class | 30 // An instance of this class is created per-profile. This class |
30 // is self-destructed and will delete itself when OnQuotaManagerDestroyed | 31 // is self-destructed and will delete itself when OnQuotaManagerDestroyed |
31 // is called. | 32 // is called. |
32 // All of the public methods of this class are called by the quota manager | 33 // All of the public methods of this class are called by the quota manager |
33 // (except for the constructor/destructor). | 34 // (except for the constructor/destructor). |
34 class FileSystemQuotaClient : public quota::QuotaClient, | 35 class FILEAPI_EXPORT_PRIVATE FileSystemQuotaClient |
35 public quota::QuotaTaskObserver { | 36 : public NON_EXPORTED_BASE(quota::QuotaClient), |
| 37 public quota::QuotaTaskObserver { |
36 public: | 38 public: |
37 FileSystemQuotaClient( | 39 FileSystemQuotaClient( |
38 FileSystemContext* file_system_context, | 40 FileSystemContext* file_system_context, |
39 bool is_incognito); | 41 bool is_incognito); |
40 virtual ~FileSystemQuotaClient(); | 42 virtual ~FileSystemQuotaClient(); |
41 | 43 |
42 // QuotaClient methods. | 44 // QuotaClient methods. |
43 virtual quota::QuotaClient::ID id() const OVERRIDE; | 45 virtual quota::QuotaClient::ID id() const OVERRIDE; |
44 virtual void OnQuotaManagerDestroyed() OVERRIDE; | 46 virtual void OnQuotaManagerDestroyed() OVERRIDE; |
45 virtual void GetOriginUsage(const GURL& origin_url, | 47 virtual void GetOriginUsage(const GURL& origin_url, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 UsageCallbackMap pending_usage_callbacks_; | 99 UsageCallbackMap pending_usage_callbacks_; |
98 OriginsForTypeCallbackMap pending_origins_for_type_callbacks_; | 100 OriginsForTypeCallbackMap pending_origins_for_type_callbacks_; |
99 OriginsForHostCallbackMap pending_origins_for_host_callbacks_; | 101 OriginsForHostCallbackMap pending_origins_for_host_callbacks_; |
100 | 102 |
101 DISALLOW_COPY_AND_ASSIGN(FileSystemQuotaClient); | 103 DISALLOW_COPY_AND_ASSIGN(FileSystemQuotaClient); |
102 }; | 104 }; |
103 | 105 |
104 } // namespace fileapi | 106 } // namespace fileapi |
105 | 107 |
106 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_ | 108 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_CLIENT_H_ |
OLD | NEW |