Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: webkit/fileapi/file_system_quota_util.h

Issue 10447055: Move fileapi into its own component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/fileapi/file_system_quota_client.h ('k') | webkit/fileapi/file_system_url_request_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_UTIL_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "webkit/fileapi/fileapi_export.h"
14 #include "webkit/fileapi/file_system_types.h" 15 #include "webkit/fileapi/file_system_types.h"
15 16
16 namespace base { 17 namespace base {
17 class SequencedTaskRunner; 18 class SequencedTaskRunner;
18 } 19 }
19 20
20 namespace quota { 21 namespace quota {
21 class QuotaManagerProxy; 22 class QuotaManagerProxy;
22 } 23 }
23 24
24 namespace fileapi { 25 namespace fileapi {
25 26
26 class FileSystemContext; 27 class FileSystemContext;
27 28
28 // An abstract interface that provides common quota-related utility functions 29 // An abstract interface that provides common quota-related utility functions
29 // for internal filesystem modules. The main consumer of this class is 30 // for internal filesystem modules. The main consumer of this class is
30 // file_system_quota_client and quota_file_util. 31 // file_system_quota_client and quota_file_util.
31 // All the methods of this class are synchronous and need to be called on 32 // All the methods of this class are synchronous and need to be called on
32 // the thread that the method name implies. 33 // the thread that the method name implies.
33 class FileSystemQuotaUtil { 34 class FILEAPI_EXPORT FileSystemQuotaUtil {
34 public: 35 public:
35 // Methods of this class can be called on any thread. 36 // Methods of this class can be called on any thread.
36 class Proxy : public base::RefCountedThreadSafe<Proxy> { 37 class FILEAPI_EXPORT Proxy : public base::RefCountedThreadSafe<Proxy> {
37 public: 38 public:
38 void UpdateOriginUsage(quota::QuotaManagerProxy* proxy, 39 void UpdateOriginUsage(quota::QuotaManagerProxy* proxy,
39 const GURL& origin_url, 40 const GURL& origin_url,
40 fileapi::FileSystemType type, 41 fileapi::FileSystemType type,
41 int64 delta); 42 int64 delta);
42 void StartUpdateOrigin(const GURL& origin_url, 43 void StartUpdateOrigin(const GURL& origin_url,
43 fileapi::FileSystemType type); 44 fileapi::FileSystemType type);
44 void EndUpdateOrigin(const GURL& origin_url, 45 void EndUpdateOrigin(const GURL& origin_url,
45 fileapi::FileSystemType type); 46 fileapi::FileSystemType type);
46 47
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 protected: 106 protected:
106 explicit FileSystemQuotaUtil(base::SequencedTaskRunner* file_task_runner); 107 explicit FileSystemQuotaUtil(base::SequencedTaskRunner* file_task_runner);
107 108
108 private: 109 private:
109 scoped_refptr<Proxy> proxy_; 110 scoped_refptr<Proxy> proxy_;
110 }; 111 };
111 112
112 } // namespace fileapi 113 } // namespace fileapi
113 114
114 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_ 115 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_QUOTA_UTIL_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_quota_client.h ('k') | webkit/fileapi/file_system_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698