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

Side by Side Diff: net/url_request/url_request_job.cc

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 8 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) 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/url_request/url_request_job.h" 5 #include "net/url_request/url_request_job.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // case the derived class should implement this! 183 // case the derived class should implement this!
184 NOTREACHED(); 184 NOTREACHED();
185 } 185 }
186 186
187 void URLRequestJob::ContinueWithCertificate( 187 void URLRequestJob::ContinueWithCertificate(
188 net::X509Certificate* client_cert) { 188 net::X509Certificate* client_cert) {
189 // The derived class should implement this! 189 // The derived class should implement this!
190 NOTREACHED(); 190 NOTREACHED();
191 } 191 }
192 192
193 void URLRequestJob::ContinueWithTLSLogin() {
194 NOTREACHED();
195 }
196
197 void URLRequestJob::CancelTLSLogin() {
198 // The derived class should implement this!
199 NOTREACHED();
200 }
201
193 void URLRequestJob::ContinueDespiteLastError() { 202 void URLRequestJob::ContinueDespiteLastError() {
194 // Implementations should know how to recover from errors they generate. 203 // Implementations should know how to recover from errors they generate.
195 // If this code was reached, we are trying to recover from an error that 204 // If this code was reached, we are trying to recover from an error that
196 // we don't know how to recover from. 205 // we don't know how to recover from.
197 NOTREACHED(); 206 NOTREACHED();
198 } 207 }
199 208
200 void URLRequestJob::FollowDeferredRedirect() { 209 void URLRequestJob::FollowDeferredRedirect() {
201 DCHECK(deferred_redirect_status_code_ != -1); 210 DCHECK(deferred_redirect_status_code_ != -1);
202 211
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 !prefilter_bytes_read_) // Zero-byte responses aren't useful. 885 !prefilter_bytes_read_) // Zero-byte responses aren't useful.
877 return; 886 return;
878 887
879 // Miniature requests aren't really compressible. Don't count them. 888 // Miniature requests aren't really compressible. Don't count them.
880 const int kMinSize = 16; 889 const int kMinSize = 16;
881 if (prefilter_bytes_read_ < kMinSize) 890 if (prefilter_bytes_read_ < kMinSize)
882 return; 891 return;
883 892
884 // Only record for http or https urls. 893 // Only record for http or https urls.
885 bool is_http = request_->url().SchemeIs("http"); 894 bool is_http = request_->url().SchemeIs("http");
886 bool is_https = request_->url().SchemeIs("https"); 895 bool is_https = request_->url().SchemeIs("https") ||
896 request_->url().SchemeIs("httpsv");
887 if (!is_http && !is_https) 897 if (!is_http && !is_https)
888 return; 898 return;
889 899
890 const net::HttpResponseInfo& response = request_->response_info_; 900 const net::HttpResponseInfo& response = request_->response_info_;
891 int compressed_B = prefilter_bytes_read_; 901 int compressed_B = prefilter_bytes_read_;
892 int decompressed_B = postfilter_bytes_read_; 902 int decompressed_B = postfilter_bytes_read_;
893 903
894 // We want to record how often downloaded resources are compressed. 904 // We want to record how often downloaded resources are compressed.
895 // But, we recognize that different protocols may have different 905 // But, we recognize that different protocols may have different
896 // properties. So, for each request, we'll put it into one of 3 906 // properties. So, for each request, we'll put it into one of 3
(...skipping 30 matching lines...) Expand all
927 937
928 if (is_compressed_) { 938 if (is_compressed_) {
929 COMPRESSION_HISTOGRAM("NoProxy.BytesBeforeCompression", compressed_B); 939 COMPRESSION_HISTOGRAM("NoProxy.BytesBeforeCompression", compressed_B);
930 COMPRESSION_HISTOGRAM("NoProxy.BytesAfterCompression", decompressed_B); 940 COMPRESSION_HISTOGRAM("NoProxy.BytesAfterCompression", decompressed_B);
931 } else { 941 } else {
932 COMPRESSION_HISTOGRAM("NoProxy.ShouldHaveBeenCompressed", decompressed_B); 942 COMPRESSION_HISTOGRAM("NoProxy.ShouldHaveBeenCompressed", decompressed_B);
933 } 943 }
934 } 944 }
935 945
936 } // namespace net 946 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698