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

Side by Side Diff: chrome/browser/google_apis/test_util.cc

Issue 12388017: Move the responsibility to convert from JSON to AccountMetadata into gdata_wapi_operations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@b148632_gdata_wapi_get_about_resource_impl
Patch Set: 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
« no previous file with comments | « chrome/browser/google_apis/test_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/google_apis/test_util.h" 5 #include "chrome/browser/google_apis/test_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 void CopyResultsFromGetAccountMetadataCallback( 144 void CopyResultsFromGetAccountMetadataCallback(
145 GDataErrorCode* error_out, 145 GDataErrorCode* error_out,
146 scoped_ptr<AccountMetadataFeed>* account_metadata_out, 146 scoped_ptr<AccountMetadataFeed>* account_metadata_out,
147 GDataErrorCode error_in, 147 GDataErrorCode error_in,
148 scoped_ptr<AccountMetadataFeed> account_metadata_in) { 148 scoped_ptr<AccountMetadataFeed> account_metadata_in) {
149 account_metadata_out->swap(account_metadata_in); 149 account_metadata_out->swap(account_metadata_in);
150 *error_out = error_in; 150 *error_out = error_in;
151 } 151 }
152 152
153 void CopyResultsFromGetAccountMetadataCallbackAndQuit(
154 GDataErrorCode* error_out,
155 scoped_ptr<AccountMetadataFeed>* account_metadata_out,
156 GDataErrorCode error_in,
157 scoped_ptr<AccountMetadataFeed> account_metadata_in) {
158 CopyResultsFromGetAccountMetadataCallback(
159 error_out, account_metadata_out, error_in, account_metadata_in.Pass());
160 MessageLoop::current()->Quit();
161 }
162
153 void CopyResultsFromGetAboutResourceCallback( 163 void CopyResultsFromGetAboutResourceCallback(
154 GDataErrorCode* error_out, 164 GDataErrorCode* error_out,
155 scoped_ptr<AboutResource>* about_resource_out, 165 scoped_ptr<AboutResource>* about_resource_out,
156 GDataErrorCode error_in, 166 GDataErrorCode error_in,
157 scoped_ptr<AboutResource> about_resource_in) { 167 scoped_ptr<AboutResource> about_resource_in) {
158 *error_out = error_in; 168 *error_out = error_in;
159 *about_resource_out = about_resource_in.Pass(); 169 *about_resource_out = about_resource_in.Pass();
160 } 170 }
161 171
162 void CopyResultsFromGetAppListCallback( 172 void CopyResultsFromGetAppListCallback(
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 LOG(ERROR) 265 LOG(ERROR)
256 << "The value of json_data is different from the file's content."; 266 << "The value of json_data is different from the file's content.";
257 return false; 267 return false;
258 } 268 }
259 269
260 return true; 270 return true;
261 } 271 }
262 272
263 } // namespace test_util 273 } // namespace test_util
264 } // namespace google_apis 274 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698