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

Side by Side Diff: chrome/browser/chromeos/disks/disk_mount_manager.h

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, 10 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) 2011 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 #ifndef CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
11 #include "chrome/browser/chromeos/dbus/cros_disks_client.h" 11 #include "chrome/browser/chromeos/dbus/cros_disks_client.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 // Returns corresponding string to |type| like "device" or "file". 227 // Returns corresponding string to |type| like "device" or "file".
228 static std::string MountTypeToString(MountType type); 228 static std::string MountTypeToString(MountType type);
229 229
230 // The inverse function of MountTypeToString. 230 // The inverse function of MountTypeToString.
231 static MountType MountTypeFromString(const std::string& type_str); 231 static MountType MountTypeFromString(const std::string& type_str);
232 232
233 // Returns corresponding string to |type| like "unknown_filesystem". 233 // Returns corresponding string to |type| like "unknown_filesystem".
234 static std::string MountConditionToString(MountCondition type); 234 static std::string MountConditionToString(MountCondition type);
235 235
236 // Returns corresponding string to |type|, like "sd", "usb".
237 static std::string DeviceTypeToString(DeviceType type);
238
236 // Creates the global DiskMountManager instance. 239 // Creates the global DiskMountManager instance.
237 static void Initialize(); 240 static void Initialize();
238 241
239 // Similar to Initialize(), but can inject an alternative 242 // Similar to Initialize(), but can inject an alternative
240 // DiskMountManager such as MockDiskMountManager for testing. 243 // DiskMountManager such as MockDiskMountManager for testing.
241 // The injected object will be owned by the internal pointer and deleted 244 // The injected object will be owned by the internal pointer and deleted
242 // by Shutdown(). 245 // by Shutdown().
243 static void InitializeForTesting(DiskMountManager* disk_mount_manager); 246 static void InitializeForTesting(DiskMountManager* disk_mount_manager);
244 247
245 // Destroys the global DiskMountManager instance if it exists. 248 // Destroys the global DiskMountManager instance if it exists.
246 static void Shutdown(); 249 static void Shutdown();
247 250
248 // Returns a pointer to the global DiskMountManager instance. 251 // Returns a pointer to the global DiskMountManager instance.
249 // Initialize() should already have been called. 252 // Initialize() should already have been called.
250 static DiskMountManager* GetInstance(); 253 static DiskMountManager* GetInstance();
251 }; 254 };
252 255
253 } // namespace disks 256 } // namespace disks
254 } // namespace chromeos 257 } // namespace chromeos
255 258
256 #endif // CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_ 259 #endif // CHROME_BROWSER_CHROMEOS_DISKS_DISK_MOUNT_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/dbus/cros_disks_client.cc ('k') | chrome/browser/chromeos/disks/disk_mount_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698