| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/net/url_request_slow_http_job.h" | 5 #include "content/browser/net/url_request_slow_http_job.h" |
| 6 | 6 |
| 7 #include "base/time.h" | 7 #include "base/time.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "net/url_request/url_request_filter.h" | 9 #include "net/url_request/url_request_filter.h" |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 DCHECK(!path_str.empty()); // We only expect ASCII paths in tests. | 43 DCHECK(!path_str.empty()); // We only expect ASCII paths in tests. |
| 44 url.append(path_str); | 44 url.append(path_str); |
| 45 return GURL(url); | 45 return GURL(url); |
| 46 } | 46 } |
| 47 | 47 |
| 48 URLRequestSlowHTTPJob::URLRequestSlowHTTPJob(net::URLRequest* request, | 48 URLRequestSlowHTTPJob::URLRequestSlowHTTPJob(net::URLRequest* request, |
| 49 const FilePath& file_path) | 49 const FilePath& file_path) |
| 50 : URLRequestMockHTTPJob(request, file_path) { } | 50 : URLRequestMockHTTPJob(request, file_path) { } |
| 51 | 51 |
| 52 void URLRequestSlowHTTPJob::Start() { | 52 void URLRequestSlowHTTPJob::Start() { |
| 53 delay_timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kDelayMs), this, | 53 delay_timer_.Start(TimeDelta::FromMilliseconds(kDelayMs), this, |
| 54 &URLRequestSlowHTTPJob::RealStart); | 54 &URLRequestSlowHTTPJob::RealStart); |
| 55 } | 55 } |
| 56 | 56 |
| 57 URLRequestSlowHTTPJob::~URLRequestSlowHTTPJob() { | 57 URLRequestSlowHTTPJob::~URLRequestSlowHTTPJob() { |
| 58 } | 58 } |
| 59 | 59 |
| 60 void URLRequestSlowHTTPJob::RealStart() { | 60 void URLRequestSlowHTTPJob::RealStart() { |
| 61 URLRequestMockHTTPJob::Start(); | 61 URLRequestMockHTTPJob::Start(); |
| 62 } | 62 } |
| OLD | NEW |