| Index: chrome/common/extensions/docs/examples/api/fileSystemProvider/archive/background.js
|
| diff --git a/chrome/common/extensions/docs/examples/api/fileSystemProvider/archive/background.js b/chrome/common/extensions/docs/examples/api/fileSystemProvider/archive/background.js
|
| index 09458cdf25268712704560fb4d02955f63decfa3..231ddcccce0b806049831b9a5c691304a2379b70 100644
|
| --- a/chrome/common/extensions/docs/examples/api/fileSystemProvider/archive/background.js
|
| +++ b/chrome/common/extensions/docs/examples/api/fileSystemProvider/archive/background.js
|
| @@ -41,12 +41,13 @@ function onUnmountRequested(options, onSuccess, onError) {
|
| chrome.fileSystemProvider.unmount(
|
| {fileSystemId: options.fileSystemId},
|
| function() {
|
| + if (chrome.runtime.lastError) {
|
| + onError(chrome.runtime.lastError.message);
|
| + return;
|
| + }
|
| delete volumes[options.fileSystemId];
|
| saveState(); // Remove volume from local storage state.
|
| onSuccess();
|
| - },
|
| - function() {
|
| - onError('FAILED');
|
| });
|
| };
|
|
|
| @@ -202,8 +203,14 @@ chrome.app.runtime.onLaunched.addListener(function(event) {
|
| volumes[displayPath] = new Volume(item.entry, metadata);
|
| chrome.fileSystemProvider.mount(
|
| {fileSystemId: displayPath, displayName: item.entry.name},
|
| - function() { saveState(); },
|
| - function() { console.error('Failed to mount.'); });
|
| + function() {
|
| + if (chrome.runtime.lastError) {
|
| + console.error('Failed to mount because of: ' +
|
| + chrome.runtime.lastError.message);
|
| + return;
|
| + };
|
| + saveState();
|
| + });
|
| });
|
| },
|
| function(error) {
|
|
|