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

Side by Side Diff: chrome/browser/tracing/background_tracing_field_trial.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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/tracing/crash_service_uploader.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/tracing/background_tracing_field_trial.h" 5 #include "chrome/browser/tracing/background_tracing_field_trial.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 28 matching lines...) Expand all
39 const scoped_refptr<base::RefCountedString>& file_contents, 39 const scoped_refptr<base::RefCountedString>& file_contents,
40 scoped_ptr<base::DictionaryValue> metadata, 40 scoped_ptr<base::DictionaryValue> metadata,
41 base::Closure callback) { 41 base::Closure callback) {
42 TraceCrashServiceUploader* uploader = new TraceCrashServiceUploader( 42 TraceCrashServiceUploader* uploader = new TraceCrashServiceUploader(
43 g_browser_process->system_request_context()); 43 g_browser_process->system_request_context());
44 44
45 if (GURL(upload_url).is_valid()) 45 if (GURL(upload_url).is_valid())
46 uploader->SetUploadURL(upload_url); 46 uploader->SetUploadURL(upload_url);
47 47
48 uploader->DoUpload( 48 uploader->DoUpload(
49 file_contents->data(), metadata.Pass(), 49 file_contents->data(), content::TraceUploader::UNCOMPRESSED_UPLOAD,
50 content::TraceUploader::UploadProgressCallback(), 50 metadata.Pass(), content::TraceUploader::UploadProgressCallback(),
51 base::Bind(&OnUploadComplete, base::Owned(uploader), callback)); 51 base::Bind(&OnUploadComplete, base::Owned(uploader), callback));
52 } 52 }
53 53
54 } // namespace 54 } // namespace
55 55
56 void SetConfigTextFilterForTesting(ConfigTextFilterForTesting predicate) { 56 void SetConfigTextFilterForTesting(ConfigTextFilterForTesting predicate) {
57 g_config_text_filter_for_testing = predicate; 57 g_config_text_filter_for_testing = predicate;
58 } 58 }
59 59
60 void SetupBackgroundTracingFieldTrial() { 60 void SetupBackgroundTracingFieldTrial() {
(...skipping 20 matching lines...) Expand all
81 content::BackgroundTracingConfig::FromDict(dict); 81 content::BackgroundTracingConfig::FromDict(dict);
82 if (!config) 82 if (!config)
83 return; 83 return;
84 84
85 content::BackgroundTracingManager::GetInstance()->SetActiveScenario( 85 content::BackgroundTracingManager::GetInstance()->SetActiveScenario(
86 config.Pass(), base::Bind(&UploadCallback, upload_url), 86 config.Pass(), base::Bind(&UploadCallback, upload_url),
87 content::BackgroundTracingManager::ANONYMIZE_DATA); 87 content::BackgroundTracingManager::ANONYMIZE_DATA);
88 } 88 }
89 89
90 } // namespace tracing 90 } // namespace tracing
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tracing/crash_service_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698