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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/memory/scoped_ptr.h"
11 #include "base/platform_file.h" 12 #include "base/platform_file.h"
12 #include "chrome/browser/chromeos/drive/drive_file_error.h" 13 #include "chrome/browser/chromeos/drive/drive_file_error.h"
13 #include "chrome/browser/google_apis/gdata_errorcode.h" 14 #include "chrome/browser/google_apis/gdata_errorcode.h"
14 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
15 16
16 class Profile; 17 class Profile;
17 18
18 namespace base { 19 namespace base {
19 class FilePath; 20 class FilePath;
20 } 21 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void ConvertProtoToPlatformFileInfo(const PlatformFileInfoProto& proto, 133 void ConvertProtoToPlatformFileInfo(const PlatformFileInfoProto& proto,
133 base::PlatformFileInfo* file_info); 134 base::PlatformFileInfo* file_info);
134 135
135 // Converts the platform file info to the proto representation. 136 // Converts the platform file info to the proto representation.
136 void ConvertPlatformFileInfoToProto(const base::PlatformFileInfo& file_info, 137 void ConvertPlatformFileInfoToProto(const base::PlatformFileInfo& file_info,
137 PlatformFileInfoProto* proto); 138 PlatformFileInfoProto* proto);
138 139
139 // Does nothing with |error|. Used with functions taking FileOperationCallback. 140 // Does nothing with |error|. Used with functions taking FileOperationCallback.
140 void EmptyFileOperationCallback(DriveFileError error); 141 void EmptyFileOperationCallback(DriveFileError error);
141 142
143 // Helper to destroy objects which needs Destroy() to be called on destruction.
144 struct DestroyHelper {
145 template<typename T>
146 void operator()(T* object) const {
147 if (object)
148 object->Destroy();
149 }
150 };
151
142 } // namespace util 152 } // namespace util
143 } // namespace drive 153 } // namespace drive
144 154
145 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_ 155 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_UTIL_H_
OLDNEW
« 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