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

Side by Side Diff: content/public/browser/trace_controller.h

Issue 10837082: implement SetWatchEvent and WaitForEvent for trace-based-tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update / merge -- no change Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « content/common/child_trace_message_filter.cc ('k') | content/public/browser/trace_subscriber.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_
6 #define CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ 6 #define CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // When the TraceBufferPercentFull value is determined, 61 // When the TraceBufferPercentFull value is determined,
62 // subscriber->OnTraceBufferPercentFullReply is called. 62 // subscriber->OnTraceBufferPercentFullReply is called.
63 // When any child process reaches 100% full, the TraceController will end 63 // When any child process reaches 100% full, the TraceController will end
64 // tracing, and call TraceSubscriber::OnEndTracingComplete. 64 // tracing, and call TraceSubscriber::OnEndTracingComplete.
65 // GetTraceBufferPercentFullAsync fails in the following conditions: 65 // GetTraceBufferPercentFullAsync fails in the following conditions:
66 // trace is ending or disabled; 66 // trace is ending or disabled;
67 // a previous call to GetTraceBufferPercentFullAsync is pending; or 67 // a previous call to GetTraceBufferPercentFullAsync is pending; or
68 // the caller is not the current subscriber. 68 // the caller is not the current subscriber.
69 virtual bool GetTraceBufferPercentFullAsync(TraceSubscriber* subscriber) = 0; 69 virtual bool GetTraceBufferPercentFullAsync(TraceSubscriber* subscriber) = 0;
70 70
71 // |subscriber->OnEventWatchNotification()| will be called every time the
72 // given event occurs on any process.
73 virtual bool SetWatchEvent(TraceSubscriber* subscriber,
74 const std::string& category_name,
75 const std::string& event_name) = 0;
76
77 // Cancel the watch event. If tracing is enabled, this may race with the
78 // watch event notification firing.
79 virtual bool CancelWatchEvent(TraceSubscriber* subscriber) = 0;
80
71 // Cancel the subscriber so that it will not be called when EndTracingAsync is 81 // Cancel the subscriber so that it will not be called when EndTracingAsync is
72 // acked by all child processes. This will also call EndTracingAsync 82 // acked by all child processes. This will also call EndTracingAsync
73 // internally if necessary. 83 // internally if necessary.
74 // Safe to call even if caller is not the current subscriber. 84 // Safe to call even if caller is not the current subscriber.
75 virtual void CancelSubscriber(TraceSubscriber* subscriber) = 0; 85 virtual void CancelSubscriber(TraceSubscriber* subscriber) = 0;
76 86
77 protected: 87 protected:
78 virtual ~TraceController() {} 88 virtual ~TraceController() {}
79 }; 89 };
80 90
81 } // namespace content 91 } // namespace content
82 92
83 #endif // CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ 93 #endif // CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_
84 94
OLDNEW
« no previous file with comments | « content/common/child_trace_message_filter.cc ('k') | content/public/browser/trace_subscriber.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698