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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/macros.h" |
12 #include "base/task_runner.h" | 13 #include "base/task_runner.h" |
13 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
14 #include "net/http/http_response_headers.h" | 15 #include "net/http/http_response_headers.h" |
15 #include "net/url_request/url_fetcher.h" | 16 #include "net/url_request/url_fetcher.h" |
16 #include "net/url_request/url_fetcher_delegate.h" | 17 #include "net/url_request/url_fetcher_delegate.h" |
17 #include "net/url_request/url_request_status.h" | 18 #include "net/url_request/url_request_status.h" |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 // Header sent on initial request to start the two phase upload process. | 22 // Header sent on initial request to start the two phase upload process. |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 const ProgressCallback& progress_callback, | 207 const ProgressCallback& progress_callback, |
207 const FinishCallback& finish_callback) { | 208 const FinishCallback& finish_callback) { |
208 if (!TwoPhaseUploader::factory_) | 209 if (!TwoPhaseUploader::factory_) |
209 return new TwoPhaseUploaderImpl( | 210 return new TwoPhaseUploaderImpl( |
210 url_request_context_getter, file_task_runner, base_url, metadata, | 211 url_request_context_getter, file_task_runner, base_url, metadata, |
211 file_path, progress_callback, finish_callback); | 212 file_path, progress_callback, finish_callback); |
212 return TwoPhaseUploader::factory_->CreateTwoPhaseUploader( | 213 return TwoPhaseUploader::factory_->CreateTwoPhaseUploader( |
213 url_request_context_getter, file_task_runner, base_url, metadata, | 214 url_request_context_getter, file_task_runner, base_url, metadata, |
214 file_path, progress_callback, finish_callback); | 215 file_path, progress_callback, finish_callback); |
215 } | 216 } |
OLD | NEW |