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

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: '' 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/http/http_network_transaction_unittest.cc » ('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 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 return NULL; 1591 return NULL;
1592 1592
1593 return i->second; 1593 return i->second;
1594 } 1594 }
1595 1595
1596 static int GetCertID(net::URLRequest* request, int child_id) { 1596 static int GetCertID(net::URLRequest* request, int child_id) {
1597 if (request->ssl_info().cert) { 1597 if (request->ssl_info().cert) {
1598 return CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert, 1598 return CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert,
1599 child_id); 1599 child_id);
1600 } 1600 }
1601 // If there is no SSL info attached to this request, we must either be a non
1602 // secure request, or the request has been canceled or failed (before the SSL
1603 // info was populated), or the response is an error (we have seen 403, 404,
1604 // and 501) made up by the proxy.
1605 DCHECK(!request->url().SchemeIsSecure() ||
1606 (request->status().status() == URLRequestStatus::CANCELED) ||
1607 (request->status().status() == URLRequestStatus::FAILED) ||
1608 ((request->response_headers()->response_code() >= 400) &&
1609 (request->response_headers()->response_code() <= 599)));
1610 return 0; 1601 return 0;
1611 } 1602 }
1612 1603
1613 void ResourceDispatcherHost::NotifyResponseStarted(net::URLRequest* request, 1604 void ResourceDispatcherHost::NotifyResponseStarted(net::URLRequest* request,
1614 int child_id) { 1605 int child_id) {
1615 // Notify the observers on the IO thread. 1606 // Notify the observers on the IO thread.
1616 FOR_EACH_OBSERVER(Observer, observer_list_, OnRequestStarted(this, request)); 1607 FOR_EACH_OBSERVER(Observer, observer_list_, OnRequestStarted(this, request));
1617 1608
1618 int render_process_id, render_view_id; 1609 int render_process_id, render_view_id;
1619 if (!RenderViewForRequest(request, &render_process_id, &render_view_id)) 1610 if (!RenderViewForRequest(request, &render_process_id, &render_view_id))
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 return is_prefetch_enabled_; 1951 return is_prefetch_enabled_;
1961 } 1952 }
1962 1953
1963 // static 1954 // static
1964 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { 1955 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) {
1965 is_prefetch_enabled_ = value; 1956 is_prefetch_enabled_ = value;
1966 } 1957 }
1967 1958
1968 // static 1959 // static
1969 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; 1960 bool ResourceDispatcherHost::is_prefetch_enabled_ = false;
OLDNEW
« no previous file with comments | « no previous file | net/base/net_error_list.h » ('j') | net/http/http_network_transaction_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698