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

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

Issue 7976036: net: make HSTS hosts use the normal SSL interstitials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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 | « webkit/fileapi/file_writer_delegate.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 net::URLRequest, meaning it is a "simple" 6 // The class is implemented using net::URLRequest, meaning it is a "simple"
7 // version that directly issues requests. The more complicated one used in the 7 // version that directly issues requests. The more complicated one used in the
8 // browser uses IPC. 8 // browser uses IPC.
9 // 9 //
10 // Because net::URLRequest only provides an asynchronous resource loading API, 10 // Because net::URLRequest only provides an asynchronous resource loading API,
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } else { 451 } else {
452 OnReceivedResponse(info); 452 OnReceivedResponse(info);
453 AsyncReadData(); // start reading 453 AsyncReadData(); // start reading
454 } 454 }
455 } else { 455 } else {
456 Done(); 456 Done();
457 } 457 }
458 } 458 }
459 459
460 virtual void OnSSLCertificateError(net::URLRequest* request, 460 virtual void OnSSLCertificateError(net::URLRequest* request,
461 int cert_error, 461 const net::SSLInfo& ssl_info,
462 net::X509Certificate* cert) OVERRIDE { 462 bool is_hsts_host) OVERRIDE {
463 // Allow all certificate errors. 463 // Allow all certificate errors.
464 request->ContinueDespiteLastError(); 464 request->ContinueDespiteLastError();
465 } 465 }
466 466
467 virtual bool CanGetCookies( 467 virtual bool CanGetCookies(
468 const net::URLRequest* request, 468 const net::URLRequest* request,
469 const net::CookieList& cookie_list) const OVERRIDE { 469 const net::CookieList& cookie_list) const OVERRIDE {
470 StaticCookiePolicy::Type policy_type = g_accept_all_cookies ? 470 StaticCookiePolicy::Type policy_type = g_accept_all_cookies ?
471 StaticCookiePolicy::ALLOW_ALL_COOKIES : 471 StaticCookiePolicy::ALLOW_ALL_COOKIES :
472 StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES; 472 StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES;
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 1032
1033 // static 1033 // static
1034 void SimpleResourceLoaderBridge::AllowFileOverHTTP( 1034 void SimpleResourceLoaderBridge::AllowFileOverHTTP(
1035 const std::string& file_path_template, const GURL& http_prefix) { 1035 const std::string& file_path_template, const GURL& http_prefix) {
1036 DCHECK(!file_path_template.empty()); 1036 DCHECK(!file_path_template.empty());
1037 DCHECK(http_prefix.is_valid() && 1037 DCHECK(http_prefix.is_valid() &&
1038 (http_prefix.SchemeIs("http") || http_prefix.SchemeIs("https"))); 1038 (http_prefix.SchemeIs("http") || http_prefix.SchemeIs("https")));
1039 g_file_over_http_params = new FileOverHTTPParams(file_path_template, 1039 g_file_over_http_params = new FileOverHTTPParams(file_path_template,
1040 http_prefix); 1040 http_prefix);
1041 } 1041 }
OLDNEW
« no previous file with comments | « webkit/fileapi/file_writer_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698