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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // access to the real SSL info. | 199 // access to the real SSL info. |
200 const char* kCertIssuer = "Chrome Internal"; | 200 const char* kCertIssuer = "Chrome Internal"; |
201 const int kLifetimeDays = 100; | 201 const int kLifetimeDays = 100; |
202 | 202 |
203 info->ssl_info.cert = | 203 info->ssl_info.cert = |
204 new net::X509Certificate(request_->url().GetWithEmptyPath().spec(), | 204 new net::X509Certificate(request_->url().GetWithEmptyPath().spec(), |
205 kCertIssuer, | 205 kCertIssuer, |
206 Time::Now(), | 206 Time::Now(), |
207 Time::Now() + | 207 Time::Now() + |
208 TimeDelta::FromDays(kLifetimeDays)); | 208 TimeDelta::FromDays(kLifetimeDays)); |
209 info->ssl_info.cert_status = 0; | 209 info->ssl_info.cert_status = net::CERT_STATUS_NO_ERROR; |
210 info->ssl_info.security_bits = -1; | 210 info->ssl_info.security_bits = -1; |
211 } | 211 } |
212 } | 212 } |
213 | 213 |
214 int URLRequestAutomationJob::GetResponseCode() const { | 214 int URLRequestAutomationJob::GetResponseCode() const { |
215 if (headers_) | 215 if (headers_) |
216 return headers_->response_code(); | 216 return headers_->response_code(); |
217 | 217 |
218 static const int kDefaultResponseCode = 200; | 218 static const int kDefaultResponseCode = 200; |
219 return kDefaultResponseCode; | 219 return kDefaultResponseCode; |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 if (!is_done()) { | 489 if (!is_done()) { |
490 NotifyDone(request_status_); | 490 NotifyDone(request_status_); |
491 } | 491 } |
492 // Reset any pending reads. | 492 // Reset any pending reads. |
493 if (pending_buf_) { | 493 if (pending_buf_) { |
494 pending_buf_ = NULL; | 494 pending_buf_ = NULL; |
495 pending_buf_size_ = 0; | 495 pending_buf_size_ = 0; |
496 NotifyReadComplete(0); | 496 NotifyReadComplete(0); |
497 } | 497 } |
498 } | 498 } |
OLD | NEW |