| 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 namespace syncFileSystem { | 5 namespace syncFileSystem { |
| 6 dictionary StorageInfo { |
| 7 long usage_bytes; |
| 8 long quota_bytes; |
| 9 }; |
| 10 |
| 6 // [nodoc] A callback type for requestFileSystem. | 11 // [nodoc] A callback type for requestFileSystem. |
| 7 callback GetFileSystemCallback = | 12 callback GetFileSystemCallback = |
| 8 void ([instanceOf=DOMFileSystem] object fileSystem); | 13 void ([instanceOf=DOMFileSystem] object fileSystem); |
| 14 |
| 15 // [nodoc] A callback type for getUsageAndQuota. |
| 16 callback QuotaAndUsageCallback = void (StorageInfo info); |
| 9 | 17 |
| 10 interface Functions { | 18 interface Functions { |
| 11 // Get a sync file system backed by |serviceName|. | 19 // Get a sync file system backed by |serviceName|. |
| 12 // Calling this multiple times from the same app with the same |serviceName| | 20 // Calling this multiple times from the same app with the same |serviceName| |
| 13 // will return the same handle to the same file system. | 21 // will return the same handle to the same file system. |
| 14 static void requestFileSystem(DOMString serviceName, | 22 static void requestFileSystem(DOMString serviceName, |
| 15 GetFileSystemCallback callback); | 23 GetFileSystemCallback callback); |
| 24 |
| 25 // Get usage and quota in bytes for sync file system with |serviceName|. |
| 26 static void getUsageAndQuota(DOMString serviceName, |
| 27 QuotaAndUsageCallback callback); |
| 16 }; | 28 }; |
| 17 }; | 29 }; |
| 18 | |
| OLD | NEW |