| 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
|
|
|
|
|