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

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

Issue 10909259: Share MediaStorageUtil common code among platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try a different way 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/system_monitor/media_storage_util_linux.cc
diff --git a/chrome/browser/system_monitor/media_storage_util_linux.cc b/chrome/browser/system_monitor/media_storage_util_linux.cc
deleted file mode 100644
index 87e5eda410cf635fb04bfa16484cf2ecedfd9c8d..0000000000000000000000000000000000000000
--- a/chrome/browser/system_monitor/media_storage_util_linux.cc
+++ /dev/null
@@ -1,48 +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/system_monitor/media_storage_util.h"
-
-#include "base/callback.h"
-#include "base/system_monitor/system_monitor.h"
-#include "chrome/browser/system_monitor/removable_device_notifications_linux.h"
-
-namespace chrome {
-
-// static
-bool MediaStorageUtil::GetDeviceInfoFromPathImpl(const FilePath& path,
- std::string* device_id,
- string16* device_name,
- FilePath* relative_path) {
- RemovableDeviceNotificationsLinux* device_tracker =
- RemovableDeviceNotificationsLinux::GetInstance();
- DCHECK(device_tracker);
- base::SystemMonitor::RemovableStorageInfo device_info;
- bool found_device = device_tracker->GetDeviceInfoForPath(path, &device_info);
-
- if (found_device && IsRemovableDevice(device_info.device_id)) {
- if (device_id)
- *device_id = device_info.device_id;
- if (device_name)
- *device_name = device_info.name;
- if (relative_path) {
- *relative_path = FilePath();
- FilePath mount_point(device_info.location);
- mount_point.AppendRelativePath(path, relative_path);
- }
- return true;
- }
-
- if (device_id)
- *device_id = MakeDeviceId(FIXED_MASS_STORAGE, path.AsUTF8Unsafe());
- if (device_name)
- *device_name = path.BaseName().LossyDisplayName();
- if (relative_path)
- *relative_path = FilePath();
- return true;
-}
-
-} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698