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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_test_util.h

Issue 10837148: gdata: Add GetEntryInfoByPath() and ReadDirectoryByPath() to GDataDirectoryService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_GDATA_GDATA_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_TEST_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_TEST_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_TEST_UTIL_H_
7 7
8 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" 9 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h"
10 #include "chrome/browser/chromeos/gdata/gdata_files.h"
9 11
10 namespace gdata { 12 namespace gdata {
11 13
14 class GDataEntryProto;
12 class GDataCacheEntry; 15 class GDataCacheEntry;
13 16
14 namespace test_util { 17 namespace test_util {
15 18
16 // Runs a task posted to the blocking pool, including subquent tasks posted 19 // Runs a task posted to the blocking pool, including subquent tasks posted
17 // to the UI message loop and the blocking pool. 20 // to the UI message loop and the blocking pool.
18 // 21 //
19 // A task is often posted to the blocking pool with PostTaskAndReply(). In 22 // A task is often posted to the blocking pool with PostTaskAndReply(). In
20 // that case, a task is posted back to the UI message loop, which can again 23 // that case, a task is posted back to the UI message loop, which can again
21 // post a task to the blocking pool. This function processes these tasks 24 // post a task to the blocking pool. This function processes these tasks
(...skipping 15 matching lines...) Expand all
37 GDataCacheEntry ToCacheEntry(int cache_state); 40 GDataCacheEntry ToCacheEntry(int cache_state);
38 41
39 // Returns true if the cache state of the given two cache entries are equal. 42 // Returns true if the cache state of the given two cache entries are equal.
40 bool CacheStatesEqual(const GDataCacheEntry& a, const GDataCacheEntry& b); 43 bool CacheStatesEqual(const GDataCacheEntry& a, const GDataCacheEntry& b);
41 44
42 // Copies |error| to |output|. Used to run asynchronous functions that take 45 // Copies |error| to |output|. Used to run asynchronous functions that take
43 // FileOperationCallback from tests. 46 // FileOperationCallback from tests.
44 void CopyErrorCodeFromFileOperationCallback( 47 void CopyErrorCodeFromFileOperationCallback(
45 GDataFileError* output, GDataFileError error); 48 GDataFileError* output, GDataFileError error);
46 49
50 // Copies |error| and |entry_proto| to |out_error| and |out_entry_proto|
51 // respectively. Used to run asynchronous functions that take
52 // GetEntryInfoCallback from tests.
53 void CopyResultsFromGetEntryInfoCallback(
54 GDataFileError* out_error,
55 scoped_ptr<GDataEntryProto>* out_entry_proto,
56 GDataFileError error,
57 scoped_ptr<GDataEntryProto> entry_proto);
58
59 // Copies |error| and |entries| to |out_error| and |out_entries|
60 // respectively. Used to run asynchronous functions that take
61 // GetEntryInfoCallback from tests.
62 void CopyResultsFromReadDirectoryCallback(
63 GDataFileError* out_error,
64 scoped_ptr<GDataEntryProtoVector>* out_entries,
65 GDataFileError error,
66 scoped_ptr<GDataEntryProtoVector> entries);
47 67
48 } // namespace test_util 68 } // namespace test_util
49 } // namespace gdata 69 } // namespace gdata
50 70
51 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_TEST_UTIL_H_ 71 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698