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

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

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: use system srp and mpi libs, not local copies 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) 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 #include "chrome/browser/renderer_host/buffered_resource_handler.h" 5 #include "chrome/browser/renderer_host/buffered_resource_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 if (!not_modified_status && ShouldWaitForPlugins()) { 210 if (!not_modified_status && ShouldWaitForPlugins()) {
211 wait_for_plugins_ = true; 211 wait_for_plugins_ = true;
212 return true; 212 return true;
213 } 213 }
214 214
215 return false; 215 return false;
216 } 216 }
217 217
218 bool BufferedResourceHandler::ShouldBuffer(const GURL& url, 218 bool BufferedResourceHandler::ShouldBuffer(const GURL& url,
219 const std::string& mime_type) { 219 const std::string& mime_type) {
220 // We are willing to buffer for HTTP and HTTPS. 220 // We are willing to buffer for HTTP, HTTPS, and HTTPSV.
221 bool sniffable_scheme = url.is_empty() || 221 bool sniffable_scheme = url.is_empty() ||
222 url.SchemeIs(chrome::kHttpScheme) || 222 url.SchemeIs(chrome::kHttpScheme) ||
223 url.SchemeIs(chrome::kHttpsScheme); 223 url.SchemeIs(chrome::kHttpsScheme) ||
224 url.SchemeIs(chrome::kHttpsvScheme);
224 if (!sniffable_scheme) 225 if (!sniffable_scheme)
225 return false; 226 return false;
226 227
227 // Today, the only reason to buffer the request is to fix the doctype decoding 228 // Today, the only reason to buffer the request is to fix the doctype decoding
228 // performed by webkit: if there is not enough data it will go to quirks mode. 229 // performed by webkit: if there is not enough data it will go to quirks mode.
229 // We only expect the doctype check to apply to html documents. 230 // We only expect the doctype check to apply to html documents.
230 return mime_type == "text/html"; 231 return mime_type == "text/html";
231 } 232 }
232 233
233 bool BufferedResourceHandler::DidBufferEnough(int bytes_read) { 234 bool BufferedResourceHandler::DidBufferEnough(int bytes_read) {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 wait_for_plugins_ = false; 483 wait_for_plugins_ = false;
483 if (!request_) 484 if (!request_)
484 return; 485 return;
485 486
486 ResourceDispatcherHostRequestInfo* info = 487 ResourceDispatcherHostRequestInfo* info =
487 ResourceDispatcherHost::InfoForRequest(request_); 488 ResourceDispatcherHost::InfoForRequest(request_);
488 host_->PauseRequest(info->child_id(), info->request_id(), false); 489 host_->PauseRequest(info->child_id(), info->request_id(), false);
489 if (!CompleteResponseStarted(info->request_id(), false)) 490 if (!CompleteResponseStarted(info->request_id(), false))
490 host_->CancelRequest(info->child_id(), info->request_id(), false); 491 host_->CancelRequest(info->child_id(), info->request_id(), false);
491 } 492 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698