| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |