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

Unified Diff: chrome/browser/automation/automation_provider.h

Issue 101543004: Revert of Revert "Revert 237280 "Remove TraceController"" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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/trace_event_unittest.cc ('k') | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/automation_provider.h
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index a97b6d2fe91bae9a0f8f5ed13471c4d2d86951c1..eed3887648da0e2b545b0a315ea7b31b2eb14a91 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -29,6 +29,7 @@
#include "components/autofill/core/browser/field_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/trace_subscriber.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
@@ -81,7 +82,8 @@
public IPC::Sender,
public base::SupportsWeakPtr<AutomationProvider>,
public base::RefCountedThreadSafe<
- AutomationProvider, content::BrowserThread::DeleteOnUIThread> {
+ AutomationProvider, content::BrowserThread::DeleteOnUIThread>,
+ public content::TraceSubscriber {
public:
explicit AutomationProvider(Profile* profile);
@@ -213,6 +215,17 @@
bool reinitialize_on_channel_error_;
private:
+ // Storage for EndTracing() to resume operations after a callback.
+ struct TracingData {
+ std::list<std::string> trace_output;
+ scoped_ptr<IPC::Message> reply_message;
+ };
+
+ // TraceSubscriber:
+ virtual void OnEndTracingComplete() OVERRIDE;
+ virtual void OnTraceDataCollected(
+ const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE;
+
void OnUnhandledMessage(const IPC::Message& message);
// Clear and reinitialize the automation IPC channel.
@@ -241,8 +254,7 @@
void BeginTracing(const std::string& category_patterns, bool* success);
void EndTracing(IPC::Message* reply_message);
- void OnTraceDataCollected(IPC::Message* reply_message,
- const base::FilePath& path);
+ void GetTracingOutput(std::string* chunk, bool* success);
// Asynchronous request for printing the current tab.
void PrintAsync(int tab_handle);
@@ -339,6 +351,10 @@
// ID of automation channel.
std::string channel_id_;
+ // Trace data that has been collected but not flushed to the automation
+ // client.
+ TracingData tracing_data_;
+
DISALLOW_COPY_AND_ASSIGN(AutomationProvider);
};
« no previous file with comments | « base/debug/trace_event_unittest.cc ('k') | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698