Index: content/browser/tracing/tracing_ui.cc |
diff --git a/content/browser/tracing/tracing_ui.cc b/content/browser/tracing/tracing_ui.cc |
index f1c4fe32bb366ea16cb249151fb3754b134c67e6..3c52474504cc8047fd2f17d6b9bed9b525474638 100644 |
--- a/content/browser/tracing/tracing_ui.cc |
+++ b/content/browser/tracing/tracing_ui.cc |
@@ -316,7 +316,7 @@ void TracingUI::DoUploadBase64Encoded(const base::ListValue* args) { |
std::string file_contents; |
base::Base64Decode(file_contents_base64, &file_contents); |
- DoUploadInternal(file_contents); |
+ DoUploadInternal(file_contents, false); |
dsinclair
2015/07/07 18:36:37
Can these pass the enum as well?
shatch
2015/07/07 19:26:00
Done.
|
} |
void TracingUI::DoUpload(const base::ListValue* args) { |
@@ -327,10 +327,11 @@ void TracingUI::DoUpload(const base::ListValue* args) { |
return; |
} |
- DoUploadInternal(file_contents); |
+ DoUploadInternal(file_contents, true); |
} |
-void TracingUI::DoUploadInternal(const std::string& file_contents) { |
+void TracingUI::DoUploadInternal(const std::string& file_contents, |
+ bool compress_on_upload) { |
if (!delegate_) { |
web_ui()->CallJavascriptFunction("onUploadError", |
base::StringValue("Not implemented")); |
@@ -353,8 +354,11 @@ void TracingUI::DoUploadInternal(const std::string& file_contents) { |
trace_uploader_ = delegate_->GetTraceUploader( |
web_ui()->GetWebContents()->GetBrowserContext()->GetRequestContext()); |
DCHECK(trace_uploader_); |
- trace_uploader_->DoUpload(file_contents, nullptr, progress_callback, |
- done_callback); |
+ TraceUploader::UploadMode upload_mode = |
+ compress_on_upload ? TraceUploader::COMPRESSED_UPLOAD |
+ : content::TraceUploader::UNCOMPRESSED_UPLOAD; |
+ trace_uploader_->DoUpload(file_contents, upload_mode, nullptr, |
+ progress_callback, done_callback); |
// TODO(mmandlis): Add support for stopping the upload in progress. |
} |