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

Unified Diff: chrome/browser/chromeos/disks/disk_mount_manager.cc

Issue 9019002: [CrosDisksClient] Determine device type from DeviceMediaType property sent by cros-disks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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/chromeos/disks/disk_mount_manager.cc
diff --git a/chrome/browser/chromeos/disks/disk_mount_manager.cc b/chrome/browser/chromeos/disks/disk_mount_manager.cc
index e831ccf1a1ce2e116e1092784d5107cd031c48dd..47e615a1f2f05358e93fe4c0690270baa636317f 100644
--- a/chrome/browser/chromeos/disks/disk_mount_manager.cc
+++ b/chrome/browser/chromeos/disks/disk_mount_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -632,6 +632,22 @@ MountType DiskMountManager::MountTypeFromString(const std::string& type_str) {
}
// static
+std::string DiskMountManager::DeviceTypeToString(DeviceType type) {
+ switch (type) {
+ case DEVICE_TYPE_USB:
+ return "usb";
+ case DEVICE_TYPE_SD:
+ return "sd";
+ case DEVICE_TYPE_OPTICAL_DISC:
+ return "optical";
+ case DEVICE_TYPE_MOBILE:
+ return "mobile";
+ default:
+ return "unknown";
+ }
+}
+
+// static
void DiskMountManager::Initialize() {
if (g_disk_mount_manager) {
LOG(WARNING) << "DiskMountManager was already initialized";
« no previous file with comments | « chrome/browser/chromeos/disks/disk_mount_manager.h ('k') | chrome/browser/chromeos/disks/mock_disk_mount_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698