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

Side by Side Diff: webkit/tools/test_shell/simple_resource_loader_bridge.cc

Issue 173049: Revert r23616 from 172. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 4 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 | « net/url_request/url_request_unittest.cc ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This file contains an implementation of the ResourceLoaderBridge class. 5 // This file contains an implementation of the ResourceLoaderBridge class.
6 // The class is implemented using URLRequest, meaning it is a "simple" version 6 // The class is implemented using URLRequest, meaning it is a "simple" version
7 // that directly issues requests. The more complicated one used in the 7 // that directly issues requests. The more complicated one used in the
8 // browser uses IPC. 8 // browser uses IPC.
9 // 9 //
10 // Because URLRequest only provides an asynchronous resource loading API, this 10 // Because URLRequest only provides an asynchronous resource loading API, this
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 virtual void OnCompletedRequest(const URLRequestStatus& status, 269 virtual void OnCompletedRequest(const URLRequestStatus& status,
270 const std::string& security_info) { 270 const std::string& security_info) {
271 owner_loop_->PostTask(FROM_HERE, NewRunnableMethod( 271 owner_loop_->PostTask(FROM_HERE, NewRunnableMethod(
272 this, &RequestProxy::NotifyCompletedRequest, status, security_info)); 272 this, &RequestProxy::NotifyCompletedRequest, status, security_info));
273 } 273 }
274 274
275 // -------------------------------------------------------------------------- 275 // --------------------------------------------------------------------------
276 // URLRequest::Delegate implementation: 276 // URLRequest::Delegate implementation:
277 277
278 virtual void OnReceivedRedirect(URLRequest* request, 278 virtual void OnReceivedRedirect(URLRequest* request,
279 const GURL& new_url, 279 const GURL& new_url) {
280 bool* defer_redirect) {
281 DCHECK(request->status().is_success()); 280 DCHECK(request->status().is_success());
282 OnReceivedRedirect(new_url); 281 OnReceivedRedirect(new_url);
283 } 282 }
284 283
285 virtual void OnResponseStarted(URLRequest* request) { 284 virtual void OnResponseStarted(URLRequest* request) {
286 if (request->status().is_success()) { 285 if (request->status().is_success()) {
287 ResourceLoaderBridge::ResponseInfo info; 286 ResourceLoaderBridge::ResponseInfo info;
288 info.request_time = request->request_time(); 287 info.request_time = request->request_time();
289 info.response_time = request->response_time(); 288 info.response_time = request->response_time();
290 info.headers = request->response_headers(); 289 info.headers = request->response_headers();
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 return std::string(); 644 return std::string();
646 } 645 }
647 646
648 scoped_refptr<CookieGetter> getter = new CookieGetter(); 647 scoped_refptr<CookieGetter> getter = new CookieGetter();
649 648
650 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 649 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
651 getter.get(), &CookieGetter::Get, url)); 650 getter.get(), &CookieGetter::Get, url));
652 651
653 return getter->GetResult(); 652 return getter->GetResult();
654 } 653 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698