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

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

Issue 1835303002: Implementation of the GreenWeb language extensions. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change GreenWeb-related CSS property names such that they apply in the desired order at runtime. Created 4 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 | « base/trace_event/trace_log.h ('k') | cc/DEPS » ('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 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 void TraceLog::SetProcessSortIndex(int sort_index) { 1602 void TraceLog::SetProcessSortIndex(int sort_index) {
1603 AutoLock lock(lock_); 1603 AutoLock lock(lock_);
1604 process_sort_index_ = sort_index; 1604 process_sort_index_ = sort_index;
1605 } 1605 }
1606 1606
1607 void TraceLog::SetProcessName(const std::string& process_name) { 1607 void TraceLog::SetProcessName(const std::string& process_name) {
1608 AutoLock lock(lock_); 1608 AutoLock lock(lock_);
1609 process_name_ = process_name; 1609 process_name_ = process_name;
1610 } 1610 }
1611 1611
1612 std::string TraceLog::GetProcessName() {
1613 AutoLock lock(lock_);
1614 return process_name_;
1615 }
1616
1612 void TraceLog::UpdateProcessLabel(int label_id, 1617 void TraceLog::UpdateProcessLabel(int label_id,
1613 const std::string& current_label) { 1618 const std::string& current_label) {
1614 if (!current_label.length()) 1619 if (!current_label.length())
1615 return RemoveProcessLabel(label_id); 1620 return RemoveProcessLabel(label_id);
1616 1621
1617 AutoLock lock(lock_); 1622 AutoLock lock(lock_);
1618 process_labels_[label_id] = current_label; 1623 process_labels_[label_id] = current_label;
1619 } 1624 }
1620 1625
1621 void TraceLog::RemoveProcessLabel(int label_id) { 1626 void TraceLog::RemoveProcessLabel(int label_id) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 } 1730 }
1726 1731
1727 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 1732 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
1728 if (*category_group_enabled_) { 1733 if (*category_group_enabled_) {
1729 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, 1734 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_,
1730 event_handle_); 1735 event_handle_);
1731 } 1736 }
1732 } 1737 }
1733 1738
1734 } // namespace trace_event_internal 1739 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « base/trace_event/trace_log.h ('k') | cc/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698