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

Side by Side Diff: net/http/http_stream_request.cc

Issue 3165057: Remove two CHECKs that were added to help track down the crash... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_nss.cc » ('j') | 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) 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 #include "net/http/http_stream_request.h" 5 #include "net/http/http_stream_request.h"
6 6
7 #include "base/stl_util-inl.h" 7 #include "base/stl_util-inl.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "net/base/connection_type_histograms.h" 10 #include "net/base/connection_type_histograms.h"
(...skipping 18 matching lines...) Expand all
29 GURL::Replacements replacements; 29 GURL::Replacements replacements;
30 // new_sheme and new_port need to be in scope here because GURL::Replacements 30 // new_sheme and new_port need to be in scope here because GURL::Replacements
31 // references the memory contained by them directly. 31 // references the memory contained by them directly.
32 const std::string new_scheme = "https"; 32 const std::string new_scheme = "https";
33 const std::string new_port = base::IntToString(443); 33 const std::string new_port = base::IntToString(443);
34 replacements.SetSchemeStr(new_scheme); 34 replacements.SetSchemeStr(new_scheme);
35 replacements.SetPortStr(new_port); 35 replacements.SetPortStr(new_port);
36 return original_url.ReplaceComponents(replacements); 36 return original_url.ReplaceComponents(replacements);
37 } 37 }
38 38
39 } 39 } // namespace
vandebo (ex-Chrome) 2010/08/24 19:59:35 Is this an intentional change?
wtc 2010/08/24 22:40:18 Yes, I ran cpplint.py on the whole file and it war
40 40
41 HttpStreamRequest::HttpStreamRequest( 41 HttpStreamRequest::HttpStreamRequest(
42 HttpStreamFactory* factory, 42 HttpStreamFactory* factory,
43 const scoped_refptr<HttpNetworkSession>& session) 43 const scoped_refptr<HttpNetworkSession>& session)
44 : request_info_(NULL), 44 : request_info_(NULL),
45 proxy_info_(NULL), 45 proxy_info_(NULL),
46 ssl_config_(NULL), 46 ssl_config_(NULL),
47 session_(session), 47 session_(session),
48 ALLOW_THIS_IN_INITIALIZER_LIST( 48 ALLOW_THIS_IN_INITIALIZER_LIST(
49 io_callback_(this, &HttpStreamRequest::OnIOComplete)), 49 io_callback_(this, &HttpStreamRequest::OnIOComplete)),
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 } 613 }
614 614
615 if ((!ssl_started && result < 0 && 615 if ((!ssl_started && result < 0 &&
616 alternate_protocol_mode_ == kUsingAlternateProtocol) || 616 alternate_protocol_mode_ == kUsingAlternateProtocol) ||
617 result == ERR_NPN_NEGOTIATION_FAILED) { 617 result == ERR_NPN_NEGOTIATION_FAILED) {
618 // Mark the alternate protocol as broken and fallback. 618 // Mark the alternate protocol as broken and fallback.
619 MarkBrokenAlternateProtocolAndFallback(); 619 MarkBrokenAlternateProtocolAndFallback();
620 return OK; 620 return OK;
621 } 621 }
622 622
623 if (result < 0 && !ssl_started) { 623 if (result < 0 && !ssl_started)
624 // A temporary CHECK for tracking down http://crbug.com/49862.
625 CHECK(!IsCertificateError(result));
626 return ReconsiderProxyAfterError(result); 624 return ReconsiderProxyAfterError(result);
627 }
628 establishing_tunnel_ = false; 625 establishing_tunnel_ = false;
629 626
630 if (connection_->socket()) { 627 if (connection_->socket()) {
631 LogHttpConnectedMetrics(*connection_); 628 LogHttpConnectedMetrics(*connection_);
632 629
633 // We officially have a new connection. Record the type. 630 // We officially have a new connection. Record the type.
634 if (!connection_->is_reused()) { 631 if (!connection_->is_reused()) {
635 ConnectionType type = using_spdy_ ? CONNECTION_SPDY : CONNECTION_HTTP; 632 ConnectionType type = using_spdy_ ? CONNECTION_SPDY : CONNECTION_HTTP;
636 UpdateConnectionTypeHistograms(type); 633 UpdateConnectionTypeHistograms(type);
637 } 634 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 100); 909 100);
913 break; 910 break;
914 default: 911 default:
915 NOTREACHED(); 912 NOTREACHED();
916 break; 913 break;
917 } 914 }
918 } 915 }
919 916
920 } // namespace net 917 } // namespace net
921 918
OLDNEW
« no previous file with comments | « no previous file | net/socket/ssl_client_socket_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698