OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/crash_service_uploader.h" | 5 #include "chrome/browser/tracing/crash_service_uploader.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 void TraceCrashServiceUploader::CreateAndStartURLFetcher( | 249 void TraceCrashServiceUploader::CreateAndStartURLFetcher( |
250 const std::string& upload_url, | 250 const std::string& upload_url, |
251 const std::string& post_data) { | 251 const std::string& post_data) { |
252 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 252 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
253 DCHECK(!url_fetcher_.get()); | 253 DCHECK(!url_fetcher_.get()); |
254 | 254 |
255 std::string content_type = kUploadContentType; | 255 std::string content_type = kUploadContentType; |
256 content_type.append("; boundary="); | 256 content_type.append("; boundary="); |
257 content_type.append(kMultipartBoundary); | 257 content_type.append(kMultipartBoundary); |
258 | 258 |
259 url_fetcher_.reset( | 259 url_fetcher_ = |
260 net::URLFetcher::Create(GURL(upload_url), net::URLFetcher::POST, this)); | 260 net::URLFetcher::Create(GURL(upload_url), net::URLFetcher::POST, this); |
261 url_fetcher_->SetRequestContext(request_context_); | 261 url_fetcher_->SetRequestContext(request_context_); |
262 url_fetcher_->SetUploadData(content_type, post_data); | 262 url_fetcher_->SetUploadData(content_type, post_data); |
263 url_fetcher_->Start(); | 263 url_fetcher_->Start(); |
264 } | 264 } |
OLD | NEW |