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

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

Issue 11346016: Move remaining content test code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix compile 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) 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 16 matching lines...) Expand all
27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
28 28
29 if (enabled) { 29 if (enabled) {
30 // We have to look around for our helper files, but we only use 30 // We have to look around for our helper files, but we only use
31 // this from tests, so allow these IO operations to happen 31 // this from tests, so allow these IO operations to happen
32 // anywhere. 32 // anywhere.
33 base::ThreadRestrictions::ScopedAllowIO allow_io; 33 base::ThreadRestrictions::ScopedAllowIO allow_io;
34 34
35 net::URLRequestFilter::GetInstance()->ClearHandlers(); 35 net::URLRequestFilter::GetInstance()->ClearHandlers();
36 36
37 URLRequestFailedJob::AddUrlHandler(); 37 content::URLRequestFailedJob::AddUrlHandler();
tfarina 2012/10/29 21:01:30 want to go with using declaration instead?
38 URLRequestMockLinkDoctorJob::AddUrlHandler(); 38 content::URLRequestMockLinkDoctorJob::AddUrlHandler();
39 URLRequestSlowDownloadJob::AddUrlHandler(); 39 content::URLRequestSlowDownloadJob::AddUrlHandler();
40 40
41 FilePath root_http; 41 FilePath root_http;
42 PathService::Get(chrome::DIR_TEST_DATA, &root_http); 42 PathService::Get(chrome::DIR_TEST_DATA, &root_http);
43 URLRequestMockHTTPJob::AddUrlHandler(root_http); 43 content::URLRequestMockHTTPJob::AddUrlHandler(root_http);
44 URLRequestSlowHTTPJob::AddUrlHandler(root_http); 44 content::URLRequestSlowHTTPJob::AddUrlHandler(root_http);
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

Powered by Google App Engine
This is Rietveld 408576698