| Index: chrome/test/testing_profile.cc
|
| ===================================================================
|
| --- chrome/test/testing_profile.cc (revision 46098)
|
| +++ chrome/test/testing_profile.cc (working copy)
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "build/build_config.h"
|
| #include "base/command_line.h"
|
| +#include "base/message_loop_proxy.h"
|
| #include "base/string_util.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "chrome/browser/bookmarks/bookmark_model.h"
|
| @@ -99,7 +100,7 @@
|
| // 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 ChromeThread::IO in it because
|
| // URLRequestContextGetter is defined as a ReferenceCounted object with a
|
| -// DeleteOnIOThread trait.
|
| +// special trait that deletes it on the IO thread.
|
| class TestURLRequestContextGetter : public URLRequestContextGetter {
|
| public:
|
| virtual URLRequestContext* GetURLRequestContext() {
|
| @@ -107,6 +108,9 @@
|
| context_ = new TestURLRequestContext();
|
| return context_.get();
|
| }
|
| + virtual scoped_refptr<MessageLoopProxy> GetIOMessageLoopProxy() {
|
| + return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO);
|
| + }
|
|
|
| private:
|
| scoped_refptr<URLRequestContext> context_;
|
| @@ -129,6 +133,9 @@
|
| context_ = new TestExtensionURLRequestContext();
|
| return context_.get();
|
| }
|
| + virtual scoped_refptr<MessageLoopProxy> GetIOMessageLoopProxy() {
|
| + return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO);
|
| + }
|
|
|
| private:
|
| scoped_refptr<URLRequestContext> context_;
|
|
|