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

Side by Side Diff: base/sequence_token.h

Issue 2392903002: Add a task_scheduler tracing category which will record an extra event per task. (Closed)
Patch Set: review:danakj#19 Created 4 years, 2 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 | « no previous file | base/sequence_token.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef BASE_SEQUENCE_TOKEN_H_ 5 #ifndef BASE_SEQUENCE_TOKEN_H_
6 #define BASE_SEQUENCE_TOKEN_H_ 6 #define BASE_SEQUENCE_TOKEN_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 10
(...skipping 11 matching lines...) Expand all
22 SequenceToken& operator=(const SequenceToken& other) = default; 22 SequenceToken& operator=(const SequenceToken& other) = default;
23 23
24 // An invalid SequenceToken is not equal to any other SequenceToken, including 24 // An invalid SequenceToken is not equal to any other SequenceToken, including
25 // other invalid SequenceTokens. 25 // other invalid SequenceTokens.
26 bool operator==(const SequenceToken& other) const; 26 bool operator==(const SequenceToken& other) const;
27 bool operator!=(const SequenceToken& other) const; 27 bool operator!=(const SequenceToken& other) const;
28 28
29 // Returns true if this is a valid SequenceToken. 29 // Returns true if this is a valid SequenceToken.
30 bool IsValid() const; 30 bool IsValid() const;
31 31
32 // Returns the integer uniquely representing this SequenceToken. This method
33 // should only be used for tracing and debugging.
34 int ToInternalValue() const;
35
32 // Returns a valid SequenceToken which isn't equal to any previously returned 36 // Returns a valid SequenceToken which isn't equal to any previously returned
33 // SequenceToken. 37 // SequenceToken.
34 static SequenceToken Create(); 38 static SequenceToken Create();
35 39
36 // Returns the SequenceToken associated with the task running on the current 40 // Returns the SequenceToken associated with the task running on the current
37 // thread, as determined by the active ScopedSetSequenceTokenForCurrentThread 41 // thread, as determined by the active ScopedSetSequenceTokenForCurrentThread
38 // if any. 42 // if any.
39 static SequenceToken GetForCurrentThread(); 43 static SequenceToken GetForCurrentThread();
40 44
41 private: 45 private:
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 private: 106 private:
103 const SequenceToken sequence_token_; 107 const SequenceToken sequence_token_;
104 const TaskToken task_token_; 108 const TaskToken task_token_;
105 109
106 DISALLOW_COPY_AND_ASSIGN(ScopedSetSequenceTokenForCurrentThread); 110 DISALLOW_COPY_AND_ASSIGN(ScopedSetSequenceTokenForCurrentThread);
107 }; 111 };
108 112
109 } // namespace base 113 } // namespace base
110 114
111 #endif // BASE_SEQUENCE_TOKEN_H_ 115 #endif // BASE_SEQUENCE_TOKEN_H_
OLDNEW
« no previous file with comments | « no previous file | base/sequence_token.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698