| 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 "content/test/net/url_request_slow_http_job.h" | 5 #include "content/test/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 |
| 11 static const char kMockHostname[] = "mock.slow.http"; | 11 static const char kMockHostname[] = "mock.slow.http"; |
| 12 | 12 |
| 13 namespace content { |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 // This is the file path leading to the root of the directory to use as the | 16 // This is the file path leading to the root of the directory to use as the |
| 16 // root of the http server. This returns a reference that can be assigned to. | 17 // root of the http server. This returns a reference that can be assigned to. |
| 17 FilePath& BasePath() { | 18 FilePath& BasePath() { |
| 18 CR_DEFINE_STATIC_LOCAL(FilePath, base_path, ()); | 19 CR_DEFINE_STATIC_LOCAL(FilePath, base_path, ()); |
| 19 return base_path; | 20 return base_path; |
| 20 } | 21 } |
| 21 | 22 |
| 22 } // namespace | 23 } // namespace |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 delay_timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kDelayMs), this, | 67 delay_timer_.Start(FROM_HERE, TimeDelta::FromMilliseconds(kDelayMs), this, |
| 67 &URLRequestSlowHTTPJob::RealStart); | 68 &URLRequestSlowHTTPJob::RealStart); |
| 68 } | 69 } |
| 69 | 70 |
| 70 URLRequestSlowHTTPJob::~URLRequestSlowHTTPJob() { | 71 URLRequestSlowHTTPJob::~URLRequestSlowHTTPJob() { |
| 71 } | 72 } |
| 72 | 73 |
| 73 void URLRequestSlowHTTPJob::RealStart() { | 74 void URLRequestSlowHTTPJob::RealStart() { |
| 74 URLRequestMockHTTPJob::Start(); | 75 URLRequestMockHTTPJob::Start(); |
| 75 } | 76 } |
| 77 |
| 78 } // namespace content |
| OLD | NEW |