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

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

Issue 11346016: Move remaining content test code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_link_doctor_job.h" 5 #include "chrome/browser/net/url_request_mock_link_doctor_job.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "chrome/browser/google/google_util.h" 8 #include "chrome/browser/google/google_util.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 #include "net/url_request/url_request_filter.h" 11 #include "net/url_request/url_request_filter.h"
12 12
13 using content::URLRequestMockHTTPJob;
14
13 namespace { 15 namespace {
14 16
15 FilePath GetMockFilePath() { 17 FilePath GetMockFilePath() {
16 FilePath test_dir; 18 FilePath test_dir;
17 bool success = PathService::Get(chrome::DIR_TEST_DATA, &test_dir); 19 bool success = PathService::Get(chrome::DIR_TEST_DATA, &test_dir);
18 DCHECK(success); 20 DCHECK(success);
19 return test_dir.AppendASCII("mock-link-doctor.html"); 21 return test_dir.AppendASCII("mock-link-doctor.html");
20 } 22 }
21 23
22 } // namespace 24 } // namespace
(...skipping 11 matching lines...) Expand all
34 net::URLRequestFilter* filter = net::URLRequestFilter::GetInstance(); 36 net::URLRequestFilter* filter = net::URLRequestFilter::GetInstance();
35 filter->AddHostnameHandler("http", 37 filter->AddHostnameHandler("http",
36 google_util::LinkDoctorBaseURL().host(), 38 google_util::LinkDoctorBaseURL().host(),
37 URLRequestMockLinkDoctorJob::Factory); 39 URLRequestMockLinkDoctorJob::Factory);
38 } 40 }
39 41
40 URLRequestMockLinkDoctorJob::URLRequestMockLinkDoctorJob( 42 URLRequestMockLinkDoctorJob::URLRequestMockLinkDoctorJob(
41 net::URLRequest* request, net::NetworkDelegate* network_delegate) 43 net::URLRequest* request, net::NetworkDelegate* network_delegate)
42 : URLRequestMockHTTPJob(request, network_delegate, GetMockFilePath()) { 44 : URLRequestMockHTTPJob(request, network_delegate, GetMockFilePath()) {
43 } 45 }
OLDNEW
« no previous file with comments | « chrome/browser/net/url_request_mock_link_doctor_job.h ('k') | chrome/browser/net/url_request_mock_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698