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

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

Issue 15333013: Replace most of the occurrence of OperationRegistry with OperationRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 141
142 scoped_ptr<net::test_server::HttpResponse> http_response( 142 scoped_ptr<net::test_server::HttpResponse> http_response(
143 new net::test_server::HttpResponse); 143 new net::test_server::HttpResponse);
144 http_response->set_code(net::test_server::SUCCESS); 144 http_response->set_code(net::test_server::SUCCESS);
145 http_response->set_content(content); 145 http_response->set_content(content);
146 http_response->set_content_type(content_type); 146 http_response->set_content_type(content_type);
147 return http_response.Pass(); 147 return http_response.Pass();
148 } 148 }
149 149
150 void DoNothingForReAuthenticateCallback(
151 AuthenticatedOperationInterface* /* operation */) {
152 NOTREACHED();
153 }
154
155 scoped_ptr<net::test_server::HttpResponse> HandleDownloadRequest( 150 scoped_ptr<net::test_server::HttpResponse> HandleDownloadRequest(
156 const GURL& base_url, 151 const GURL& base_url,
157 net::test_server::HttpRequest* out_request, 152 net::test_server::HttpRequest* out_request,
158 const net::test_server::HttpRequest& request) { 153 const net::test_server::HttpRequest& request) {
159 *out_request = request; 154 *out_request = request;
160 155
161 GURL absolute_url = base_url.Resolve(request.relative_url); 156 GURL absolute_url = base_url.Resolve(request.relative_url);
162 std::string remaining_path; 157 std::string remaining_path;
163 if (!RemovePrefix(absolute_url.path(), "/files/", &remaining_path)) 158 if (!RemovePrefix(absolute_url.path(), "/files/", &remaining_path))
164 return scoped_ptr<net::test_server::HttpResponse>(); 159 return scoped_ptr<net::test_server::HttpResponse>();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 return result; 237 return result;
243 } 238 }
244 239
245 void TestGetContentCallback::OnGetContent(google_apis::GDataErrorCode error, 240 void TestGetContentCallback::OnGetContent(google_apis::GDataErrorCode error,
246 scoped_ptr<std::string> data) { 241 scoped_ptr<std::string> data) {
247 data_.push_back(data.release()); 242 data_.push_back(data.release());
248 } 243 }
249 244
250 } // namespace test_util 245 } // namespace test_util
251 } // namespace google_apis 246 } // 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