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

Unified Diff: chrome/test/testing_profile.cc

Issue 5537002: Fixed minor atomicity issue in PrefProxyConfigService::GetLatestProxyConfig. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed comment by Eric Created 10 years 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
« no previous file with comments | « chrome/browser/net/pref_proxy_config_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_profile.cc
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index 243612e3cdc3fc585adb300e9d1bb06fbf767ef4..5babd00029b0ae7edb3614af9a076edb2faee980 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -40,6 +40,7 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/testing_pref_service.h"
+#include "chrome/test/test_url_request_context_getter.h"
#include "chrome/test/ui_test_utils.h"
#include "net/base/cookie_monster.h"
#include "net/url_request/url_request_context.h"
@@ -112,26 +113,6 @@ class BookmarkLoadObserver : public BookmarkModelObserver {
DISALLOW_COPY_AND_ASSIGN(BookmarkLoadObserver);
};
-// Used to return a dummy context (normally the context is on the IO thread).
-// The one here can be run on the main test thread. Note that this can lead to
-// a leak if your test does not have a BrowserThread::IO in it because
-// URLRequestContextGetter is defined as a ReferenceCounted object with a
-// special trait that deletes it on the IO thread.
-class TestURLRequestContextGetter : public URLRequestContextGetter {
- public:
- virtual URLRequestContext* GetURLRequestContext() {
- if (!context_)
- context_ = new TestURLRequestContext();
- return context_.get();
- }
- virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const {
- return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
- }
-
- private:
- scoped_refptr<URLRequestContext> context_;
-};
-
class TestExtensionURLRequestContext : public URLRequestContext {
public:
TestExtensionURLRequestContext() {
« no previous file with comments | « chrome/browser/net/pref_proxy_config_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698