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

Unified Diff: content/test/test_browser_thread.cc

Issue 10826311: Move the corresponding cc files from content\test to be alongside their headers in content\public\t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 months 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 | « content/test/test_browser_context.cc ('k') | content/test/test_content_client_initializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_browser_thread.cc
===================================================================
--- content/test/test_browser_thread.cc (revision 151499)
+++ content/test/test_browser_thread.cc (working copy)
@@ -1,91 +0,0 @@
-// Copyright (c) 2011 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 "content/public/test/test_browser_thread.h"
-
-#include "base/message_loop.h"
-#include "base/threading/thread.h"
-#include "content/browser/browser_thread_impl.h"
-#include "content/browser/notification_service_impl.h"
-
-namespace content {
-
-// This gives access to set_message_loop().
-class TestBrowserThreadImpl : public BrowserThreadImpl {
- public:
- explicit TestBrowserThreadImpl(BrowserThread::ID identifier)
- : BrowserThreadImpl(identifier),
- notification_service_(NULL) {
- }
-
- TestBrowserThreadImpl(BrowserThread::ID identifier,
- MessageLoop* message_loop)
- : BrowserThreadImpl(identifier, message_loop),
- notification_service_(NULL) {
- }
-
- virtual ~TestBrowserThreadImpl() {
- Stop();
- }
-
- void set_message_loop(MessageLoop* loop) {
- Thread::set_message_loop(loop);
- }
-
- virtual void Init() OVERRIDE {
- notification_service_ = new NotificationServiceImpl;
- BrowserThreadImpl::Init();
- }
-
- virtual void CleanUp() OVERRIDE {
- delete notification_service_;
- notification_service_ = NULL;
- BrowserThreadImpl::CleanUp();
- }
-
- private:
- NotificationService* notification_service_;
- DISALLOW_COPY_AND_ASSIGN(TestBrowserThreadImpl);
-};
-
-TestBrowserThread::TestBrowserThread(BrowserThread::ID identifier)
- : impl_(new TestBrowserThreadImpl(identifier)) {
-}
-
-TestBrowserThread::TestBrowserThread(BrowserThread::ID identifier,
- MessageLoop* message_loop)
- : impl_(new TestBrowserThreadImpl(identifier, message_loop)) {
-}
-
-TestBrowserThread::~TestBrowserThread() {
- Stop();
-}
-
-bool TestBrowserThread::Start() {
- return impl_->Start();
-}
-
-bool TestBrowserThread::StartIOThread() {
- base::Thread::Options options;
- options.message_loop_type = MessageLoop::TYPE_IO;
- return impl_->StartWithOptions(options);
-}
-
-void TestBrowserThread::Stop() {
- impl_->Stop();
-}
-
-bool TestBrowserThread::IsRunning() {
- return impl_->IsRunning();
-}
-
-base::Thread* TestBrowserThread::DeprecatedGetThreadObject() {
- return impl_.get();
-}
-
-void TestBrowserThread::DeprecatedSetMessageLoop(MessageLoop* loop) {
- impl_->set_message_loop(loop);
-}
-
-} // namespace content
« no previous file with comments | « content/test/test_browser_context.cc ('k') | content/test/test_content_client_initializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698