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

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

Issue 171099: Merge r21417 to 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) {
280 DCHECK(request->status().is_success()); 281 DCHECK(request->status().is_success());
281 OnReceivedRedirect(new_url); 282 OnReceivedRedirect(new_url);
282 } 283 }
283 284
284 virtual void OnResponseStarted(URLRequest* request) { 285 virtual void OnResponseStarted(URLRequest* request) {
285 if (request->status().is_success()) { 286 if (request->status().is_success()) {
286 ResourceLoaderBridge::ResponseInfo info; 287 ResourceLoaderBridge::ResponseInfo info;
287 info.request_time = request->request_time(); 288 info.request_time = request->request_time();
288 info.response_time = request->response_time(); 289 info.response_time = request->response_time();
289 info.headers = request->response_headers(); 290 info.headers = request->response_headers();
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 return std::string(); 645 return std::string();
645 } 646 }
646 647
647 scoped_refptr<CookieGetter> getter = new CookieGetter(); 648 scoped_refptr<CookieGetter> getter = new CookieGetter();
648 649
649 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod( 650 io_thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(
650 getter.get(), &CookieGetter::Get, url)); 651 getter.get(), &CookieGetter::Get, url));
651 652
652 return getter->GetResult(); 653 return getter->GetResult();
653 } 654 }
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