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

Unified Diff: base/debug/activity_tracker.h

Issue 2753573002: Remove 'global' user-data in favor of 'process' user-data. (Closed)
Patch Set: rebased Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/activity_analyzer_unittest.cc ('k') | base/debug/activity_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/activity_tracker.h
diff --git a/base/debug/activity_tracker.h b/base/debug/activity_tracker.h
index c8cf1e972ef61f5c576dfe153db39c474f354c4e..c968f38c70bbe7fa876c74160018f3eb5f0c05c1 100644
--- a/base/debug/activity_tracker.h
+++ b/base/debug/activity_tracker.h
@@ -764,7 +764,6 @@ class BASE_EXPORT GlobalActivityTracker {
kTypeIdUserDataRecord = 0x615EDDD7 + 3, // SHA1(UserDataRecord) v3
kTypeIdGlobalLogMessage = 0x4CF434F9 + 1, // SHA1(GlobalLogMessage) v1
kTypeIdProcessDataRecord = kTypeIdUserDataRecord + 0x100,
- kTypeIdGlobalDataRecord = kTypeIdUserDataRecord + 0x200,
kTypeIdActivityTrackerFree = ~kTypeIdActivityTracker,
kTypeIdUserDataRecordFree = ~kTypeIdUserDataRecord,
@@ -826,9 +825,8 @@ class BASE_EXPORT GlobalActivityTracker {
};
// This is a thin wrapper around the thread-tracker's ScopedActivity that
- // accesses the global tracker to provide some of the information, notably
- // which thread-tracker to use. It is safe to create even if activity
- // tracking is not enabled.
+ // allows thread-safe access to data values. It is safe to use even if
+ // activity tracking is not enabled.
class BASE_EXPORT ScopedThreadActivity
: public ThreadActivityTracker::ScopedActivity {
public:
@@ -1032,10 +1030,6 @@ class BASE_EXPORT GlobalActivityTracker {
// Updates to this are thread-safe.
ActivityUserData& process_data() { return process_data_; }
- // Accesses the global data record for storing arbitrary key/value pairs.
- // Updates to this are thread-safe.
- ActivityUserData& global_data() { return global_data_; }
-
private:
friend class GlobalActivityAnalyzer;
friend class ScopedThreadActivity;
@@ -1190,7 +1184,6 @@ class BASE_EXPORT GlobalActivityTracker {
// An object for holding arbitrary key value pairs with thread-safe access.
ThreadSafeUserData process_data_;
- ThreadSafeUserData global_data_;
// A map of global module information, keyed by module path.
std::map<const std::string, ModuleInfoRecord*> modules_;
« no previous file with comments | « base/debug/activity_analyzer_unittest.cc ('k') | base/debug/activity_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698