summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 18:05:15 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 18:05:15 +0000
commitd3bd1fe2f5f452f22939d4b44410ecc0c4de0f64 (patch)
tree65c414ac32580a2b8c491f77ec1a5108afe7c3b0 /webkit/fileapi
parente6758be39514daa66af3ef66013d50be3a6c1d1e (diff)
downloadchromium_src-d3bd1fe2f5f452f22939d4b44410ecc0c4de0f64.zip
chromium_src-d3bd1fe2f5f452f22939d4b44410ecc0c4de0f64.tar.gz
chromium_src-d3bd1fe2f5f452f22939d4b44410ecc0c4de0f64.tar.bz2
SyncFS: it should not crash even when invalid FileEntry is given to getFileStatus
BUG=175107 TEST=manual Review URL: https://chromiumcodereview.appspot.com/12224074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi')
-rw-r--r--webkit/fileapi/syncable/local_file_sync_context.cc5
-rw-r--r--webkit/fileapi/syncable/local_file_sync_context.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/webkit/fileapi/syncable/local_file_sync_context.cc b/webkit/fileapi/syncable/local_file_sync_context.cc
index b237aaa..60d87d5 100644
--- a/webkit/fileapi/syncable/local_file_sync_context.cc
+++ b/webkit/fileapi/syncable/local_file_sync_context.cc
@@ -288,7 +288,10 @@ void LocalFileSyncContext::HasPendingLocalChanges(
file_system_context->change_tracker()->GetChangesForURL(url, &changes);
// Fire the callback on UI thread.
- ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, !changes.empty()));
+ ui_task_runner_->PostTask(FROM_HERE,
+ base::Bind(callback,
+ SYNC_STATUS_OK,
+ !changes.empty()));
}
void LocalFileSyncContext::AddOriginChangeObserver(
diff --git a/webkit/fileapi/syncable/local_file_sync_context.h b/webkit/fileapi/syncable/local_file_sync_context.h
index a2107f2a..a1e8c36 100644
--- a/webkit/fileapi/syncable/local_file_sync_context.h
+++ b/webkit/fileapi/syncable/local_file_sync_context.h
@@ -51,7 +51,8 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext
const LocalFileSyncInfo& sync_file_info)>
LocalFileSyncInfoCallback;
- typedef base::Callback<void(bool has_pending_changes)>
+ typedef base::Callback<void(fileapi::SyncStatusCode status,
+ bool has_pending_changes)>
HasPendingLocalChangeCallback;
LocalFileSyncContext(base::SingleThreadTaskRunner* ui_task_runner,