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

Side by Side Diff: chrome/browser/system_monitor/media_device_notifications_utils.h

Issue 11366144: [Media Gallery][ChromeOS] Improve device media gallery names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. Created 8 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/system_monitor/media_device_notifications_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Common code shared between MediaDeviceNotifications{Win,Linux}. 5 // Common code shared between MediaDeviceNotifications{Win,Linux}.
6 6
7 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_ 7 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_
8 #define CHROME_BROWSER_SYSTEM_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_ 8 #define CHROME_BROWSER_SYSTEM_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/string16.h"
11 12
12 namespace chrome { 13 namespace chrome {
13 14
14 // Check if the file system at the passed mount point looks like a media 15 // Check if the file system at the passed mount point looks like a media
15 // device using the existence of DCIM directory. 16 // device using the existence of DCIM directory.
16 // Returns true, if it is a media device otherwise return false. 17 // Returns true, if it is a media device otherwise return false.
17 // Mac OS X behaves similarly, but this is not the only heuristic it uses. 18 // Mac OS X behaves similarly, but this is not the only heuristic it uses.
18 // TODO(vandebo) Try to figure out how Mac OS X decides this. 19 // TODO(vandebo) Try to figure out how Mac OS X decides this.
19 bool IsMediaDevice(const FilePath::StringType& mount_point); 20 bool IsMediaDevice(const FilePath::StringType& mount_point);
20 21
22 // Constructs the device product name from |vendor_name| and |model_name|.
23 std::string GetFullProductName(const std::string& vendor_name,
Lei Zhang 2012/11/13 01:13:07 Also, have you considered moving the IsStringUTF8(
kmadhusu 2012/11/13 01:37:32 As we discussed, all the callers of this function
24 const std::string& model_name);
25
26 // Constructs the display name for device from |storage_size_in_bytes| and
27 // |name|.
28 string16 GetDisplayNameForDevice(uint64 storage_size_in_bytes,
29 const string16& name);
30
21 } // namespace chrome 31 } // namespace chrome
22 32
23 #endif // CHROME_BROWSER_SYSTEM_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_ 33 #endif // CHROME_BROWSER_SYSTEM_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/system_monitor/media_device_notifications_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698