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

Unified Diff: chrome/browser/chromeos/drive/drive_test_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_test_util.h
diff --git a/chrome/browser/chromeos/drive/drive_test_util.h b/chrome/browser/chromeos/drive/drive_test_util.h
index 03fb3d93124f67a5e37525b77f83e49dca814200..d95a245a15f8d67ffb1354ecac836894b45c2dc9 100644
--- a/chrome/browser/chromeos/drive/drive_test_util.h
+++ b/chrome/browser/chromeos/drive/drive_test_util.h
@@ -169,9 +169,18 @@ bool LoadChangeFeed(const std::string& relative_path,
bool is_delta_feed,
int64 root_feed_changestamp);
-// DriveCache has private destructor, so it is impossible to delete the
-// instance directly. This method delete it correctly.
-void DeleteDriveCache(DriveCache* drive_cache);
+// Helper to destroy objects which needs Destroy() to be called on destruction.
+// Note: When using this helper, you should destruct objects before
+// BrowserThread.
+struct DestroyHelperForTests {
+ template<typename T>
+ void operator()(T* object) const {
+ if (object) {
+ object->Destroy();
+ google_apis::test_util::RunBlockingPoolTask(); // Finish destruction.
+ }
+ }
+};
} // namespace test_util
} // namespace drive
« no previous file with comments | « chrome/browser/chromeos/drive/drive_system_service.cc ('k') | chrome/browser/chromeos/drive/drive_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698