OLD | NEW |
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/automation/url_request_automation_job.h" | 5 #include "chrome/browser/automation/url_request_automation_job.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "chrome/browser/automation/automation_resource_message_filter.h" | 10 #include "chrome/browser/automation/automation_resource_message_filter.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 is_protocol_factory_registered_ = true; | 87 is_protocol_factory_registered_ = true; |
88 } | 88 } |
89 | 89 |
90 return true; | 90 return true; |
91 } | 91 } |
92 | 92 |
93 net::URLRequestJob* URLRequestAutomationJob::Factory( | 93 net::URLRequestJob* URLRequestAutomationJob::Factory( |
94 net::URLRequest* request, | 94 net::URLRequest* request, |
95 const std::string& scheme) { | 95 const std::string& scheme) { |
96 bool scheme_is_http = request->url().SchemeIs("http"); | 96 bool scheme_is_http = request->url().SchemeIs("http"); |
97 bool scheme_is_https = request->url().SchemeIs("https"); | 97 bool scheme_is_https = request->url().SchemeIs("https") || |
| 98 request->url().SchemeIs("httpsv"); |
98 | 99 |
99 // Returning null here just means that the built-in handler will be used. | 100 // Returning null here just means that the built-in handler will be used. |
100 if (scheme_is_http || scheme_is_https) { | 101 if (scheme_is_http || scheme_is_https) { |
101 ResourceDispatcherHostRequestInfo* request_info = NULL; | 102 ResourceDispatcherHostRequestInfo* request_info = NULL; |
102 if (request->GetUserData(NULL)) | 103 if (request->GetUserData(NULL)) |
103 request_info = ResourceDispatcherHost::InfoForRequest(request); | 104 request_info = ResourceDispatcherHost::InfoForRequest(request); |
104 if (request_info) { | 105 if (request_info) { |
105 int child_id = request_info->child_id(); | 106 int child_id = request_info->child_id(); |
106 int route_id = request_info->route_id(); | 107 int route_id = request_info->route_id(); |
107 | 108 |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 if (!is_done()) { | 469 if (!is_done()) { |
469 NotifyDone(request_status_); | 470 NotifyDone(request_status_); |
470 } | 471 } |
471 // Reset any pending reads. | 472 // Reset any pending reads. |
472 if (pending_buf_) { | 473 if (pending_buf_) { |
473 pending_buf_ = NULL; | 474 pending_buf_ = NULL; |
474 pending_buf_size_ = 0; | 475 pending_buf_size_ = 0; |
475 NotifyReadComplete(0); | 476 NotifyReadComplete(0); |
476 } | 477 } |
477 } | 478 } |
OLD | NEW |