OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |