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

Unified Diff: ios/web/test/test_web_thread_bundle.cc

Issue 1406983008: [iOS] ios/web no longer depends on content::BrowserThread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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 | « ios/web/test/test_web_thread_adapter.cc ('k') | ios/web/test/test_web_thread_bundle_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/test/test_web_thread_bundle.cc
diff --git a/ios/web/test/test_web_thread_bundle.cc b/ios/web/test/test_web_thread_bundle.cc
index 0dd30786c2dd541fef7e33936fb173cc8ee997e2..f935d3f4086b8c8394396ac7deddd3fddca4410c 100644
--- a/ios/web/test/test_web_thread_bundle.cc
+++ b/ios/web/test/test_web_thread_bundle.cc
@@ -11,41 +11,15 @@
namespace web {
-// Implmentation of TestWebThreadBundle using TestWebThreads.
-// TODO(stuartmorgan): The only reason this is a separate impl class is to
-// keep the implementation details out of the header so that it can be shared
-// with the adapter implementation that uses TestBrowserThreadBundle. Once that
-// version is gone, fold this into TestWebThreadBundle.
-class TestWebThreadBundleImpl {
- public:
- explicit TestWebThreadBundleImpl();
- explicit TestWebThreadBundleImpl(int options);
-
- ~TestWebThreadBundleImpl();
-
- private:
- void Init(int options);
-
- scoped_ptr<base::MessageLoop> message_loop_;
- scoped_ptr<TestWebThread> ui_thread_;
- scoped_ptr<TestWebThread> db_thread_;
- scoped_ptr<TestWebThread> file_thread_;
- scoped_ptr<TestWebThread> file_user_blocking_thread_;
- scoped_ptr<TestWebThread> cache_thread_;
- scoped_ptr<TestWebThread> io_thread_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWebThreadBundleImpl);
-};
-
-TestWebThreadBundleImpl::TestWebThreadBundleImpl() {
+TestWebThreadBundle::TestWebThreadBundle() {
Init(TestWebThreadBundle::DEFAULT);
}
-TestWebThreadBundleImpl::TestWebThreadBundleImpl(int options) {
+TestWebThreadBundle::TestWebThreadBundle(int options) {
Init(options);
}
-TestWebThreadBundleImpl::~TestWebThreadBundleImpl() {
+TestWebThreadBundle::~TestWebThreadBundle() {
// To avoid memory leaks, ensure that any tasks posted to the blocking pool
// via PostTaskAndReply are able to reply back to the originating thread, by
// flushing the blocking pool while the browser threads still exist.
@@ -76,7 +50,7 @@ TestWebThreadBundleImpl::~TestWebThreadBundleImpl() {
base::RunLoop().RunUntilIdle();
}
-void TestWebThreadBundleImpl::Init(int options) {
+void TestWebThreadBundle::Init(int options) {
if (options & TestWebThreadBundle::IO_MAINLOOP) {
message_loop_.reset(new base::MessageLoopForIO());
} else {
@@ -124,17 +98,4 @@ void TestWebThreadBundleImpl::Init(int options) {
}
}
-#pragma mark - TestWebThreadBundle
-
-TestWebThreadBundle::TestWebThreadBundle()
- : impl_(new TestWebThreadBundleImpl()) {
-}
-
-TestWebThreadBundle::TestWebThreadBundle(int options)
- : impl_(new TestWebThreadBundleImpl(options)) {
-}
-
-TestWebThreadBundle::~TestWebThreadBundle() {
-}
-
} // namespace web
« no previous file with comments | « ios/web/test/test_web_thread_adapter.cc ('k') | ios/web/test/test_web_thread_bundle_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698