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

Side by Side Diff: chrome/browser/renderer_host/resource_dispatcher_host.cc

Issue 4935001: Allow a non-200 (or non-407) response for a CONNECT request from an HTTPS pro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Cleaned up Created 10 years 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 | « no previous file | net/base/net_error_list.h » ('j') | net/base/net_error_list.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 return NULL; 1565 return NULL;
1566 1566
1567 return i->second; 1567 return i->second;
1568 } 1568 }
1569 1569
1570 static int GetCertID(net::URLRequest* request, int child_id) { 1570 static int GetCertID(net::URLRequest* request, int child_id) {
1571 if (request->ssl_info().cert) { 1571 if (request->ssl_info().cert) {
1572 return CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert, 1572 return CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert,
1573 child_id); 1573 child_id);
1574 } 1574 }
1575 // If there is no SSL info attached to this request, we must either be a non
vandebo (ex-Chrome) 2010/12/04 00:30:37 Why did this code need to go?
Ryan Hamilton 2010/12/09 21:19:35 Because *any* response from a HTTPS URL (when goin
1576 // secure request, or the request has been canceled or failed (before the SSL
1577 // info was populated), or the response is an error (we have seen 403, 404,
1578 // and 501) made up by the proxy.
1579 DCHECK(!request->url().SchemeIsSecure() ||
1580 (request->status().status() == URLRequestStatus::CANCELED) ||
1581 (request->status().status() == URLRequestStatus::FAILED) ||
1582 ((request->response_headers()->response_code() >= 400) &&
1583 (request->response_headers()->response_code() <= 599)));
1584 return 0; 1575 return 0;
1585 } 1576 }
1586 1577
1587 void ResourceDispatcherHost::NotifyResponseStarted(net::URLRequest* request, 1578 void ResourceDispatcherHost::NotifyResponseStarted(net::URLRequest* request,
1588 int child_id) { 1579 int child_id) {
1589 // Notify the observers on the IO thread. 1580 // Notify the observers on the IO thread.
1590 FOR_EACH_OBSERVER(Observer, observer_list_, OnRequestStarted(this, request)); 1581 FOR_EACH_OBSERVER(Observer, observer_list_, OnRequestStarted(this, request));
1591 1582
1592 int render_process_id, render_view_id; 1583 int render_process_id, render_view_id;
1593 if (!RenderViewForRequest(request, &render_process_id, &render_view_id)) 1584 if (!RenderViewForRequest(request, &render_process_id, &render_view_id))
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1934 return is_prefetch_enabled_; 1925 return is_prefetch_enabled_;
1935 } 1926 }
1936 1927
1937 // static 1928 // static
1938 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { 1929 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) {
1939 is_prefetch_enabled_ = value; 1930 is_prefetch_enabled_ = value;
1940 } 1931 }
1941 1932
1942 // static 1933 // static
1943 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; 1934 bool ResourceDispatcherHost::is_prefetch_enabled_ = false;
OLDNEW
« no previous file with comments | « no previous file | net/base/net_error_list.h » ('j') | net/base/net_error_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698