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

Unified Diff: chrome/browser/storage_monitor/udev_util_linux.h

Issue 16041004: Cleanup: Remove ScopedGenericObj usage in chrome/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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/storage_monitor/udev_util_linux.h
===================================================================
--- chrome/browser/storage_monitor/udev_util_linux.h (revision 202209)
+++ chrome/browser/storage_monitor/udev_util_linux.h (working copy)
@@ -9,7 +9,7 @@
#include <string>
-#include "base/memory/scoped_generic_obj.h"
+#include "base/memory/scoped_ptr.h"
namespace base {
class FilePath;
@@ -17,25 +17,19 @@
namespace chrome {
-// ScopedGenericObj functor for UdevObjectRelease().
-class ScopedReleaseUdevObject {
- public:
- void operator()(struct udev* udev) const {
- udev_unref(udev);
- }
+// Deleter for ScopedUdevObject.
+struct UdevDeleter {
+ void operator()(struct udev* udev);
};
-typedef ScopedGenericObj<struct udev*,
- ScopedReleaseUdevObject> ScopedUdevObject;
+typedef scoped_ptr<struct udev, UdevDeleter> ScopedUdevObject;
-// ScopedGenericObj functor for UdevDeviceObjectRelease().
-class ScopedReleaseUdevDeviceObject {
+// Deleter for ScopedUdevDeviceObject().
+struct UdevDeviceDeleter {
public:
vandebo (ex-Chrome) 2013/05/28 19:01:07 nit: remove public
Lei Zhang 2013/05/28 20:37:18 Done.
- void operator()(struct udev_device* device) const {
- udev_device_unref(device);
- }
+ void operator()(struct udev_device* device);
};
-typedef ScopedGenericObj<struct udev_device*,
- ScopedReleaseUdevDeviceObject> ScopedUdevDeviceObject;
+typedef scoped_ptr<struct udev_device, UdevDeviceDeleter>
+ ScopedUdevDeviceObject;
// Wrapper function for udev_device_get_property_value() that also checks for
// valid but empty values.
« no previous file with comments | « chrome/browser/media_galleries/fileapi/native_media_file_util.cc ('k') | chrome/browser/storage_monitor/udev_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698