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

Side by Side Diff: chrome/browser/safe_browsing/two_phase_uploader.cc

Issue 1870003002: Convert //chrome/browser/safe_browsing from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address comments Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/safe_browsing/two_phase_uploader.h" 5 #include "chrome/browser/safe_browsing/two_phase_uploader.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 State state_; 56 State state_;
57 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 57 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
58 scoped_refptr<base::TaskRunner> file_task_runner_; 58 scoped_refptr<base::TaskRunner> file_task_runner_;
59 GURL base_url_; 59 GURL base_url_;
60 GURL upload_url_; 60 GURL upload_url_;
61 std::string metadata_; 61 std::string metadata_;
62 const base::FilePath file_path_; 62 const base::FilePath file_path_;
63 ProgressCallback progress_callback_; 63 ProgressCallback progress_callback_;
64 FinishCallback finish_callback_; 64 FinishCallback finish_callback_;
65 65
66 scoped_ptr<net::URLFetcher> url_fetcher_; 66 std::unique_ptr<net::URLFetcher> url_fetcher_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(TwoPhaseUploaderImpl); 68 DISALLOW_COPY_AND_ASSIGN(TwoPhaseUploaderImpl);
69 }; 69 };
70 70
71 TwoPhaseUploaderImpl::TwoPhaseUploaderImpl( 71 TwoPhaseUploaderImpl::TwoPhaseUploaderImpl(
72 net::URLRequestContextGetter* url_request_context_getter, 72 net::URLRequestContextGetter* url_request_context_getter,
73 base::TaskRunner* file_task_runner, 73 base::TaskRunner* file_task_runner,
74 const GURL& base_url, 74 const GURL& base_url,
75 const std::string& metadata, 75 const std::string& metadata,
76 const base::FilePath& file_path, 76 const base::FilePath& file_path,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 const ProgressCallback& progress_callback, 207 const ProgressCallback& progress_callback,
208 const FinishCallback& finish_callback) { 208 const FinishCallback& finish_callback) {
209 if (!TwoPhaseUploader::factory_) 209 if (!TwoPhaseUploader::factory_)
210 return new TwoPhaseUploaderImpl( 210 return new TwoPhaseUploaderImpl(
211 url_request_context_getter, file_task_runner, base_url, metadata, 211 url_request_context_getter, file_task_runner, base_url, metadata,
212 file_path, progress_callback, finish_callback); 212 file_path, progress_callback, finish_callback);
213 return TwoPhaseUploader::factory_->CreateTwoPhaseUploader( 213 return TwoPhaseUploader::factory_->CreateTwoPhaseUploader(
214 url_request_context_getter, file_task_runner, base_url, metadata, 214 url_request_context_getter, file_task_runner, base_url, metadata,
215 file_path, progress_callback, finish_callback); 215 file_path, progress_callback, finish_callback);
216 } 216 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/two_phase_uploader.h ('k') | chrome/browser/safe_browsing/two_phase_uploader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698