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

Unified Diff: content/browser/tracing/tracing_ui.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/tracing/tracing_ui.h ('k') | content/public/browser/trace_uploader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1afff96cab38184742799ae70d4d4f469daca699 100644
--- a/content/browser/tracing/tracing_ui.cc
+++ b/content/browser/tracing/tracing_ui.cc
@@ -316,7 +316,9 @@ void TracingUI::DoUploadBase64Encoded(const base::ListValue* args) {
std::string file_contents;
base::Base64Decode(file_contents_base64, &file_contents);
- DoUploadInternal(file_contents);
+ // doUploadBase64 is used to upload binary data which is assumed to already
+ // be compressed.
+ DoUploadInternal(file_contents, TraceUploader::UNCOMPRESSED_UPLOAD);
}
void TracingUI::DoUpload(const base::ListValue* args) {
@@ -327,10 +329,11 @@ void TracingUI::DoUpload(const base::ListValue* args) {
return;
}
- DoUploadInternal(file_contents);
+ DoUploadInternal(file_contents, TraceUploader::COMPRESSED_UPLOAD);
}
-void TracingUI::DoUploadInternal(const std::string& file_contents) {
+void TracingUI::DoUploadInternal(const std::string& file_contents,
+ TraceUploader::UploadMode upload_mode) {
if (!delegate_) {
web_ui()->CallJavascriptFunction("onUploadError",
base::StringValue("Not implemented"));
@@ -353,8 +356,8 @@ 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);
+ trace_uploader_->DoUpload(file_contents, upload_mode, nullptr,
+ progress_callback, done_callback);
// TODO(mmandlis): Add support for stopping the upload in progress.
}
« no previous file with comments | « content/browser/tracing/tracing_ui.h ('k') | content/public/browser/trace_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698