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

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

Issue 10877006: Rename GDataErrorCode to DriveErrorCode, GDataFileError to DriveFileError (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor local variable name fix. 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 #include "chrome/browser/chromeos/gdata/gdata_test_util.h" 5 #include "chrome/browser/chromeos/gdata/gdata_test_util.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/threading/sequenced_worker_pool.h" 8 #include "base/threading/sequenced_worker_pool.h"
9 #include "chrome/browser/chromeos/gdata/drive.pb.h" 9 #include "chrome/browser/chromeos/gdata/drive.pb.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 bool CacheStatesEqual(const DriveCacheEntry& a, const DriveCacheEntry& b) { 58 bool CacheStatesEqual(const DriveCacheEntry& a, const DriveCacheEntry& b) {
59 return (a.is_present() == b.is_present() && 59 return (a.is_present() == b.is_present() &&
60 a.is_pinned() == b.is_pinned() && 60 a.is_pinned() == b.is_pinned() &&
61 a.is_dirty() == b.is_dirty() && 61 a.is_dirty() == b.is_dirty() &&
62 a.is_mounted() == b.is_mounted() && 62 a.is_mounted() == b.is_mounted() &&
63 a.is_persistent() == b.is_persistent()); 63 a.is_persistent() == b.is_persistent());
64 } 64 }
65 65
66 void CopyErrorCodeFromFileOperationCallback(GDataFileError* output, 66 void CopyErrorCodeFromFileOperationCallback(DriveFileError* output,
67 GDataFileError error) { 67 DriveFileError error) {
68 DCHECK(output); 68 DCHECK(output);
69 *output = error; 69 *output = error;
70 } 70 }
71 71
72 void CopyResultsFromFileMoveCallback( 72 void CopyResultsFromFileMoveCallback(
73 GDataFileError* out_error, 73 DriveFileError* out_error,
74 FilePath* out_file_path, 74 FilePath* out_file_path,
75 GDataFileError error, 75 DriveFileError error,
76 const FilePath& moved_file_path) { 76 const FilePath& moved_file_path) {
77 DCHECK(out_error); 77 DCHECK(out_error);
78 DCHECK(out_file_path); 78 DCHECK(out_file_path);
79 79
80 *out_error = error; 80 *out_error = error;
81 *out_file_path = moved_file_path; 81 *out_file_path = moved_file_path;
82 } 82 }
83 83
84 void CopyResultsFromGetEntryInfoCallback( 84 void CopyResultsFromGetEntryInfoCallback(
85 GDataFileError* out_error, 85 DriveFileError* out_error,
86 scoped_ptr<DriveEntryProto>* out_entry_proto, 86 scoped_ptr<DriveEntryProto>* out_entry_proto,
87 GDataFileError error, 87 DriveFileError error,
88 scoped_ptr<DriveEntryProto> entry_proto) { 88 scoped_ptr<DriveEntryProto> entry_proto) {
89 DCHECK(out_error); 89 DCHECK(out_error);
90 DCHECK(out_entry_proto); 90 DCHECK(out_entry_proto);
91 91
92 *out_error = error; 92 *out_error = error;
93 *out_entry_proto = entry_proto.Pass(); 93 *out_entry_proto = entry_proto.Pass();
94 } 94 }
95 95
96 void CopyResultsFromReadDirectoryCallback( 96 void CopyResultsFromReadDirectoryCallback(
97 GDataFileError* out_error, 97 DriveFileError* out_error,
98 scoped_ptr<DriveEntryProtoVector>* out_entries, 98 scoped_ptr<DriveEntryProtoVector>* out_entries,
99 GDataFileError error, 99 DriveFileError error,
100 scoped_ptr<DriveEntryProtoVector> entries) { 100 scoped_ptr<DriveEntryProtoVector> entries) {
101 DCHECK(out_error); 101 DCHECK(out_error);
102 DCHECK(out_entries); 102 DCHECK(out_entries);
103 103
104 *out_error = error; 104 *out_error = error;
105 *out_entries = entries.Pass(); 105 *out_entries = entries.Pass();
106 } 106 }
107 107
108 void CopyResultsFromGetEntryInfoWithFilePathCallback( 108 void CopyResultsFromGetEntryInfoWithFilePathCallback(
109 GDataFileError* out_error, 109 DriveFileError* out_error,
110 FilePath* out_drive_file_path, 110 FilePath* out_drive_file_path,
111 scoped_ptr<DriveEntryProto>* out_entry_proto, 111 scoped_ptr<DriveEntryProto>* out_entry_proto,
112 GDataFileError error, 112 DriveFileError error,
113 const FilePath& drive_file_path, 113 const FilePath& drive_file_path,
114 scoped_ptr<DriveEntryProto> entry_proto) { 114 scoped_ptr<DriveEntryProto> entry_proto) {
115 DCHECK(out_error); 115 DCHECK(out_error);
116 DCHECK(out_drive_file_path); 116 DCHECK(out_drive_file_path);
117 DCHECK(out_entry_proto); 117 DCHECK(out_entry_proto);
118 118
119 *out_error = error; 119 *out_error = error;
120 *out_drive_file_path = drive_file_path; 120 *out_drive_file_path = drive_file_path;
121 *out_entry_proto = entry_proto.Pass(); 121 *out_entry_proto = entry_proto.Pass();
122 } 122 }
123 123
124 void CopyResultsFromGetEntryInfoPairCallback( 124 void CopyResultsFromGetEntryInfoPairCallback(
125 scoped_ptr<EntryInfoPairResult>* out_result, 125 scoped_ptr<EntryInfoPairResult>* out_result,
126 scoped_ptr<EntryInfoPairResult> result) { 126 scoped_ptr<EntryInfoPairResult> result) {
127 DCHECK(out_result); 127 DCHECK(out_result);
128 128
129 *out_result = result.Pass(); 129 *out_result = result.Pass();
130 } 130 }
131 131
132 } // namespace test_util 132 } // namespace test_util
133 } // namespace gdata 133 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_test_util.h ('k') | chrome/browser/chromeos/gdata/gdata_upload_file_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698