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

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

Issue 1619363002: Add compile time checks against longs being used in IPC structs on 32 bit Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more per Dmitry Created 4 years, 10 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
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 #include <utility> 9 #include <utility>
10 10
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 } 749 }
750 750
751 bool TraceLog::HasEnabledStateObserver(EnabledStateObserver* listener) const { 751 bool TraceLog::HasEnabledStateObserver(EnabledStateObserver* listener) const {
752 AutoLock lock(lock_); 752 AutoLock lock(lock_);
753 return ContainsValue(enabled_state_observer_list_, listener); 753 return ContainsValue(enabled_state_observer_list_, listener);
754 } 754 }
755 755
756 TraceLogStatus TraceLog::GetStatus() const { 756 TraceLogStatus TraceLog::GetStatus() const {
757 AutoLock lock(lock_); 757 AutoLock lock(lock_);
758 TraceLogStatus result; 758 TraceLogStatus result;
759 result.event_capacity = logged_events_->Capacity(); 759 result.event_capacity = static_cast<uint32_t>(logged_events_->Capacity());
760 result.event_count = logged_events_->Size(); 760 result.event_count = static_cast<uint32_t>(logged_events_->Size());
761 return result; 761 return result;
762 } 762 }
763 763
764 bool TraceLog::BufferIsFull() const { 764 bool TraceLog::BufferIsFull() const {
765 AutoLock lock(lock_); 765 AutoLock lock(lock_);
766 return logged_events_->IsFull(); 766 return logged_events_->IsFull();
767 } 767 }
768 768
769 TraceEvent* TraceLog::AddEventToThreadSharedChunkWhileLocked( 769 TraceEvent* TraceLog::AddEventToThreadSharedChunkWhileLocked(
770 TraceEventHandle* handle, 770 TraceEventHandle* handle,
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 } 1742 }
1743 1743
1744 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 1744 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
1745 if (*category_group_enabled_) { 1745 if (*category_group_enabled_) {
1746 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, 1746 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_,
1747 event_handle_); 1747 event_handle_);
1748 } 1748 }
1749 } 1749 }
1750 1750
1751 } // namespace trace_event_internal 1751 } // namespace trace_event_internal
OLDNEW
« base/pickle.cc ('K') | « base/trace_event/trace_log.h ('k') | cc/quads/draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698