summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-15 17:32:33 +0000
committerkinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-15 17:32:33 +0000
commitf0417774888b46efa3a354a6ae8f7402d2cac7d6 (patch)
tree13c476014b7f0a718c38f63c0b1082ecb579aa65
parent45814c8f14d52040d41b8a0eb1145926f62d5ac0 (diff)
downloadchromium_src-f0417774888b46efa3a354a6ae8f7402d2cac7d6.zip
chromium_src-f0417774888b46efa3a354a6ae8f7402d2cac7d6.tar.gz
chromium_src-f0417774888b46efa3a354a6ae8f7402d2cac7d6.tar.bz2
ChromeOS: Fix DCHECK failure after file copying in Drive folder.
This is due to multiple callback calls in GDataFileSystem::AddUploadedFileToCache. It should be called exactly once on every code path. BUG=none TEST=Manual: open Drive folder, select a file, ctrl-C and then ctrl-V. Review URL: https://chromiumcodereview.appspot.com/10834328 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151713 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/gdata/gdata_file_system.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index 245af9b9..808ac0e 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -3083,8 +3083,11 @@ void GDataFileSystem::AddUploadedFileToCache(
params->callback));
} else {
NOTREACHED() << "Unexpected upload mode: " << params->upload_mode;
+ // Shouldn't reach here, so the line below should not make much sense, but
+ // since calling |callback| exactly once is our obligation, we'd better call
+ // it for not to clutter further more.
+ params->callback.Run();
}
- params->callback.Run();
}
void GDataFileSystem::Observe(int type,