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

Unified Diff: chrome/browser/chromeos/drive/sync/entry_update_performer.cc

Issue 216333003: drive: Do not try to UpdateResource with empty resource ID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/sync/entry_update_performer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/sync/entry_update_performer.cc
diff --git a/chrome/browser/chromeos/drive/sync/entry_update_performer.cc b/chrome/browser/chromeos/drive/sync/entry_update_performer.cc
index d9c4c6d0f178c5bcb05c1b6bb7dbd3acf453f4da..7fa3c9eb7ab9d02c69b32ff042892e72f305bb55 100644
--- a/chrome/browser/chromeos/drive/sync/entry_update_performer.cc
+++ b/chrome/browser/chromeos/drive/sync/entry_update_performer.cc
@@ -323,13 +323,12 @@ void EntryUpdatePerformer::UpdateEntryAfterPrepare(
}
// No need to perform update.
- if (local_state->entry.metadata_edit_state() == ResourceEntry::CLEAN) {
+ if (local_state->entry.metadata_edit_state() == ResourceEntry::CLEAN ||
+ local_state->entry.resource_id().empty()) {
callback.Run(FILE_ERROR_OK);
return;
}
- DCHECK(!local_state->entry.resource_id().empty());
-
// Perform metadata update.
scheduler_->UpdateResource(
local_state->entry.resource_id(), local_state->parent_entry.resource_id(),
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/sync/entry_update_performer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698