| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |