summaryrefslogtreecommitdiffstats
path: root/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 12:44:49 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 12:44:49 +0000
commitc38831a108f9f905ce9e68503ee67274939cc950 (patch)
tree7c93c8afd386fdc11a0f03855cee62c2d3449d63 /chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
parent75c753a51b150912055d7a8305cf77134d24816a (diff)
downloadchromium_src-c38831a108f9f905ce9e68503ee67274939cc950.zip
chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.tar.gz
chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.tar.bz2
Split BrowserThread into public API and private implementation, step 1.
Only content/ now has the ability to create BrowserThread objects, with the exception that tests can create the content::TestBrowserThread subclass, and (temporarily) code in chrome/ can create the DeprecatedBrowserThread subclass. A follow-up change will make content/ take care of its own thread creation, remove DeprecatedBrowserThread, and move all state and non-trivial constructors from BrowserThread down to BrowserThreadImpl. Also moved BrowserProcessSubThread into content/ namespace. As part of follow-up cleanup, chrome/ will stop using this class. BUG=98716 TEST=existing Review URL: http://codereview.chromium.org/8392042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc')
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index b02be86..168c463 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -15,11 +15,12 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_pref_service.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
+#include "content/test/test_browser_thread.h"
+#include "content/test/test_browser_thread.h"
#include "net/url_request/url_request.h"
namespace {
@@ -227,14 +228,14 @@ class ProtocolHandlerRegistryTest : public testing::Test {
virtual void SetUp() {
ui_message_loop_.reset(new MessageLoopForUI());
- ui_thread_.reset(new BrowserThread(BrowserThread::UI,
- MessageLoop::current()));
- io_thread_.reset(new BrowserThread(BrowserThread::IO));
+ ui_thread_.reset(new content::TestBrowserThread(BrowserThread::UI,
+ MessageLoop::current()));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO));
base::Thread::Options options;
options.message_loop_type = MessageLoop::TYPE_IO;
io_thread_->StartWithOptions(options);
- file_thread_.reset(new BrowserThread(BrowserThread::FILE));
+ file_thread_.reset(new content::TestBrowserThread(BrowserThread::FILE));
options.message_loop_type = MessageLoop::TYPE_DEFAULT;
file_thread_->StartWithOptions(options);
@@ -265,9 +266,9 @@ class ProtocolHandlerRegistryTest : public testing::Test {
}
scoped_ptr<MessageLoopForUI> ui_message_loop_;
- scoped_ptr<BrowserThread> ui_thread_;
- scoped_ptr<BrowserThread> io_thread_;
- scoped_ptr<BrowserThread> file_thread_;
+ scoped_ptr<content::TestBrowserThread> ui_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> file_thread_;
FakeDelegate* delegate_;
scoped_ptr<TestingProfile> profile_;