Index: chrome/browser/errorpage_browsertest.cc |
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc |
index 289898ba331654b0b36de87b250d5711f87d3738..6c4708af8908d112f60e780c2325077775fd0069 100644 |
--- a/chrome/browser/errorpage_browsertest.cc |
+++ b/chrome/browser/errorpage_browsertest.cc |
@@ -15,9 +15,9 @@ |
#include "base/synchronization/lock.h" |
#include "chrome/browser/browsing_data/browsing_data_helper.h" |
#include "chrome/browser/browsing_data/browsing_data_remover.h" |
-#include "chrome/browser/google/google_profile_helper.h" |
#include "chrome/browser/net/url_request_mock_util.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_commands.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
@@ -279,10 +279,11 @@ void InstallMockInterceptors( |
// Add a mock for the search engine the error page will use. |
base::FilePath root_http; |
PathService::Get(chrome::DIR_TEST_DATA, &root_http); |
- net::URLRequestMockHTTPJob::AddHostnameToFileHandler( |
- search_url.host(), |
- root_http.AppendASCII("title3.html"), |
- BrowserThread::GetBlockingPool()); |
+ net::URLRequestFilter::GetInstance()->AddHostnameInterceptor( |
+ search_url.scheme(), search_url.host(), |
+ net::URLRequestMockHTTPJob::CreateInterceptorForSingleFile( |
+ root_http.AppendASCII("title3.html"), |
+ BrowserThread::GetBlockingPool())); |
} |
class ErrorPageTest : public InProcessBrowserTest { |
@@ -412,12 +413,11 @@ class ErrorPageTest : public InProcessBrowserTest { |
// Ownership of the |interceptor_| is passed to an object the IO thread, but |
// a pointer is kept in the test fixture. As soon as anything calls |
// URLRequestFilter::ClearHandlers(), |interceptor_| can become invalid. |
+ UIThreadSearchTermsData search_terms_data(browser()->profile()); |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
base::Bind(&InstallMockInterceptors, |
- google_util::GetGoogleSearchURL( |
- google_profile_helper::GetGoogleHomePageURL( |
- browser()->profile())), |
+ GURL(search_terms_data.GoogleBaseURLValue()), |
base::Passed(&owned_interceptor))); |
} |