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

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

Issue 200110: Fix some mixed content layout tests.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 if (request->status().is_success()) { 306 if (request->status().is_success()) {
307 ResourceLoaderBridge::ResponseInfo info; 307 ResourceLoaderBridge::ResponseInfo info;
308 PopulateResponseInfo(request, &info); 308 PopulateResponseInfo(request, &info);
309 OnReceivedResponse(info, false); 309 OnReceivedResponse(info, false);
310 AsyncReadData(); // start reading 310 AsyncReadData(); // start reading
311 } else { 311 } else {
312 Done(); 312 Done();
313 } 313 }
314 } 314 }
315 315
316 virtual void OnSSLCertificateError(URLRequest* request,
317 int cert_error,
318 net::X509Certificate* cert) {
319 // Allow all certificate errors.
320 request->ContinueDespiteLastError();
321 }
322
316 virtual void OnReadCompleted(URLRequest* request, int bytes_read) { 323 virtual void OnReadCompleted(URLRequest* request, int bytes_read) {
317 if (request->status().is_success() && bytes_read > 0) { 324 if (request->status().is_success() && bytes_read > 0) {
318 OnReceivedData(bytes_read); 325 OnReceivedData(bytes_read);
319 } else { 326 } else {
320 Done(); 327 Done();
321 } 328 }
322 } 329 }
323 330
324 // -------------------------------------------------------------------------- 331 // --------------------------------------------------------------------------
325 // Helpers and data: 332 // Helpers and data:
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 options.message_loop_type = MessageLoop::TYPE_IO; 722 options.message_loop_type = MessageLoop::TYPE_IO;
716 return io_thread->StartWithOptions(options); 723 return io_thread->StartWithOptions(options);
717 } 724 }
718 725
719 // static 726 // static
720 void SimpleResourceLoaderBridge::SetAcceptAllCookies(bool accept_all_cookies) { 727 void SimpleResourceLoaderBridge::SetAcceptAllCookies(bool accept_all_cookies) {
721 CookiePolicy::Type policy_type = accept_all_cookies ? 728 CookiePolicy::Type policy_type = accept_all_cookies ?
722 CookiePolicy::ALLOW_ALL_COOKIES : CookiePolicy::BLOCK_THIRD_PARTY_COOKIES; 729 CookiePolicy::ALLOW_ALL_COOKIES : CookiePolicy::BLOCK_THIRD_PARTY_COOKIES;
723 request_context->cookie_policy()->set_type(policy_type); 730 request_context->cookie_policy()->set_type(policy_type);
724 } 731 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698