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

Side by Side Diff: chrome/browser/tracing/navigation_tracing.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 | « chrome/browser/tracing/crash_service_uploader.cc ('k') | content/browser/tracing/tracing_ui.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/navigation_tracing.h" 5 #include "chrome/browser/tracing/navigation_tracing.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/tracing/crash_service_uploader.h" 10 #include "chrome/browser/tracing/crash_service_uploader.h"
(...skipping 21 matching lines...) Expand all
32 done_callback.Run(); 32 done_callback.Run();
33 } 33 }
34 34
35 void UploadCallback(const scoped_refptr<base::RefCountedString>& file_contents, 35 void UploadCallback(const scoped_refptr<base::RefCountedString>& file_contents,
36 scoped_ptr<base::DictionaryValue> metadata, 36 scoped_ptr<base::DictionaryValue> metadata,
37 base::Closure callback) { 37 base::Closure callback) {
38 TraceCrashServiceUploader* uploader = new TraceCrashServiceUploader( 38 TraceCrashServiceUploader* uploader = new TraceCrashServiceUploader(
39 g_browser_process->system_request_context()); 39 g_browser_process->system_request_context());
40 40
41 uploader->DoUpload( 41 uploader->DoUpload(
42 file_contents->data(), metadata.Pass(), 42 file_contents->data(), content::TraceUploader::UNCOMPRESSED_UPLOAD,
43 content::TraceUploader::UploadProgressCallback(), 43 metadata.Pass(), content::TraceUploader::UploadProgressCallback(),
44 base::Bind(&OnUploadComplete, base::Owned(uploader), callback)); 44 base::Bind(&OnUploadComplete, base::Owned(uploader), callback));
45 } 45 }
46 46
47 } // namespace 47 } // namespace
48 48
49 void SetupNavigationTracing() { 49 void SetupNavigationTracing() {
50 const base::CommandLine& command_line = 50 const base::CommandLine& command_line =
51 *base::CommandLine::ForCurrentProcess(); 51 *base::CommandLine::ForCurrentProcess();
52 if (!command_line.HasSwitch(switches::kEnableNavigationTracing) || 52 if (!command_line.HasSwitch(switches::kEnableNavigationTracing) ||
53 !command_line.HasSwitch(switches::kTraceUploadURL)) { 53 !command_line.HasSwitch(switches::kTraceUploadURL)) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 content::BackgroundTracingManager::GetInstance()->TriggerNamedEvent( 93 content::BackgroundTracingManager::GetInstance()->TriggerNamedEvent(
94 navigation_handle, 94 navigation_handle,
95 content::BackgroundTracingManager::StartedFinalizingCallback()); 95 content::BackgroundTracingManager::StartedFinalizingCallback());
96 } 96 }
97 } 97 }
98 98
99 content::BackgroundTracingManager::TriggerHandle 99 content::BackgroundTracingManager::TriggerHandle
100 NavigationTracingObserver::navigation_handle = -1; 100 NavigationTracingObserver::navigation_handle = -1;
101 101
102 } // namespace tracing 102 } // namespace tracing
OLDNEW
« no previous file with comments | « chrome/browser/tracing/crash_service_uploader.cc ('k') | content/browser/tracing/tracing_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698