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

Unified Diff: content/browser/trace_controller_impl.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, 4 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 | « chrome/test/base/tracing_browsertest.cc ('k') | content/browser/trace_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/trace_controller_impl.h
diff --git a/content/browser/trace_controller_impl.h b/content/browser/trace_controller_impl.h
index 18fd5391533088fdea6b71fbf0b7c4f8ba56dd1b..915f6a9c0c9a2d05d49c44f30153ee18ef0f2f0b 100644
--- a/content/browser/trace_controller_impl.h
+++ b/content/browser/trace_controller_impl.h
@@ -10,7 +10,7 @@
#include <vector>
#include "base/debug/trace_event.h"
-#include "base/memory/singleton.h"
+#include "base/lazy_instance.h"
#include "content/public/browser/trace_controller.h"
class CommandLine;
@@ -46,12 +46,16 @@ class TraceControllerImpl : public TraceController {
virtual bool EndTracingAsync(TraceSubscriber* subscriber) OVERRIDE;
virtual bool GetTraceBufferPercentFullAsync(
TraceSubscriber* subscriber) OVERRIDE;
+ virtual bool SetWatchEvent(TraceSubscriber* subscriber,
+ const std::string& category_name,
+ const std::string& event_name) OVERRIDE;
+ virtual bool CancelWatchEvent(TraceSubscriber* subscriber) OVERRIDE;
virtual void CancelSubscriber(TraceSubscriber* subscriber) OVERRIDE;
private:
typedef std::set<scoped_refptr<TraceMessageFilter> > FilterMap;
- friend struct DefaultSingletonTraits<TraceControllerImpl>;
+ friend struct base::DefaultLazyInstanceTraits<TraceControllerImpl>;
friend class ::TraceMessageFilter;
TraceControllerImpl();
@@ -85,7 +89,7 @@ class TraceControllerImpl : public TraceController {
void OnEndTracingAck(const std::vector<std::string>& known_categories);
void OnTraceDataCollected(
const scoped_refptr<base::RefCountedString>& events_str_ptr);
- void OnTraceBufferFull();
+ void OnTraceNotification(int notification);
void OnTraceBufferPercentFullReply(float percent_full);
FilterMap filters_;
@@ -100,6 +104,8 @@ class TraceControllerImpl : public TraceController {
std::set<std::string> known_categories_;
std::vector<std::string> included_categories_;
std::vector<std::string> excluded_categories_;
+ std::string watch_category_;
+ std::string watch_name_;
DISALLOW_COPY_AND_ASSIGN(TraceControllerImpl);
};
« no previous file with comments | « chrome/test/base/tracing_browsertest.cc ('k') | content/browser/trace_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698