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

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

Issue 7748003: Show only one error notification per inserted mulitpartitioned usb card. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "We can leave HideFileBrowserNotification calls as they were" Created 9 years, 4 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 b33912fe1f771f49d948bdb40989bdfaf372a5fb..5c0fc9954d8f42ccc44958b13d7bc27cdd1256d7 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -210,12 +210,15 @@ void ExtensionFileBrowserEventRouter::MountCompleted(
chromeos::MountLibrary::Disk* disk =
mount_lib->disks().find(mount_info.source_path)->second;
+ std::string notification_sys_path =
+ disk->system_path().substr(0, disk->system_path().rfind("/block"));
zel 2011/08/25 13:50:47 /block feels bit too platform specific. i.e. new k
+
if (!error_code) {
HideFileBrowserNotification("MOUNT", disk->system_path());
} else {
HideFileBrowserNotification("MOUNT", disk->system_path());
if (!disk->drive_label().empty()) {
- ShowFileBrowserNotification("MOUNT", disk->system_path(),
+ ShowFileBrowserNotification("MOUNT", notification_sys_path,
zel 2011/08/25 13:50:47 make "MOUNT' constant
IDR_PAGEINFO_INFO,
l10n_util::GetStringUTF16(IDS_REMOVABLE_DEVICE_DETECTION_TITLE),
// TODO(tbarzic): Find more suitable message.
@@ -224,7 +227,7 @@ void ExtensionFileBrowserEventRouter::MountCompleted(
ASCIIToUTF16(disk->drive_label()),
ASCIIToUTF16(MountErrorToString(error_code))));
} else {
- ShowFileBrowserNotification("MOUNT", disk->system_path(),
+ ShowFileBrowserNotification("MOUNT", notification_sys_path,
IDR_PAGEINFO_INFO,
l10n_util::GetStringUTF16(IDS_REMOVABLE_DEVICE_DETECTION_TITLE),
// TODO(tbarzic): Find more suitable message.
« 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