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

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

Issue 12544005: Consolidate storage_monitor/MediaDeviceNotificationsUtils into MediaStorageUtil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac apply patch Created 7 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 // Common code shared between MediaDeviceNotifications{Win,Linux}.
6
7 #ifndef CHROME_BROWSER_STORAGE_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_
8 #define CHROME_BROWSER_STORAGE_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_
9
10 #include "base/files/file_path.h"
11 #include "base/string16.h"
12
13 namespace chrome {
14
15 // Check if the file system at the passed mount point looks like a media
16 // device using the existence of DCIM directory.
17 // Returns true, if it is a media device otherwise return false.
18 // Mac OS X behaves similarly, but this is not the only heuristic it uses.
19 // TODO(vandebo) Try to figure out how Mac OS X decides this, and rename
20 // to avoid confusion with MediaStorageUtil::IsMediaDevice.
21 bool IsMediaDevice(const base::FilePath::StringType& mount_point);
22
23 // Constructs the device product name from |vendor_name| and |model_name|.
24 string16 GetFullProductName(const std::string& vendor_name,
25 const std::string& model_name);
26
27 // Constructs the display name for device from |storage_size_in_bytes| and
28 // |name|.
29 string16 GetDisplayNameForDevice(uint64 storage_size_in_bytes,
30 const string16& name);
31
32 } // namespace chrome
33
34 #endif // CHROME_BROWSER_STORAGE_MONITOR_MEDIA_DEVICE_NOTIFICATIONS_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/storage_monitor/disk_info_mac.mm ('k') | chrome/browser/storage_monitor/media_device_notifications_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698