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

Side by Side Diff: chrome/browser/media_gallery/media_device_notifications_chromeos.cc

Issue 10876093: Improve the device type constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 | Annotate | Revision Log
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/media_gallery/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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 if (!GetDeviceInfo(mount_info.source_path, &unique_id, &device_label)) 145 if (!GetDeviceInfo(mount_info.source_path, &unique_id, &device_label))
146 return; 146 return;
147 147
148 // Keep track of device uuid, to see how often we receive empty uuid values. 148 // Keep track of device uuid, to see how often we receive empty uuid values.
149 UMA_HISTOGRAM_BOOLEAN("MediaDeviceNotification.device_uuid_available", 149 UMA_HISTOGRAM_BOOLEAN("MediaDeviceNotification.device_uuid_available",
150 !unique_id.empty()); 150 !unique_id.empty());
151 if (unique_id.empty()) 151 if (unique_id.empty())
152 return; 152 return;
153 153
154 std::string device_id = chrome::MediaStorageUtil::MakeDeviceId( 154 std::string device_id = chrome::MediaStorageUtil::MakeDeviceId(
155 chrome::MediaStorageUtil::USB_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