Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // chromeos::MediaDeviceNotifications implementation. | 5 // chromeos::MediaDeviceNotifications implementation. |
| 6 | 6 |
| 7 #include "chrome/browser/system_monitor/media_device_notifications_chromeos.h" | 7 #include "chrome/browser/system_monitor/media_device_notifications_chromeos.h" |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 35 *device_label = UTF8ToUTF16(disk->device_label().empty() ? | 35 *device_label = UTF8ToUTF16(disk->device_label().empty() ? |
| 36 FilePath(source_path).BaseName().value() : | 36 FilePath(source_path).BaseName().value() : |
| 37 disk->device_label()); | 37 disk->device_label()); |
| 38 return true; | 38 return true; |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // namespace | 41 } // namespace |
| 42 | 42 |
| 43 using content::BrowserThread; | 43 using content::BrowserThread; |
| 44 | 44 |
| 45 MediaDeviceNotifications::MediaDeviceNotifications() { | 45 MediaDeviceNotifications::MediaDeviceNotifications() { |
|
vandebo (ex-Chrome)
2012/09/11 22:49:27
In the construction of each implementation you nee
Hongbo Min
2012/09/12 09:24:31
Done.
| |
| 46 DCHECK(disks::DiskMountManager::GetInstance()); | 46 DCHECK(disks::DiskMountManager::GetInstance()); |
| 47 disks::DiskMountManager::GetInstance()->AddObserver(this); | 47 disks::DiskMountManager::GetInstance()->AddObserver(this); |
| 48 CheckExistingMountPointsOnUIThread(); | 48 CheckExistingMountPointsOnUIThread(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 MediaDeviceNotifications::~MediaDeviceNotifications() { | 51 MediaDeviceNotifications::~MediaDeviceNotifications() { |
| 52 disks::DiskMountManager* manager = disks::DiskMountManager::GetInstance(); | 52 disks::DiskMountManager* manager = disks::DiskMountManager::GetInstance(); |
| 53 if (manager) { | 53 if (manager) { |
| 54 manager->RemoveObserver(this); | 54 manager->RemoveObserver(this); |
| 55 } | 55 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 | 153 |
| 154 std::string device_id = chrome::MediaStorageUtil::MakeDeviceId( | 154 std::string device_id = chrome::MediaStorageUtil::MakeDeviceId( |
| 155 chrome::MediaStorageUtil::REMOVABLE_MASS_STORAGE_WITH_DCIM, unique_id); | 155 chrome::MediaStorageUtil::REMOVABLE_MASS_STORAGE_WITH_DCIM, unique_id); |
| 156 mount_map_.insert(std::make_pair(mount_info.mount_path, device_id)); | 156 mount_map_.insert(std::make_pair(mount_info.mount_path, device_id)); |
| 157 base::SystemMonitor::Get()->ProcessRemovableStorageAttached( | 157 base::SystemMonitor::Get()->ProcessRemovableStorageAttached( |
| 158 device_id, | 158 device_id, |
| 159 device_label, | 159 device_label, |
| 160 mount_info.mount_path); | 160 mount_info.mount_path); |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool MediaDeviceNotifications::StartWatchingStorage( | |
| 164 const FilePath::StringType& path) { | |
| 165 return false; | |
| 166 } | |
| 167 | |
| 168 bool MediaDeviceNotifications::StopWatchingStorage( | |
| 169 const FilePath::StringType& path) { | |
| 170 return false; | |
| 171 } | |
| 172 | |
| 163 } // namespace chrome | 173 } // namespace chrome |
| OLD | NEW |