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

Unified Diff: chrome/test/test_url_request_context_getter.cc

Issue 6250198: More out-of-lining of test code, along with a bunch of GMOCK objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix the gyp files this time Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
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);
+}

Powered by Google App Engine
This is Rietveld 408576698