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

Side by Side Diff: chrome/common/extensions/api/sync_file_system.idl

Issue 11316133: Added implementation of SyncEventObserver to route events to Javascript Extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Kinuko review #2 (after little fixups) Created 8 years 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
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 namespace syncFileSystem { 5 namespace syncFileSystem {
6 dictionary StorageInfo { 6 dictionary StorageInfo {
7 long usage_bytes; 7 long usage_bytes;
8 long quota_bytes; 8 long quota_bytes;
9 }; 9 };
10 10
11 dictionary SyncState { 11 dictionary SyncState {
12 DOMString service_name; // i.e. ‘drive’ 12 DOMString service_name; // i.e. ‘drive’
13 SyncStateStatus state; 13 SyncStateStatus state;
14 DOMString description; 14 DOMString description;
15 }; 15 };
16 16
17 enum SyncOperationType {
18 FILE_ADDED,
19 FILE_UPDATED,
20 FILE_DELETED
kinuko 2012/11/28 11:06:40 I was looking at other idl files that use enum and
calvinlo 2012/11/28 12:26:34 Done.
21 };
22
17 enum SyncStateStatus { 23 enum SyncStateStatus {
18 // The sync service is being initialized (e.g. restoring data from the 24 // The sync service is being initialized (e.g. restoring data from the
19 // database, checking connectivity and authenticating to the service etc). 25 // database, checking connectivity and authenticating to the service etc).
20 INITIALIZING, 26 INITIALIZING,
21 27
22 // The sync service is up and running. 28 // The sync service is up and running.
23 RUNNING, 29 RUNNING,
24 30
25 // The sync service is not synchronizing files because the remote service 31 // The sync service is not synchronizing files because the remote service
26 // needs to be authenticated by the user to proceed. 32 // needs to be authenticated by the user to proceed.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Deletes everything in the syncable filesystem. 70 // Deletes everything in the syncable filesystem.
65 static void deleteFileSystem([instanceOf=DOMFileSystem] object fileSystem, 71 static void deleteFileSystem([instanceOf=DOMFileSystem] object fileSystem,
66 DeleteFileSystemCallback callback); 72 DeleteFileSystemCallback callback);
67 }; 73 };
68 74
69 interface Events { 75 interface Events {
70 // Fired when an error or other state change has happened in the 76 // Fired when an error or other state change has happened in the
71 // sync backend. (E.g. the sync is temporarily disabled due to 77 // sync backend. (E.g. the sync is temporarily disabled due to
72 // network or authentication error etc) 78 // network or authentication error etc)
73 static void onSyncStateChanged(SyncState detail); 79 static void onSyncStateChanged(SyncState detail);
80
81 // Fired when a file has been updated by the background sync service.
82 // TODO(calvinlo): Convert |file_entry_path| from to Webkit FileEntry.
83 static void onFileSynced(DOMString file_entry_path,
84 SyncOperationType operation);
74 }; 85 };
75 }; 86 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698