| Index: chrome/browser/system_monitor/media_storage_util_win.cc
|
| diff --git a/chrome/browser/system_monitor/media_storage_util_linux.cc b/chrome/browser/system_monitor/media_storage_util_win.cc
|
| old mode 100644
|
| new mode 100755
|
| similarity index 74%
|
| copy from chrome/browser/system_monitor/media_storage_util_linux.cc
|
| copy to chrome/browser/system_monitor/media_storage_util_win.cc
|
| index 7a09f2c8bd2359e730697edca11856f62237b970..4d6abddde66b5b241bf50d078954fc830d853681
|
| --- a/chrome/browser/system_monitor/media_storage_util_linux.cc
|
| +++ b/chrome/browser/system_monitor/media_storage_util_win.cc
|
| @@ -2,28 +2,29 @@
|
| // 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.
|
| +// Windows 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"
|
| +#include "chrome/browser/system_monitor/removable_device_notifications_window_win.h"
|
|
|
| namespace chrome {
|
|
|
| // static
|
| -void MediaStorageUtil::GetDeviceInfoFromPathImpl(const FilePath& path,
|
| +bool MediaStorageUtil::GetDeviceInfoFromPathImpl(const FilePath& path,
|
| std::string* device_id,
|
| string16* device_name,
|
| FilePath* relative_path) {
|
| - RemovableDeviceNotificationsLinux* device_tracker =
|
| - RemovableDeviceNotificationsLinux::GetInstance();
|
| + RemovableDeviceNotificationsWindowWin* device_tracker =
|
| + RemovableDeviceNotificationsWindowWin::GetInstance();
|
| DCHECK(device_tracker);
|
| base::SystemMonitor::RemovableStorageInfo device_info;
|
| - bool found_device = device_tracker->GetDeviceInfoForPath(path, &device_info);
|
| + if (!device_tracker->GetDeviceInfoForPath(path, &device_info))
|
| + return false;
|
|
|
| - if (found_device && IsRemovableDevice(device_info.device_id)) {
|
| + if (IsRemovableDevice(device_info.device_id)) {
|
| if (device_id)
|
| *device_id = device_info.device_id;
|
| if (device_name)
|
| @@ -33,7 +34,7 @@ void MediaStorageUtil::GetDeviceInfoFromPathImpl(const FilePath& path,
|
| FilePath mount_point(device_info.location);
|
| mount_point.AppendRelativePath(path, relative_path);
|
| }
|
| - return;
|
| + return true;
|
| }
|
|
|
| if (device_id)
|
| @@ -42,6 +43,7 @@ void MediaStorageUtil::GetDeviceInfoFromPathImpl(const FilePath& path,
|
| *device_name = path.BaseName().LossyDisplayName();
|
| if (relative_path)
|
| *relative_path = FilePath();
|
| + return true;
|
| }
|
|
|
| } // namespace chrome
|
|
|