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

Unified Diff: chrome/browser/chromeos/drive/drive_file_system_util.h

Issue 12706012: chromeos: Destruct DriveResourceMetadata on the blocking pool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add note 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/drive_file_system_util.h
diff --git a/chrome/browser/chromeos/drive/drive_file_system_util.h b/chrome/browser/chromeos/drive/drive_file_system_util.h
index 193cb8853da171c0a19f72695eab4ded15f458cb..c716b274570832da857ebd34d28d87c1c35c6ae2 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_util.h
+++ b/chrome/browser/chromeos/drive/drive_file_system_util.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/callback_forward.h"
+#include "base/memory/scoped_ptr.h"
#include "base/platform_file.h"
#include "chrome/browser/chromeos/drive/drive_file_error.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
@@ -139,6 +140,15 @@ void ConvertPlatformFileInfoToProto(const base::PlatformFileInfo& file_info,
// Does nothing with |error|. Used with functions taking FileOperationCallback.
void EmptyFileOperationCallback(DriveFileError error);
+// Helper to destroy objects which needs Destroy() to be called on destruction.
+struct DestroyHelper {
+ template<typename T>
+ void operator()(T* object) const {
+ if (object)
+ object->Destroy();
+ }
+};
+
} // namespace util
} // namespace drive
« no previous file with comments | « chrome/browser/chromeos/drive/drive_file_system_unittest.cc ('k') | chrome/browser/chromeos/drive/drive_resource_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698