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

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

Issue 1052373008: [chrome/test] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/test/base/tracing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 io_thread_state_.reset(); 73 io_thread_state_.reset();
74 74
75 #if defined(OS_CHROMEOS) 75 #if defined(OS_CHROMEOS)
76 chromeos::NetworkHandler::Shutdown(); 76 chromeos::NetworkHandler::Shutdown();
77 chromeos::DBusThreadManager::Shutdown(); 77 chromeos::DBusThreadManager::Shutdown();
78 #endif 78 #endif
79 } 79 }
80 80
81 void TestingIOThreadState::Initialize(const base::Closure& done) { 81 void TestingIOThreadState::Initialize(const base::Closure& done) {
82 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 82 DCHECK_CURRENTLY_ON(BrowserThread::IO);
83 83
84 io_thread_state_->SetGlobalsForTesting(new IOThread::Globals()); 84 io_thread_state_->SetGlobalsForTesting(new IOThread::Globals());
85 85
86 done.Run(); 86 done.Run();
87 } 87 }
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_CURRENTLY_ON(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
« no previous file with comments | « no previous file | chrome/test/base/tracing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698