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

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

Issue 11031043: Fix handling of user and CA certificates on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/buffered_resource_handler.h" 5 #include "content/browser/renderer_host/buffered_resource_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 return made_final_decision; 287 return made_final_decision;
288 } 288 }
289 289
290 bool BufferedResourceHandler::SelectNextHandler(bool* defer) { 290 bool BufferedResourceHandler::SelectNextHandler(bool* defer) {
291 DCHECK(!response_->head.mime_type.empty()); 291 DCHECK(!response_->head.mime_type.empty());
292 292
293 ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request_); 293 ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request_);
294 const std::string& mime_type = response_->head.mime_type; 294 const std::string& mime_type = response_->head.mime_type;
295 295
296 #if defined(OS_ANDROID)
297 if (mime_type == "application/x-x509-user-cert" ||
298 mime_type == "application/x-x509-ca-cert" ||
299 mime_type == "application/x-pkcs12") {
300 #else
296 if (mime_type == "application/x-x509-user-cert") { 301 if (mime_type == "application/x-x509-user-cert") {
302 #endif
297 // Install X509 handler. 303 // Install X509 handler.
298 scoped_ptr<ResourceHandler> handler( 304 scoped_ptr<ResourceHandler> handler(
299 new X509UserCertResourceHandler(request_, 305 new X509UserCertResourceHandler(request_,
300 info->GetChildID(), 306 info->GetChildID(),
301 info->GetRouteID())); 307 info->GetRouteID()));
302 return UseAlternateNextHandler(handler.Pass()); 308 return UseAlternateNextHandler(handler.Pass());
303 } 309 }
304 310
305 if (!info->allow_download()) 311 if (!info->allow_download())
306 return true; 312 return true;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 const std::vector<webkit::WebPluginInfo>& plugins) { 449 const std::vector<webkit::WebPluginInfo>& plugins) {
444 bool defer = false; 450 bool defer = false;
445 if (!ProcessResponse(&defer)) { 451 if (!ProcessResponse(&defer)) {
446 controller()->Cancel(); 452 controller()->Cancel();
447 } else if (!defer) { 453 } else if (!defer) {
448 controller()->Resume(); 454 controller()->Resume();
449 } 455 }
450 } 456 }
451 457
452 } // namespace content 458 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/browser/renderer_host/x509_user_cert_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698