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

Side by Side Diff: base/trace_event/trace_event_impl.cc

Issue 1213193003: Remove DCHECK_IMPLIES and CHECK_IMPLIES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « base/trace_event/memory_dump_manager.cc ('k') | cc/input/top_controls_manager.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 (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 "base/trace_event/trace_event_impl.h" 5 #include "base/trace_event/trace_event_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 int generation = this->generation(); 1798 int generation = this->generation();
1799 // Copy of thread_message_loops_ to be used without locking. 1799 // Copy of thread_message_loops_ to be used without locking.
1800 std::vector<scoped_refptr<SingleThreadTaskRunner> > 1800 std::vector<scoped_refptr<SingleThreadTaskRunner> >
1801 thread_message_loop_task_runners; 1801 thread_message_loop_task_runners;
1802 { 1802 {
1803 AutoLock lock(lock_); 1803 AutoLock lock(lock_);
1804 DCHECK(!flush_task_runner_); 1804 DCHECK(!flush_task_runner_);
1805 flush_task_runner_ = ThreadTaskRunnerHandle::IsSet() 1805 flush_task_runner_ = ThreadTaskRunnerHandle::IsSet()
1806 ? ThreadTaskRunnerHandle::Get() 1806 ? ThreadTaskRunnerHandle::Get()
1807 : nullptr; 1807 : nullptr;
1808 DCHECK_IMPLIES(thread_message_loops_.size(), flush_task_runner_); 1808 DCHECK(thread_message_loops_.empty() || flush_task_runner_);
1809 flush_output_callback_ = cb; 1809 flush_output_callback_ = cb;
1810 1810
1811 if (thread_shared_chunk_) { 1811 if (thread_shared_chunk_) {
1812 logged_events_->ReturnChunk(thread_shared_chunk_index_, 1812 logged_events_->ReturnChunk(thread_shared_chunk_index_,
1813 thread_shared_chunk_.Pass()); 1813 thread_shared_chunk_.Pass());
1814 } 1814 }
1815 1815
1816 if (thread_message_loops_.size()) { 1816 if (thread_message_loops_.size()) {
1817 for (hash_set<MessageLoop*>::const_iterator it = 1817 for (hash_set<MessageLoop*>::const_iterator it =
1818 thread_message_loops_.begin(); 1818 thread_message_loops_.begin();
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 } 2512 }
2513 2513
2514 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 2514 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
2515 if (*category_group_enabled_) { 2515 if (*category_group_enabled_) {
2516 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, 2516 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_,
2517 name_, event_handle_); 2517 name_, event_handle_);
2518 } 2518 }
2519 } 2519 }
2520 2520
2521 } // namespace trace_event_internal 2521 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | cc/input/top_controls_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698