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

Side by Side Diff: chrome/browser/tracing/crash_service_uploader.cc

Issue 1117703002: Adjust URLFetcher::Create API so that object is returned as scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded Pass() calls Created 5 years, 7 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
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | chrome/browser/ui/app_list/search/common/json_response_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698