| 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 CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_API_H_ |
| 7 | 7 |
| 8 #include "base/platform_file.h" | 8 #include "base/platform_file.h" |
| 9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
| 10 #include "webkit/fileapi/syncable/sync_status_code.h" | 10 #include "webkit/fileapi/syncable/sync_status_code.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Returns the file system context for this extension. | 30 // Returns the file system context for this extension. |
| 31 fileapi::FileSystemContext* GetFileSystemContext(); | 31 fileapi::FileSystemContext* GetFileSystemContext(); |
| 32 | 32 |
| 33 void DidInitializeFileSystemContext(const std::string& service_name, | 33 void DidInitializeFileSystemContext(const std::string& service_name, |
| 34 fileapi::SyncStatusCode status); | 34 fileapi::SyncStatusCode status); |
| 35 void DidOpenFileSystem(base::PlatformFileError error, | 35 void DidOpenFileSystem(base::PlatformFileError error, |
| 36 const std::string& file_system_name, | 36 const std::string& file_system_name, |
| 37 const GURL& root_url); | 37 const GURL& root_url); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 class SyncFileSystemGetUsageAndQuotaFunction |
| 41 : public AsyncExtensionFunction { |
| 42 public: |
| 43 DECLARE_EXTENSION_FUNCTION_NAME("syncFileSystem.getUsageAndQuota"); |
| 44 |
| 45 protected: |
| 46 virtual ~SyncFileSystemGetUsageAndQuotaFunction() {} |
| 47 virtual bool RunImpl() OVERRIDE; |
| 48 |
| 49 private: |
| 50 void DidGetUsageAndQuota(quota::QuotaStatusCode status, |
| 51 int64 usage, |
| 52 int64 quota); |
| 53 }; |
| 54 |
| 40 } // namespace extensions | 55 } // namespace extensions |
| 41 | 56 |
| 42 #endif // CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_API_H
_ | 57 #endif // CHROME_BROWSER_EXTENSIONS_API_SYNC_FILE_SYSTEM_SYNC_FILE_SYSTEM_API_H
_ |
| OLD | NEW |