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

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

Issue 277313002: Make it clear that syncFS getrequestFileSystem can fail. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | 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 // Use the <code>chrome.syncFileSystem</code> API to save and synchronize data 5 // Use the <code>chrome.syncFileSystem</code> API to save and synchronize data
6 // on Google Drive. This API is NOT for accessing arbitrary user docs stored in 6 // on Google Drive. This API is NOT for accessing arbitrary user docs stored in
7 // Google Drive. It provides app-specific syncable storage for offline and 7 // Google Drive. It provides app-specific syncable storage for offline and
8 // caching usage so that the same data can be available across different 8 // caching usage so that the same data can be available across different
9 // clients. Read <a href="app_storage.html">Manage Data</a> for more on using 9 // clients. Read <a href="app_storage.html">Manage Data</a> for more on using
10 // this API. 10 // this API.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // in the same way as the Temporary and Persistant file systems (see 139 // in the same way as the Temporary and Persistant file systems (see
140 // <a href="http://www.w3.org/TR/file-system-api/">http://www.w3.org/TR/file -system-api/</a>), 140 // <a href="http://www.w3.org/TR/file-system-api/">http://www.w3.org/TR/file -system-api/</a>),
141 // except that the filesystem object returned for Sync FileSystem does 141 // except that the filesystem object returned for Sync FileSystem does
142 // <b>NOT</b> support directory operations (yet). You can get a list 142 // <b>NOT</b> support directory operations (yet). You can get a list
143 // of file entries by reading the root directory (by 143 // of file entries by reading the root directory (by
144 // <a href="http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-create Reader-DirectoryReader">creating a new DirectoryReader</a>), 144 // <a href="http://www.w3.org/TR/file-system-api/#widl-DirectoryEntry-create Reader-DirectoryReader">creating a new DirectoryReader</a>),
145 // but cannot create a new directory in it. 145 // but cannot create a new directory in it.
146 // 146 //
147 // Calling this multiple times from 147 // Calling this multiple times from
148 // the same app will return the same handle to the same file system. 148 // the same app will return the same handle to the same file system.
149 //
150 // Note this call can fail. For example, if the user is not signed in to
151 // Chrome or if there is no network operation. To handle these errors it is
152 // important chrome.runtime.lastError is checked in the callback.
149 static void requestFileSystem(GetFileSystemCallback callback); 153 static void requestFileSystem(GetFileSystemCallback callback);
150 154
151 // Sets the default conflict resolution policy 155 // Sets the default conflict resolution policy
152 // for the <code>'syncable'</code> file storage for the app. 156 // for the <code>'syncable'</code> file storage for the app.
153 // By default it is set to <code>'last_write_win'</code>. 157 // By default it is set to <code>'last_write_win'</code>.
154 // When conflict resolution policy is set to <code>'last_write_win'</code> 158 // When conflict resolution policy is set to <code>'last_write_win'</code>
155 // conflicts for existing files are automatically resolved next time 159 // conflicts for existing files are automatically resolved next time
156 // the file is updated. 160 // the file is updated.
157 // |callback| can be optionally given to know if the request has 161 // |callback| can be optionally given to know if the request has
158 // succeeded or not. 162 // succeeded or not.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Fired when an error or other status change has happened in the 194 // Fired when an error or other status change has happened in the
191 // sync backend (for example, when the sync is temporarily disabled due to 195 // sync backend (for example, when the sync is temporarily disabled due to
192 // network or authentication error). 196 // network or authentication error).
193 static void onServiceStatusChanged(ServiceInfo detail); 197 static void onServiceStatusChanged(ServiceInfo detail);
194 198
195 // Fired when a file has been updated by the background sync service. 199 // Fired when a file has been updated by the background sync service.
196 static void onFileStatusChanged(FileInfo detail); 200 static void onFileStatusChanged(FileInfo detail);
197 }; 201 };
198 202
199 }; 203 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698