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

Side by Side Diff: chrome/browser/system_monitor/media_device_notifications_chromeos.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: modify for chromeos and win 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 unified diff | Download patch
OLDNEW
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/media_gallery/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"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/media_gallery/media_device_notifications_utils.h" 15 #include "chrome/browser/system_monitor/media_device_notifications_utils.h"
16 #include "chrome/browser/media_gallery/media_storage_util.h" 16 #include "chrome/browser/system_monitor/media_storage_util.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
21 namespace { 21 namespace {
22 22
23 bool GetDeviceInfo(const std::string& source_path, std::string* unique_id, 23 bool GetDeviceInfo(const std::string& source_path, std::string* unique_id,
24 string16* device_label) { 24 string16* device_label) {
25 // Get the media device uuid and label if exists. 25 // Get the media device uuid and label if exists.
26 const disks::DiskMountManager::Disk* disk = 26 const disks::DiskMountManager::Disk* disk =
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } // namespace chrome 163 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698