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

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

Issue 16424004: google_apis: Rename base_operations.h/cc to base_requests.h/cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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') | chrome/chrome_browser.gypi » ('j') | 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::BasicHttpResponse> http_response( 142 scoped_ptr<net::test_server::BasicHttpResponse> http_response(
143 new net::test_server::BasicHttpResponse); 143 new net::test_server::BasicHttpResponse);
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 scoped_ptr<net::test_server::HttpResponse> HandleDownloadRequest( 150 scoped_ptr<net::test_server::HttpResponse> HandleDownloadFileRequest(
151 const GURL& base_url, 151 const GURL& base_url,
152 net::test_server::HttpRequest* out_request, 152 net::test_server::HttpRequest* out_request,
153 const net::test_server::HttpRequest& request) { 153 const net::test_server::HttpRequest& request) {
154 *out_request = request; 154 *out_request = request;
155 155
156 GURL absolute_url = base_url.Resolve(request.relative_url); 156 GURL absolute_url = base_url.Resolve(request.relative_url);
157 std::string remaining_path; 157 std::string remaining_path;
158 if (!RemovePrefix(absolute_url.path(), "/files/", &remaining_path)) 158 if (!RemovePrefix(absolute_url.path(), "/files/", &remaining_path))
159 return scoped_ptr<net::test_server::HttpResponse>(); 159 return scoped_ptr<net::test_server::HttpResponse>();
160 return CreateHttpResponseFromFile( 160 return CreateHttpResponseFromFile(
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 return result; 238 return result;
239 } 239 }
240 240
241 void TestGetContentCallback::OnGetContent(google_apis::GDataErrorCode error, 241 void TestGetContentCallback::OnGetContent(google_apis::GDataErrorCode error,
242 scoped_ptr<std::string> data) { 242 scoped_ptr<std::string> data) {
243 data_.push_back(data.release()); 243 data_.push_back(data.release());
244 } 244 }
245 245
246 } // namespace test_util 246 } // namespace test_util
247 } // namespace google_apis 247 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/test_util.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698