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

Unified Diff: chrome/browser/storage_monitor/media_storage_util.cc

Issue 13533009: Storage Monitor: Remove MediaTransferProtocolDeviceObserverLinux::GetInstance() and access it only … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 years, 8 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/storage_monitor/media_transfer_protocol_device_observer_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/storage_monitor/media_storage_util.cc
===================================================================
--- chrome/browser/storage_monitor/media_storage_util.cc (revision 192467)
+++ chrome/browser/storage_monitor/media_storage_util.cc (working copy)
@@ -17,10 +17,6 @@
#include "content/public/browser/browser_thread.h"
#include "ui/base/text/bytes_formatting.h"
-#if defined(OS_LINUX) // Implies OS_CHROMEOS
-#include "chrome/browser/storage_monitor/media_transfer_protocol_device_observer_linux.h"
-#endif
-
using content::BrowserThread;
namespace chrome {
@@ -301,21 +297,10 @@
if (!path.IsAbsolute())
return false;
- bool found_device = false;
StorageInfo info;
StorageMonitor* monitor = StorageMonitor::GetInstance();
- found_device = monitor->GetStorageInfoForPath(path, &info);
+ bool found_device = monitor->GetStorageInfoForPath(path, &info);
-// TODO(gbillock): Move this upstream into the RemovableStorageNotifications
-// implementation to handle in its GetDeviceInfoForPath call.
-#if defined(OS_LINUX)
- if (!found_device) {
- MediaTransferProtocolDeviceObserverLinux* mtp_manager =
- MediaTransferProtocolDeviceObserverLinux::GetInstance();
- found_device = mtp_manager->GetStorageInfoForPath(path, &info);
- }
-#endif
-
if (found_device && IsRemovableDevice(info.device_id)) {
base::FilePath sub_folder_path;
if (path.value() != info.location) {
@@ -346,7 +331,7 @@
#endif
// Handle non-removable devices. Note: this is just overwriting
- // good values from RemovableStorageNotifications.
+ // good values from StorageMonitor.
// TODO(gbillock): Make sure return values from that class are definitive,
// and don't do this here.
info.device_id = MakeDeviceId(FIXED_MASS_STORAGE, path.AsUTF8Unsafe());
« no previous file with comments | « no previous file | chrome/browser/storage_monitor/media_transfer_protocol_device_observer_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698