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

Unified Diff: chrome/browser/system_monitor/disk_info_mac.h

Issue 10919185: Implement RemovableDeviceNotifications for Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix threading 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/system_monitor/disk_info_mac.h
diff --git a/chrome/browser/system_monitor/disk_info_mac.h b/chrome/browser/system_monitor/disk_info_mac.h
new file mode 100644
index 0000000000000000000000000000000000000000..64cdf559ce393547adad652402aa3a40e99d9678
--- /dev/null
+++ b/chrome/browser/system_monitor/disk_info_mac.h
@@ -0,0 +1,40 @@
+// 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.
+
+#ifndef CHROME_BROWSER_SYSTEM_MONITOR_DISK_INFO_MAC_H_
+#define CHROME_BROWSER_SYSTEM_MONITOR_DISK_INFO_MAC_H_
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#include "base/file_path.h"
+#include "chrome/browser/system_monitor/media_storage_util.h"
+
+namespace chrome {
+
+// This class stores information about a particular disk. This class is not
+// thread safe and must only be used from the file thread.
Nico 2012/09/10 07:02:34 Looks like only the static function isn't threadsa
sail 2012/09/10 21:58:43 Done.
+class DiskInfoMac {
+ public:
+ DiskInfoMac();
+ ~DiskInfoMac();
+
+ static DiskInfoMac BuildDiskInfoOnFileThread(CFDictionaryRef dict);
+
+ const std::string& bsd_name() const { return bsd_name_; }
+ const std::string& device_id() const { return device_id_; }
+ const string16 display_name() const { return display_name_; }
+ const FilePath& mount_point() const { return mount_point_; }
+ MediaStorageUtil::Type type() const { return type_; }
+
+ private:
+ std::string bsd_name_;
+ std::string device_id_;
+ string16 display_name_;
+ FilePath mount_point_;
+ MediaStorageUtil::Type type_;
vandebo (ex-Chrome) 2012/09/10 18:45:03 You don't really need to store type separate from
sail 2012/09/10 21:58:43 Yea, it seemed easier to store it than breaking ap
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_SYSTEM_MONITOR_DISK_INFO_MAC_H_

Powered by Google App Engine
This is Rietveld 408576698