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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 void CopyResultsFromGetDataCallbackAndQuit(GDataErrorCode* error_out, | 118 void CopyResultsFromGetDataCallbackAndQuit(GDataErrorCode* error_out, |
119 scoped_ptr<base::Value>* value_out, | 119 scoped_ptr<base::Value>* value_out, |
120 GDataErrorCode error_in, | 120 GDataErrorCode error_in, |
121 scoped_ptr<base::Value> value_in) { | 121 scoped_ptr<base::Value> value_in) { |
122 *error_out = error_in; | 122 *error_out = error_in; |
123 *value_out = value_in.Pass(); | 123 *value_out = value_in.Pass(); |
124 MessageLoop::current()->Quit(); | 124 MessageLoop::current()->Quit(); |
125 } | 125 } |
126 | 126 |
127 void CopyResultsFromGetResourceEntryCallback( | |
128 GDataErrorCode* error_out, | |
129 scoped_ptr<ResourceEntry>* resource_entry_out, | |
130 GDataErrorCode error_in, | |
131 scoped_ptr<ResourceEntry> resource_entry_in) { | |
132 resource_entry_out->swap(resource_entry_in); | |
133 *error_out = error_in; | |
134 } | |
135 | |
136 void CopyResultsFromGetResourceListCallback( | 127 void CopyResultsFromGetResourceListCallback( |
137 GDataErrorCode* error_out, | 128 GDataErrorCode* error_out, |
138 scoped_ptr<ResourceList>* resource_list_out, | 129 scoped_ptr<ResourceList>* resource_list_out, |
139 GDataErrorCode error_in, | 130 GDataErrorCode error_in, |
140 scoped_ptr<ResourceList> resource_list_in) { | 131 scoped_ptr<ResourceList> resource_list_in) { |
141 resource_list_out->swap(resource_list_in); | 132 resource_list_out->swap(resource_list_in); |
142 *error_out = error_in; | 133 *error_out = error_in; |
143 } | 134 } |
144 | 135 |
145 void CopyResultsFromGetAccountMetadataCallback( | 136 void CopyResultsFromGetAccountMetadataCallback( |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 base::SplitString(range, '-', &parts); | 296 base::SplitString(range, '-', &parts); |
306 if (parts.size() != 2U) | 297 if (parts.size() != 2U) |
307 return false; | 298 return false; |
308 | 299 |
309 return (base::StringToInt64(parts[0], start_position) && | 300 return (base::StringToInt64(parts[0], start_position) && |
310 base::StringToInt64(parts[1], end_position)); | 301 base::StringToInt64(parts[1], end_position)); |
311 } | 302 } |
312 | 303 |
313 } // namespace test_util | 304 } // namespace test_util |
314 } // namespace google_apis | 305 } // namespace google_apis |
OLD | NEW |