OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/net/url_request_mock_util.h" | 5 #include "chrome/browser/net/url_request_mock_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" |
10 #include "base/threading/thread_restrictions.h" | 11 #include "base/threading/thread_restrictions.h" |
11 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
12 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
13 #include "net/test/url_request/url_request_failed_job.h" | 14 #include "net/test/url_request/url_request_failed_job.h" |
14 #include "net/test/url_request/url_request_mock_http_job.h" | 15 #include "net/test/url_request/url_request_mock_http_job.h" |
15 #include "net/test/url_request/url_request_slow_download_job.h" | 16 #include "net/test/url_request/url_request_slow_download_job.h" |
16 #include "net/url_request/url_request_filter.h" | 17 #include "net/url_request/url_request_filter.h" |
17 | 18 |
18 using content::BrowserThread; | 19 using content::BrowserThread; |
19 | 20 |
(...skipping 19 matching lines...) Expand all Loading... |
39 PathService::Get(chrome::DIR_TEST_DATA, &root_http); | 40 PathService::Get(chrome::DIR_TEST_DATA, &root_http); |
40 net::URLRequestMockHTTPJob::AddUrlHandlers( | 41 net::URLRequestMockHTTPJob::AddUrlHandlers( |
41 root_http, BrowserThread::GetBlockingPool()); | 42 root_http, BrowserThread::GetBlockingPool()); |
42 } else { | 43 } else { |
43 // Revert to the default handlers. | 44 // Revert to the default handlers. |
44 net::URLRequestFilter::GetInstance()->ClearHandlers(); | 45 net::URLRequestFilter::GetInstance()->ClearHandlers(); |
45 } | 46 } |
46 } | 47 } |
47 | 48 |
48 } // namespace chrome_browser_net | 49 } // namespace chrome_browser_net |
OLD | NEW |