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/prerender/prerender_test_utils.h" | 5 #include "chrome/browser/prerender/prerender_test_utils.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/threading/sequenced_worker_pool.h" |
18 #include "chrome/browser/loader/chrome_resource_dispatcher_host_delegate.h" | 19 #include "chrome/browser/loader/chrome_resource_dispatcher_host_delegate.h" |
19 #include "chrome/browser/prerender/prerender_manager.h" | 20 #include "chrome/browser/prerender/prerender_manager.h" |
20 #include "chrome/browser/prerender/prerender_manager_factory.h" | 21 #include "chrome/browser/prerender/prerender_manager_factory.h" |
21 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/safe_browsing/local_database_manager.h" | 23 #include "chrome/browser/safe_browsing/local_database_manager.h" |
23 #include "chrome/browser/ui/browser.h" | 24 #include "chrome/browser/ui/browser.h" |
24 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
25 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
26 #include "chrome/grit/generated_resources.h" | 27 #include "chrome/grit/generated_resources.h" |
27 #include "chrome/test/base/ui_test_utils.h" | 28 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 806 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
806 std::unique_ptr<net::URLRequestInterceptor> interceptor( | 807 std::unique_ptr<net::URLRequestInterceptor> interceptor( |
807 new HangingFirstRequestInterceptor(file, callback)); | 808 new HangingFirstRequestInterceptor(file, callback)); |
808 net::URLRequestFilter::GetInstance()->AddUrlInterceptor( | 809 net::URLRequestFilter::GetInstance()->AddUrlInterceptor( |
809 url, std::move(interceptor)); | 810 url, std::move(interceptor)); |
810 } | 811 } |
811 | 812 |
812 } // namespace test_utils | 813 } // namespace test_utils |
813 | 814 |
814 } // namespace prerender | 815 } // namespace prerender |
OLD | NEW |