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

Unified Diff: ios/web/test/test_web_thread_adapter.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/public/web_thread.h ('k') | ios/web/test/test_web_thread_bundle.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_adapter.cc
diff --git a/ios/web/test/test_web_thread_adapter.cc b/ios/web/test/test_web_thread_adapter.cc
deleted file mode 100644
index e71558704fd0b420892d334c7557855d933d2b3f..0000000000000000000000000000000000000000
--- a/ios/web/test/test_web_thread_adapter.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2014 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 "ios/web/public/test/test_web_thread.h"
-
-#include "content/public/test/test_browser_thread.h"
-#include "ios/web/web_thread_adapter.h"
-
-namespace web {
-
-// TestWebThreadImpl delegates to content::TestBrowserThread until WebThread
-// implementation is indenpendent of content::BrowserThread.
-class TestWebThreadImpl {
- public:
- TestWebThreadImpl(WebThread::ID identifier)
- : test_browser_thread_(BrowserThreadIDFromWebThreadID(identifier)) {}
-
- TestWebThreadImpl(WebThread::ID identifier, base::MessageLoop* message_loop)
- : test_browser_thread_(BrowserThreadIDFromWebThreadID(identifier),
- message_loop) {}
-
- ~TestWebThreadImpl() { Stop(); }
-
- bool Start() { return test_browser_thread_.Start(); }
-
- bool StartIOThread() { return test_browser_thread_.StartIOThread(); }
-
- void Stop() { test_browser_thread_.Stop(); }
-
- bool IsRunning() { return test_browser_thread_.IsRunning(); }
-
- private:
- content::TestBrowserThread test_browser_thread_;
-};
-
-TestWebThread::TestWebThread(WebThread::ID identifier)
- : impl_(new TestWebThreadImpl(identifier)) {
-}
-
-TestWebThread::TestWebThread(WebThread::ID identifier,
- base::MessageLoop* message_loop)
- : impl_(new TestWebThreadImpl(identifier, message_loop)) {
-}
-
-TestWebThread::~TestWebThread() {
-}
-
-bool TestWebThread::Start() {
- return impl_->Start();
-}
-
-bool TestWebThread::StartIOThread() {
- return impl_->StartIOThread();
-}
-
-void TestWebThread::Stop() {
- impl_->Stop();
-}
-
-bool TestWebThread::IsRunning() {
- return impl_->IsRunning();
-}
-
-} // namespace web
« no previous file with comments | « ios/web/public/web_thread.h ('k') | ios/web/test/test_web_thread_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698