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

Side by Side Diff: chrome/browser/chromeos/drive/drive_test_util.h

Issue 12588009: drive: Pass through AboutResouce from server among callbacks in ChangeListLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_TEST_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_TEST_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_TEST_UTIL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h" 9 #include "chrome/browser/chromeos/drive/drive_resource_metadata.h"
10 #include "chrome/browser/chromeos/drive/search_metadata.h" 10 #include "chrome/browser/chromeos/drive/search_metadata.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // of the current thread. Used to run asynchronous function that take 160 // of the current thread. Used to run asynchronous function that take
161 // CloseFileCallback. 161 // CloseFileCallback.
162 void CopyResultsFromCloseFileCallbackAndQuit(DriveFileError* out_error, 162 void CopyResultsFromCloseFileCallbackAndQuit(DriveFileError* out_error,
163 DriveFileError error); 163 DriveFileError error);
164 164
165 // Loads a test json file as root ("/drive") element from a test file stored 165 // Loads a test json file as root ("/drive") element from a test file stored
166 // under chrome/test/data/chromeos. Returns true on success. 166 // under chrome/test/data/chromeos. Returns true on success.
167 bool LoadChangeFeed(const std::string& relative_path, 167 bool LoadChangeFeed(const std::string& relative_path,
168 ChangeListLoader* change_list_loader, 168 ChangeListLoader* change_list_loader,
169 bool is_delta_feed, 169 bool is_delta_feed,
170 const std::string& root_resource_id,
170 int64 root_feed_changestamp); 171 int64 root_feed_changestamp);
171 172
172 // Helper to destroy objects which needs Destroy() to be called on destruction. 173 // Helper to destroy objects which needs Destroy() to be called on destruction.
173 // Note: When using this helper, you should destruct objects before 174 // Note: When using this helper, you should destruct objects before
174 // BrowserThread. 175 // BrowserThread.
175 struct DestroyHelperForTests { 176 struct DestroyHelperForTests {
176 template<typename T> 177 template<typename T>
177 void operator()(T* object) const { 178 void operator()(T* object) const {
178 if (object) { 179 if (object) {
179 object->Destroy(); 180 object->Destroy();
180 google_apis::test_util::RunBlockingPoolTask(); // Finish destruction. 181 google_apis::test_util::RunBlockingPoolTask(); // Finish destruction.
181 } 182 }
182 } 183 }
183 }; 184 };
184 185
185 } // namespace test_util 186 } // namespace test_util
186 } // namespace drive 187 } // namespace drive
187 188
188 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_TEST_UTIL_H_ 189 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/drive_file_system_unittest.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