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

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

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/animation/animation_player.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_log.h" 5 #include "base/trace_event/trace_log.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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 int generation = this->generation(); 872 int generation = this->generation();
873 // Copy of thread_message_loops_ to be used without locking. 873 // Copy of thread_message_loops_ to be used without locking.
874 std::vector<scoped_refptr<SingleThreadTaskRunner>> 874 std::vector<scoped_refptr<SingleThreadTaskRunner>>
875 thread_message_loop_task_runners; 875 thread_message_loop_task_runners;
876 { 876 {
877 AutoLock lock(lock_); 877 AutoLock lock(lock_);
878 DCHECK(!flush_task_runner_); 878 DCHECK(!flush_task_runner_);
879 flush_task_runner_ = ThreadTaskRunnerHandle::IsSet() 879 flush_task_runner_ = ThreadTaskRunnerHandle::IsSet()
880 ? ThreadTaskRunnerHandle::Get() 880 ? ThreadTaskRunnerHandle::Get()
881 : nullptr; 881 : nullptr;
882 DCHECK(!thread_message_loops_.size() || flush_task_runner_); 882 DCHECK_IMPLIES(thread_message_loops_.size(), flush_task_runner_);
883 flush_output_callback_ = cb; 883 flush_output_callback_ = cb;
884 884
885 if (thread_shared_chunk_) { 885 if (thread_shared_chunk_) {
886 logged_events_->ReturnChunk(thread_shared_chunk_index_, 886 logged_events_->ReturnChunk(thread_shared_chunk_index_,
887 thread_shared_chunk_.Pass()); 887 thread_shared_chunk_.Pass());
888 } 888 }
889 889
890 if (thread_message_loops_.size()) { 890 if (thread_message_loops_.size()) {
891 for (hash_set<MessageLoop*>::const_iterator it = 891 for (hash_set<MessageLoop*>::const_iterator it =
892 thread_message_loops_.begin(); 892 thread_message_loops_.begin();
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 } 1696 }
1697 1697
1698 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 1698 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
1699 if (*category_group_enabled_) { 1699 if (*category_group_enabled_) {
1700 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, 1700 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_,
1701 event_handle_); 1701 event_handle_);
1702 } 1702 }
1703 } 1703 }
1704 1704
1705 } // namespace trace_event_internal 1705 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | cc/animation/animation_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698