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

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

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/time/tick_clock.h" 9 #include "base/time/tick_clock.h"
10 #include "chrome/browser/io_thread.h" 10 #include "chrome/browser/io_thread.h"
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 } 34 }
35 35
36 } // namespace 36 } // namespace
37 37
38 namespace chrome { 38 namespace chrome {
39 39
40 TestingIOThreadState::TestingIOThreadState() { 40 TestingIOThreadState::TestingIOThreadState() {
41 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
42 // Needed by IOThread constructor. 42 // Needed by IOThread constructor.
43 chromeos::DBusThreadManager::InitializeWithStub(); 43 chromeos::DBusThreadManager::Initialize();
44 chromeos::NetworkHandler::Initialize(); 44 chromeos::NetworkHandler::Initialize();
45 #endif 45 #endif
46 46
47 io_thread_state_.reset( 47 io_thread_state_.reset(
48 new IOThread(TestingBrowserProcess::GetGlobal()->local_state(), 48 new IOThread(TestingBrowserProcess::GetGlobal()->local_state(),
49 TestingBrowserProcess::GetGlobal()->policy_service(), 49 TestingBrowserProcess::GetGlobal()->policy_service(),
50 NULL, NULL)); 50 NULL, NULL));
51 51
52 // Safe because there are no virtuals. 52 // Safe because there are no virtuals.
53 base::RunLoop run_loop; 53 base::RunLoop run_loop;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 void TestingIOThreadState::Shutdown(const base::Closure& done) { 89 void TestingIOThreadState::Shutdown(const base::Closure& done) {
90 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 90 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
91 91
92 delete io_thread_state_->globals(); 92 delete io_thread_state_->globals();
93 io_thread_state_->SetGlobalsForTesting(NULL); 93 io_thread_state_->SetGlobalsForTesting(NULL);
94 done.Run(); 94 done.Run();
95 } 95 }
96 96
97 } // namespace chrome 97 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698