OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/public/test/test_browser_thread.h" | 5 #include "content/public/test/test_browser_thread.h" |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
9 #include "content/browser/browser_thread_impl.h" | 9 #include "content/browser/browser_thread_impl.h" |
10 #include "content/browser/notification_service_impl.h" | 10 #include "content/browser/notification_service_impl.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 : impl_(new TestBrowserThreadImpl(identifier, message_loop)) {} | 51 : impl_(new TestBrowserThreadImpl(identifier, message_loop)) {} |
52 | 52 |
53 TestBrowserThread::~TestBrowserThread() { | 53 TestBrowserThread::~TestBrowserThread() { |
54 Stop(); | 54 Stop(); |
55 } | 55 } |
56 | 56 |
57 bool TestBrowserThread::Start() { | 57 bool TestBrowserThread::Start() { |
58 return impl_->Start(); | 58 return impl_->Start(); |
59 } | 59 } |
60 | 60 |
61 bool TestBrowserThread::StartAndWaitForTesting() { | |
62 return impl_->StartAndWaitForTesting(); | |
63 } | |
64 | |
65 bool TestBrowserThread::StartIOThread() { | 61 bool TestBrowserThread::StartIOThread() { |
66 base::Thread::Options options; | 62 base::Thread::Options options; |
67 options.message_loop_type = base::MessageLoop::TYPE_IO; | 63 options.message_loop_type = base::MessageLoop::TYPE_IO; |
68 return impl_->StartWithOptions(options); | 64 return impl_->StartWithOptions(options); |
69 } | 65 } |
70 | 66 |
71 void TestBrowserThread::Stop() { | 67 void TestBrowserThread::Stop() { |
72 impl_->Stop(); | 68 impl_->Stop(); |
73 } | 69 } |
74 | 70 |
75 bool TestBrowserThread::IsRunning() { | 71 bool TestBrowserThread::IsRunning() { |
76 return impl_->IsRunning(); | 72 return impl_->IsRunning(); |
77 } | 73 } |
78 | 74 |
79 base::Thread* TestBrowserThread::DeprecatedGetThreadObject() { | 75 base::Thread* TestBrowserThread::DeprecatedGetThreadObject() { |
80 return impl_.get(); | 76 return impl_.get(); |
81 } | 77 } |
82 | 78 |
83 } // namespace content | 79 } // namespace content |
OLD | NEW |