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

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

Issue 10827211: Replace GDataDirectory::TakeEntry with GDataDirectoryService::AddEntryToDirectory. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: renames as per feedback 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 "base/memory/scoped_ptr.h"
9 #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" 10 #include "chrome/browser/chromeos/gdata/gdata_files.h"
11 11
12 class FilePath;
13
12 namespace gdata { 14 namespace gdata {
13 15
14 class GDataEntryProto; 16 class GDataEntryProto;
15 class GDataCacheEntry; 17 class GDataCacheEntry;
16 18
17 namespace test_util { 19 namespace test_util {
18 20
19 // Runs a task posted to the blocking pool, including subquent tasks posted 21 // Runs a task posted to the blocking pool, including subquent tasks posted
20 // to the UI message loop and the blocking pool. 22 // to the UI message loop and the blocking pool.
21 // 23 //
(...skipping 15 matching lines...) Expand all
37 39
38 // Converts |cache_state| which is a bit mask of TestGDataCacheState, to a 40 // Converts |cache_state| which is a bit mask of TestGDataCacheState, to a
39 // GDataCacheEntry. 41 // GDataCacheEntry.
40 GDataCacheEntry ToCacheEntry(int cache_state); 42 GDataCacheEntry ToCacheEntry(int cache_state);
41 43
42 // Returns true if the cache state of the given two cache entries are equal. 44 // Returns true if the cache state of the given two cache entries are equal.
43 bool CacheStatesEqual(const GDataCacheEntry& a, const GDataCacheEntry& b); 45 bool CacheStatesEqual(const GDataCacheEntry& a, const GDataCacheEntry& b);
44 46
45 // Copies |error| to |output|. Used to run asynchronous functions that take 47 // Copies |error| to |output|. Used to run asynchronous functions that take
46 // FileOperationCallback from tests. 48 // FileOperationCallback from tests.
47 void CopyErrorCodeFromFileOperationCallback( 49 void CopyErrorCodeFromFileOperationCallback(GDataFileError* output,
48 GDataFileError* output, GDataFileError error); 50 GDataFileError error);
51
52 // Copies |error| to |output|. Used to run asynchronous functions that take
53 // FileMoveCallback from tests.
54 void CopyErrorCodeFromFileMoveCallback(GDataFileError* output,
satorux1 2012/08/09 00:26:24 I think we should also copy the path. See my comme
achuithb 2012/08/09 01:41:32 Done.
55 GDataFileError error,
56 const FilePath& updated_file_path);
satorux1 2012/08/09 00:26:24 moved_file_path
achuithb 2012/08/09 01:41:32 Replaced here and elsewhere.
49 57
50 // Copies |error| and |entry_proto| to |out_error| and |out_entry_proto| 58 // Copies |error| and |entry_proto| to |out_error| and |out_entry_proto|
51 // respectively. Used to run asynchronous functions that take 59 // respectively. Used to run asynchronous functions that take
52 // GetEntryInfoCallback from tests. 60 // GetEntryInfoCallback from tests.
53 void CopyResultsFromGetEntryInfoCallback( 61 void CopyResultsFromGetEntryInfoCallback(
54 GDataFileError* out_error, 62 GDataFileError* out_error,
55 scoped_ptr<GDataEntryProto>* out_entry_proto, 63 scoped_ptr<GDataEntryProto>* out_entry_proto,
56 GDataFileError error, 64 GDataFileError error,
57 scoped_ptr<GDataEntryProto> entry_proto); 65 scoped_ptr<GDataEntryProto> entry_proto);
58 66
59 // Copies |error| and |entries| to |out_error| and |out_entries| 67 // Copies |error| and |entries| to |out_error| and |out_entries|
60 // respectively. Used to run asynchronous functions that take 68 // respectively. Used to run asynchronous functions that take
61 // GetEntryInfoCallback from tests. 69 // GetEntryInfoCallback from tests.
62 void CopyResultsFromReadDirectoryCallback( 70 void CopyResultsFromReadDirectoryCallback(
63 GDataFileError* out_error, 71 GDataFileError* out_error,
64 scoped_ptr<GDataEntryProtoVector>* out_entries, 72 scoped_ptr<GDataEntryProtoVector>* out_entries,
65 GDataFileError error, 73 GDataFileError error,
66 scoped_ptr<GDataEntryProtoVector> entries); 74 scoped_ptr<GDataEntryProtoVector> entries);
67 75
68 // Copies |result| |out_result|. Used to run asynchronous functions that take 76 // Copies |result| |out_result|. Used to run asynchronous functions that take
69 // GetEntryInfoPairCallback from tests. 77 // GetEntryInfoPairCallback from tests.
70 void CopyResultsFromGetEntryInfoPairCallback( 78 void CopyResultsFromGetEntryInfoPairCallback(
71 scoped_ptr<EntryInfoPairResult>* out_result, 79 scoped_ptr<EntryInfoPairResult>* out_result,
72 scoped_ptr<EntryInfoPairResult> result); 80 scoped_ptr<EntryInfoPairResult> result);
73 81
74 } // namespace test_util 82 } // namespace test_util
75 } // namespace gdata 83 } // namespace gdata
76 84
77 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_TEST_UTIL_H_ 85 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698