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

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

Issue 11573048: [Media Galleries] Move RemovableStorageInfo notifications to chrome namespace (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to head Created 7 years, 12 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
Index: chrome/browser/system_monitor/media_storage_util.cc
diff --git a/chrome/browser/system_monitor/media_storage_util.cc b/chrome/browser/system_monitor/media_storage_util.cc
index bf7d7e5faae8e9445e5e6e018fa37f210c0e6ffe..412cf120a455deeacab9580a209401b50bad1c78 100644
--- a/chrome/browser/system_monitor/media_storage_util.cc
+++ b/chrome/browser/system_monitor/media_storage_util.cc
@@ -12,7 +12,6 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
-#include "base/system_monitor/system_monitor.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/system_monitor/media_device_notifications_utils.h"
#include "chrome/browser/system_monitor/removable_storage_notifications.h"
@@ -22,7 +21,6 @@
#include "chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h"
#endif
-using base::SystemMonitor;
using content::BrowserThread;
const char kRootPath[] = "/";
@@ -77,10 +75,11 @@ bool IsRemovableStorageAttached(const std::string& id) {
FilePath::StringType FindRemovableStorageLocationById(
const std::string& device_id) {
- std::vector<SystemMonitor::RemovableStorageInfo> media_devices =
- SystemMonitor::Get()->GetAttachedRemovableStorage();
- for (std::vector<SystemMonitor::RemovableStorageInfo>::const_iterator it =
- media_devices.begin();
+ std::vector<RemovableStorageNotifications::RemovableStorageInfo>
+ media_devices = RemovableStorageNotifications::GetInstance()->
+ GetAttachedRemovableStorage();
+ for (std::vector<RemovableStorageNotifications::RemovableStorageInfo>::
+ const_iterator it = media_devices.begin();
it != media_devices.end();
++it) {
if (it->device_id == device_id)
@@ -229,7 +228,7 @@ void MediaStorageUtil::IsDeviceAttached(const std::string& device_id,
DCHECK(type == MTP_OR_PTP ||
type == REMOVABLE_MASS_STORAGE_WITH_DCIM ||
type == REMOVABLE_MASS_STORAGE_NO_DCIM);
- // We should be able to find removable storage in SystemMonitor.
+ // We should be able to find removable storage.
callback.Run(IsRemovableStorageAttached(device_id));
}
}
@@ -263,7 +262,7 @@ bool MediaStorageUtil::GetDeviceInfoFromPath(const FilePath& path,
}
bool found_device = false;
- base::SystemMonitor::RemovableStorageInfo device_info;
+ RemovableStorageNotifications::RemovableStorageInfo device_info;
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
RemovableStorageNotifications* notifier =
RemovableStorageNotifications::GetInstance();

Powered by Google App Engine
This is Rietveld 408576698