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

Side by Side Diff: chrome/test/logging/win/test_log_collector.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 | « chrome/test/chromedriver/session.cc ('k') | chromecast/base/chromecast_config_android.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/logging/win/test_log_collector.h" 5 #include "chrome/test/logging/win/test_log_collector.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <ios> 10 #include <ios>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 // The current log file. Valid only during a test. 143 // The current log file. Valid only during a test.
144 base::FilePath log_file_; 144 base::FilePath log_file_;
145 145
146 // True if --also-emit-success-logs was specified on the command line. 146 // True if --also-emit-success-logs was specified on the command line.
147 bool also_emit_success_logs_; 147 bool also_emit_success_logs_;
148 148
149 DISALLOW_COPY_AND_ASSIGN(TestLogCollector); 149 DISALLOW_COPY_AND_ASSIGN(TestLogCollector);
150 }; 150 };
151 151
152 base::LazyInstance<TestLogCollector> g_test_log_collector = 152 base::LazyInstance<TestLogCollector>::DestructorAtExit g_test_log_collector =
153 LAZY_INSTANCE_INITIALIZER; 153 LAZY_INSTANCE_INITIALIZER;
154 154
155 // TestLogCollector::EventListener implementation 155 // TestLogCollector::EventListener implementation
156 156
157 TestLogCollector::EventListener::EventListener( 157 TestLogCollector::EventListener::EventListener(
158 TestLogCollector* test_log_collector, 158 TestLogCollector* test_log_collector,
159 testing::TestEventListener* default_result_printer) 159 testing::TestEventListener* default_result_printer)
160 : test_log_collector_(test_log_collector), 160 : test_log_collector_(test_log_collector),
161 default_result_printer_(default_result_printer) { 161 default_result_printer_(default_result_printer) {
162 } 162 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 void InstallTestLogCollector(testing::UnitTest* unit_test) { 280 void InstallTestLogCollector(testing::UnitTest* unit_test) {
281 // Must be called before running any tests. 281 // Must be called before running any tests.
282 DCHECK(unit_test); 282 DCHECK(unit_test);
283 DCHECK(!unit_test->current_test_case()); 283 DCHECK(!unit_test->current_test_case());
284 284
285 g_test_log_collector.Get().Initialize(unit_test); 285 g_test_log_collector.Get().Initialize(unit_test);
286 } 286 }
287 287
288 } // namespace logging_win 288 } // namespace logging_win
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/session.cc ('k') | chromecast/base/chromecast_config_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698