Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1104)

Side by Side Diff: chrome/browser/net/url_request_mock_util.cc

Issue 137623011: Switch to using the new Link Doctor API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove bonus line from a merge conflict Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/net/dns_probe_browsertest.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 23 matching lines...) Expand all
34 net::URLRequestFilter::GetInstance()->ClearHandlers(); 34 net::URLRequestFilter::GetInstance()->ClearHandlers();
35 35
36 content::URLRequestFailedJob::AddUrlHandler(); 36 content::URLRequestFailedJob::AddUrlHandler();
37 content::URLRequestSlowDownloadJob::AddUrlHandler(); 37 content::URLRequestSlowDownloadJob::AddUrlHandler();
38 38
39 base::FilePath root_http; 39 base::FilePath root_http;
40 PathService::Get(chrome::DIR_TEST_DATA, &root_http); 40 PathService::Get(chrome::DIR_TEST_DATA, &root_http);
41 content::URLRequestMockHTTPJob::AddUrlHandler(root_http); 41 content::URLRequestMockHTTPJob::AddUrlHandler(root_http);
42 content::URLRequestMockHTTPJob::AddHostnameToFileHandler( 42 content::URLRequestMockHTTPJob::AddHostnameToFileHandler(
43 google_util::LinkDoctorBaseURL().host(), 43 google_util::LinkDoctorBaseURL().host(),
44 root_http.AppendASCII("mock-link-doctor.html")); 44 root_http.AppendASCII("mock-link-doctor.json"));
45 } else { 45 } else {
46 // Revert to the default handlers. 46 // Revert to the default handlers.
47 net::URLRequestFilter::GetInstance()->ClearHandlers(); 47 net::URLRequestFilter::GetInstance()->ClearHandlers();
48 } 48 }
49 } 49 }
50 50
51 } // namespace chrome_browser_net 51 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/dns_probe_browsertest.cc ('k') | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698