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 |
61 bool TestBrowserThread::StartIOThread() { | 65 bool TestBrowserThread::StartIOThread() { |
62 base::Thread::Options options; | 66 base::Thread::Options options; |
63 options.message_loop_type = base::MessageLoop::TYPE_IO; | 67 options.message_loop_type = base::MessageLoop::TYPE_IO; |
64 return impl_->StartWithOptions(options); | 68 return impl_->StartWithOptions(options); |
65 } | 69 } |
66 | 70 |
67 void TestBrowserThread::Stop() { | 71 void TestBrowserThread::Stop() { |
68 impl_->Stop(); | 72 impl_->Stop(); |
69 } | 73 } |
70 | 74 |
71 bool TestBrowserThread::IsRunning() { | 75 bool TestBrowserThread::IsRunning() { |
72 return impl_->IsRunning(); | 76 return impl_->IsRunning(); |
73 } | 77 } |
74 | 78 |
75 base::Thread* TestBrowserThread::DeprecatedGetThreadObject() { | 79 base::Thread* TestBrowserThread::DeprecatedGetThreadObject() { |
76 return impl_.get(); | 80 return impl_.get(); |
77 } | 81 } |
78 | 82 |
79 } // namespace content | 83 } // namespace content |
OLD | NEW |