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

Side by Side Diff: content/browser/tracing/tracing_ui.h

Issue 1225923003: Make compression optional in TraceUploader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comment for clarification. Created 5 years, 5 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/browser/tracing/navigation_tracing.cc ('k') | content/browser/tracing/tracing_ui.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_TRACING_TRACING_UI_H_ 5 #ifndef CONTENT_BROWSER_TRACING_TRACING_UI_H_
6 #define CONTENT_BROWSER_TRACING_TRACING_UI_H_ 6 #define CONTENT_BROWSER_TRACING_TRACING_UI_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "content/public/browser/trace_uploader.h"
12 #include "content/public/browser/web_ui_controller.h" 13 #include "content/public/browser/web_ui_controller.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 class TraceUploader;
17 class TracingDelegate; 17 class TracingDelegate;
18 18
19 // The C++ back-end for the chrome://tracing webui page. 19 // The C++ back-end for the chrome://tracing webui page.
20 class CONTENT_EXPORT TracingUI : public WebUIController { 20 class CONTENT_EXPORT TracingUI : public WebUIController {
21 public: 21 public:
22 explicit TracingUI(WebUI* web_ui); 22 explicit TracingUI(WebUI* web_ui);
23 ~TracingUI() override; 23 ~TracingUI() override;
24 void OnMonitoringStateChanged(bool is_monitoring); 24 void OnMonitoringStateChanged(bool is_monitoring);
25 void OnTraceUploadProgress(int64 current, int64 total); 25 void OnTraceUploadProgress(int64 current, int64 total);
26 void OnTraceUploadComplete(bool success, const std::string& feedback); 26 void OnTraceUploadComplete(bool success, const std::string& feedback);
27 27
28 private: 28 private:
29 void DoUploadInternal(const std::string& file_contents); 29 void DoUploadInternal(const std::string& file_contents,
30 TraceUploader::UploadMode upload_mode);
30 void DoUpload(const base::ListValue* args); 31 void DoUpload(const base::ListValue* args);
31 void DoUploadBase64Encoded(const base::ListValue* args); 32 void DoUploadBase64Encoded(const base::ListValue* args);
32 33
33 scoped_ptr<TracingDelegate> delegate_; 34 scoped_ptr<TracingDelegate> delegate_;
34 scoped_ptr<TraceUploader> trace_uploader_; 35 scoped_ptr<TraceUploader> trace_uploader_;
35 base::WeakPtrFactory<TracingUI> weak_factory_; 36 base::WeakPtrFactory<TracingUI> weak_factory_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(TracingUI); 38 DISALLOW_COPY_AND_ASSIGN(TracingUI);
38 }; 39 };
39 40
40 } // namespace content 41 } // namespace content
41 42
42 #endif // CONTENT_BROWSER_TRACING_TRACING_UI_H_ 43 #endif // CONTENT_BROWSER_TRACING_TRACING_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/tracing/navigation_tracing.cc ('k') | content/browser/tracing/tracing_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698