Index: chrome/test/test_url_request_context_getter.cc |
diff --git a/chrome/test/test_url_request_context_getter.cc b/chrome/test/test_url_request_context_getter.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1b6cbc1ad7206454c4e09b8da5f6d12fe01b8349 |
--- /dev/null |
+++ b/chrome/test/test_url_request_context_getter.cc |
@@ -0,0 +1,23 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/test/test_url_request_context_getter.h" |
+ |
+#include "chrome/browser/browser_thread.h" |
+#include "net/url_request/url_request_test_util.h" |
+ |
+TestURLRequestContextGetter::TestURLRequestContextGetter() {} |
+ |
+TestURLRequestContextGetter::~TestURLRequestContextGetter() {} |
+ |
+net::URLRequestContext* TestURLRequestContextGetter::GetURLRequestContext() { |
+ if (!context_) |
+ context_ = new TestURLRequestContext(); |
+ return context_.get(); |
+} |
+ |
+scoped_refptr<base::MessageLoopProxy> |
+TestURLRequestContextGetter::GetIOMessageLoopProxy() const { |
+ return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
+} |