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

Side by Side Diff: components/feedback/tracing_manager.h

Issue 541763002: tracing: get rid of files in TracingController interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed system trace collection Created 6 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
« no previous file with comments | « chrome/test/base/tracing.cc ('k') | components/feedback/tracing_manager.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_FEEDBACK_TRACING_MANAGER_H_ 5 #ifndef COMPONENTS_FEEDBACK_TRACING_MANAGER_H_
6 #define COMPONENTS_FEEDBACK_TRACING_MANAGER_H_ 6 #define COMPONENTS_FEEDBACK_TRACING_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // returned via |callback|. Returns false on failure. 51 // returned via |callback|. Returns false on failure.
52 bool GetTraceData(int id, const TraceDataCallback& callback); 52 bool GetTraceData(int id, const TraceDataCallback& callback);
53 53
54 // Discard the data for trace |id|. 54 // Discard the data for trace |id|.
55 void DiscardTraceData(int id); 55 void DiscardTraceData(int id);
56 56
57 private: 57 private:
58 TracingManager(); 58 TracingManager();
59 59
60 void StartTracing(); 60 void StartTracing();
61 void OnTraceDataCollected(const base::FilePath& path); 61 void OnTraceDataCollected(base::RefCountedString* data);
62 62
63 // ID of the trace that is being collected. 63 // ID of the trace that is being collected.
64 int current_trace_id_; 64 int current_trace_id_;
65 65
66 // Mapping of trace ID to trace data. 66 // Mapping of trace ID to trace data.
67 std::map<int, scoped_refptr<base::RefCountedString> > trace_data_; 67 std::map<int, scoped_refptr<base::RefCountedString> > trace_data_;
68 68
69 // Callback for the current trace request. 69 // Callback for the current trace request.
70 TraceDataCallback trace_callback_; 70 TraceDataCallback trace_callback_;
71 71
72 base::WeakPtrFactory<TracingManager> weak_ptr_factory_; 72 base::WeakPtrFactory<TracingManager> weak_ptr_factory_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(TracingManager); 74 DISALLOW_COPY_AND_ASSIGN(TracingManager);
75 }; 75 };
76 76
77 #endif // COMPONENTS_FEEDBACK_TRACING_MANAGER_H_ 77 #endif // COMPONENTS_FEEDBACK_TRACING_MANAGER_H_
78 78
OLDNEW
« no previous file with comments | « chrome/test/base/tracing.cc ('k') | components/feedback/tracing_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698