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

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

Issue 271066: Use FilePath in URLRequestMocks. (Closed)
Patch Set: Created 11 years, 2 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/chrome_thread.h" 10 #include "chrome/browser/chrome_thread.h"
(...skipping 12 matching lines...) Expand all
23 // run on the IO thread. 23 // run on the IO thread.
24 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 24 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
25 25
26 if (enabled) { 26 if (enabled) {
27 URLRequestFilter::GetInstance()->ClearHandlers(); 27 URLRequestFilter::GetInstance()->ClearHandlers();
28 28
29 URLRequestFailedDnsJob::AddUrlHandler(); 29 URLRequestFailedDnsJob::AddUrlHandler();
30 URLRequestMockLinkDoctorJob::AddUrlHandler(); 30 URLRequestMockLinkDoctorJob::AddUrlHandler();
31 URLRequestSlowDownloadJob::AddUrlHandler(); 31 URLRequestSlowDownloadJob::AddUrlHandler();
32 32
33 std::wstring root_http; 33 FilePath root_http;
34 PathService::Get(chrome::DIR_TEST_DATA, &root_http); 34 PathService::Get(chrome::DIR_TEST_DATA, &root_http);
35 URLRequestMockHTTPJob::AddUrlHandler(root_http); 35 URLRequestMockHTTPJob::AddUrlHandler(root_http);
36 URLRequestSlowHTTPJob::AddUrlHandler(root_http); 36 URLRequestSlowHTTPJob::AddUrlHandler(root_http);
37 } else { 37 } else {
38 // Revert to the default handlers. 38 // Revert to the default handlers.
39 URLRequestFilter::GetInstance()->ClearHandlers(); 39 URLRequestFilter::GetInstance()->ClearHandlers();
40 } 40 }
41 } 41 }
42 42
43 } // namespace chrome_browser_net 43 } // namespace chrome_browser_net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698