| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <memory> | 5 #include <memory> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 net::URLRequest* request, | 179 net::URLRequest* request, |
| 180 net::NetworkDelegate* network_delegate, | 180 net::NetworkDelegate* network_delegate, |
| 181 const base::FilePath& file_path, | 181 const base::FilePath& file_path, |
| 182 bool should_delay, | 182 bool should_delay, |
| 183 const DestructionCallback& destruction_callback) | 183 const DestructionCallback& destruction_callback) |
| 184 : URLRequestMockHTTPJob( | 184 : URLRequestMockHTTPJob( |
| 185 request, | 185 request, |
| 186 network_delegate, | 186 network_delegate, |
| 187 file_path, | 187 file_path, |
| 188 base::CreateTaskRunnerWithTraits( | 188 base::CreateTaskRunnerWithTraits( |
| 189 base::TaskTraits() | 189 {base::MayBlock(), base::TaskPriority::BACKGROUND, |
| 190 .MayBlock() | 190 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})), |
| 191 .WithPriority(base::TaskPriority::BACKGROUND) | |
| 192 .WithShutdownBehavior( | |
| 193 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN))), | |
| 194 should_delay_(should_delay), | 191 should_delay_(should_delay), |
| 195 start_delayed_(false), | 192 start_delayed_(false), |
| 196 destruction_callback_(destruction_callback) {} | 193 destruction_callback_(destruction_callback) {} |
| 197 | 194 |
| 198 void Start() override { | 195 void Start() override { |
| 199 if (should_delay_) { | 196 if (should_delay_) { |
| 200 DCHECK(!start_delayed_); | 197 DCHECK(!start_delayed_); |
| 201 start_delayed_ = true; | 198 start_delayed_ = true; |
| 202 return; | 199 return; |
| 203 } | 200 } |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 | 982 |
| 986 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE, | 983 EXPECT_EQ(error_page::DNS_PROBE_FINISHED_INCONCLUSIVE, |
| 987 WaitForSentStatus()); | 984 WaitForSentStatus()); |
| 988 EXPECT_EQ(0, pending_status_count()); | 985 EXPECT_EQ(0, pending_status_count()); |
| 989 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED"); | 986 ExpectDisplayingLocalErrorPage("ERR_NAME_NOT_RESOLVED"); |
| 990 } | 987 } |
| 991 | 988 |
| 992 } // namespace | 989 } // namespace |
| 993 | 990 |
| 994 } // namespace chrome_browser_net | 991 } // namespace chrome_browser_net |
| OLD | NEW |