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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_event_router.cc

Issue 9796013: Set sourceUrl property of mountpoint info for gdata to empty string if mount fails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_browser_event_router.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
index ec1014bf303cb69f719b5c24ea8f5d9abe2485fe..35444ec786dfbbae787c6bde579cfe4f0e9a8355 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -370,6 +370,12 @@ void FileBrowserEventRouter::DispatchMountCompletedEvent(
file_manager_util::GetFileBrowserExtensionUrl().GetOrigin(),
&source_url)) {
mount_info_value->SetString("sourceUrl", source_url.spec());
+ } else {
+ // If mounting of gdata moutn point failed, we may not be able to convert
achuithb 2012/03/21 19:38:29 nit: moutn->mount
+ // source path to source url, so let just send empty string.
+ DCHECK(mount_info.mount_type == chromeos::MOUNT_TYPE_GDATA &&
+ error_code != chromeos::MOUNT_ERROR_NONE);
+ mount_info_value->SetString("sourceUrl", "");
}
} else {
mount_info_value->SetString("sourceUrl", mount_info.source_path);
« 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