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

Unified Diff: chrome/browser/media_gallery/media_storage_util_linux.cc

Issue 10919051: Move device notification impl out of chrome/browser/media_gallery (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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/media_gallery/media_storage_util_linux.cc
diff --git a/chrome/browser/media_gallery/media_storage_util_linux.cc b/chrome/browser/media_gallery/media_storage_util_linux.cc
deleted file mode 100644
index 830aa874579707aa5a6985c7bf655e10cde934cc..0000000000000000000000000000000000000000
--- a/chrome/browser/media_gallery/media_storage_util_linux.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Linux specific implementation of chrome::MediaStorageUtil.
-
-#include "chrome/browser/media_gallery/media_storage_util.h"
-
-#include "base/callback.h"
-#include "base/system_monitor/system_monitor.h"
-#include "chrome/browser/media_gallery/removable_device_notifications_linux.h"
-
-namespace chrome {
-
-// static
-void MediaStorageUtil::GetDeviceInfoFromPath(
- const FilePath& path, const DeviceInfoCallback& callback) {
- RemovableDeviceNotificationsLinux* device_tracker =
- RemovableDeviceNotificationsLinux::GetInstance();
- DCHECK(device_tracker);
- base::SystemMonitor::RemovableStorageInfo device_info;
- bool found_device = device_tracker->GetDeviceInfoForPath(path, &device_info);
-
- FilePath relative_path;
- if (found_device && IsRemovableDevice(device_info.device_id)) {
- FilePath mount_point(device_info.location);
- mount_point.AppendRelativePath(path, &relative_path);
- } else {
- device_info.device_id =
- MakeDeviceId(FIXED_MASS_STORAGE, path.AsUTF8Unsafe());
- device_info.name = path.BaseName().LossyDisplayName();
- }
- callback.Run(device_info.device_id, relative_path, device_info.name);
-}
-
-} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698