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

Side by Side Diff: chrome/test/base/test_url_request_context_getter.h

Issue 7541001: Move more files from chrome/test to chrome/test/base, part #3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_TEST_TEST_URL_REQUEST_CONTEXT_GETTER_H_ 5 #ifndef CHROME_TEST_BASE_TEST_URL_REQUEST_CONTEXT_GETTER_H_
6 #define CHROME_TEST_TEST_URL_REQUEST_CONTEXT_GETTER_H_ 6 #define CHROME_TEST_BASE_TEST_URL_REQUEST_CONTEXT_GETTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
11 11
12 namespace base { 12 namespace base {
13 class MessageLoopProxy; 13 class MessageLoopProxy;
14 } 14 }
15 15
16 // Used to return a dummy context (normally the context is on the IO thread). 16 // Used to return a dummy context (normally the context is on the IO thread).
17 // The one here can be run on the main test thread. Note that this can lead to 17 // The one here can be run on the main test thread. Note that this can lead to
18 // a leak if your test does not have a BrowserThread::IO in it because 18 // a leak if your test does not have a BrowserThread::IO in it because
19 // URLRequestContextGetter is defined as a ReferenceCounted object with a 19 // URLRequestContextGetter is defined as a ReferenceCounted object with a
20 // special trait that deletes it on the IO thread. 20 // special trait that deletes it on the IO thread.
21 class TestURLRequestContextGetter : public net::URLRequestContextGetter { 21 class TestURLRequestContextGetter : public net::URLRequestContextGetter {
22 public: 22 public:
23 TestURLRequestContextGetter(); 23 TestURLRequestContextGetter();
24 virtual ~TestURLRequestContextGetter(); 24 virtual ~TestURLRequestContextGetter();
25 25
26 // net::URLRequestContextGetter: 26 // net::URLRequestContextGetter:
27 virtual net::URLRequestContext* GetURLRequestContext(); 27 virtual net::URLRequestContext* GetURLRequestContext();
28 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; 28 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const;
29 29
30 private: 30 private:
31 scoped_refptr<net::URLRequestContext> context_; 31 scoped_refptr<net::URLRequestContext> context_;
32 }; 32 };
33 33
34 #endif // CHROME_TEST_TEST_URL_REQUEST_CONTEXT_GETTER_H_ 34 #endif // CHROME_TEST_BASE_TEST_URL_REQUEST_CONTEXT_GETTER_H_
OLDNEW
« no previous file with comments | « chrome/test/base/test_notification_tracker.cc ('k') | chrome/test/base/test_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698