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

Side by Side Diff: chrome/test/base/testing_io_thread_state.cc

Issue 2319783002: mash: Allow a subset of D-Bus clients to be created in DBusThreadManager (Closed)
Patch Set: WIP, add DBusThreadManagerAsh and DBusThreadManagerChrome Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/test/base/testing_io_thread_state.h" 5 #include "chrome/test/base/testing_io_thread_state.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 28 matching lines...) Expand all
39 } // namespace 39 } // namespace
40 40
41 namespace chrome { 41 namespace chrome {
42 42
43 TestingIOThreadState::TestingIOThreadState() { 43 TestingIOThreadState::TestingIOThreadState() {
44 #if defined(OS_CHROMEOS) 44 #if defined(OS_CHROMEOS)
45 // Needed by IOThread constructor. 45 // Needed by IOThread constructor.
46 chromeos::DBusThreadManager::Initialize(); 46 chromeos::DBusThreadManager::Initialize();
47 bluez::BluezDBusManager::Initialize( 47 bluez::BluezDBusManager::Initialize(
48 chromeos::DBusThreadManager::Get()->GetSystemBus(), 48 chromeos::DBusThreadManager::Get()->GetSystemBus(),
49 chromeos::DBusThreadManager::Get()->IsUsingStub( 49 chromeos::DBusThreadManager::Get()->IsUsingFake(
50 chromeos::DBusClientBundle::BLUETOOTH)); 50 chromeos::DBusClientBundle::BLUETOOTH));
51 chromeos::NetworkHandler::Initialize(); 51 chromeos::NetworkHandler::Initialize();
52 #endif 52 #endif
53 53
54 io_thread_state_.reset( 54 io_thread_state_.reset(
55 new IOThread(TestingBrowserProcess::GetGlobal()->local_state(), 55 new IOThread(TestingBrowserProcess::GetGlobal()->local_state(),
56 TestingBrowserProcess::GetGlobal()->policy_service(), 56 TestingBrowserProcess::GetGlobal()->policy_service(),
57 NULL, NULL)); 57 NULL, NULL));
58 58
59 // Safe because there are no virtuals. 59 // Safe because there are no virtuals.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 void TestingIOThreadState::Shutdown(const base::Closure& done) { 97 void TestingIOThreadState::Shutdown(const base::Closure& done) {
98 DCHECK_CURRENTLY_ON(BrowserThread::IO); 98 DCHECK_CURRENTLY_ON(BrowserThread::IO);
99 99
100 delete io_thread_state_->globals(); 100 delete io_thread_state_->globals();
101 io_thread_state_->SetGlobalsForTesting(NULL); 101 io_thread_state_->SetGlobalsForTesting(NULL);
102 done.Run(); 102 done.Run();
103 } 103 }
104 104
105 } // namespace chrome 105 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698