OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "content/public/browser/download_interrupt_reasons.h" | 18 #include "content/public/browser/download_interrupt_reasons.h" |
19 #include "content/public/browser/download_save_info.h" | 19 #include "content/public/browser/download_save_info.h" |
20 #include "content/public/common/referrer.h" | 20 #include "content/public/common/referrer.h" |
21 #include "net/url_request/url_request_context_getter.h" | 21 #include "net/url_request/url_request_context_getter.h" |
22 #include "storage/browser/blob/blob_data_handle.h" | 22 #include "storage/browser/blob/blob_data_handle.h" |
23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
24 | 24 |
25 namespace content { | 25 namespace content { |
26 | 26 |
27 class DownloadItem; | 27 class DownloadItem; |
28 class ResourceDispatcherHost; | |
29 class WebContents; | 28 class WebContents; |
30 | 29 |
31 // Pass an instance of DownloadUrlParameters to DownloadManager::DownloadUrl() | 30 // Pass an instance of DownloadUrlParameters to DownloadManager::DownloadUrl() |
32 // to download the content at |url|. All parameters with setters are optional. | 31 // to download the content at |url|. All parameters with setters are optional. |
33 // |referrer| and |referrer_encoding| are the referrer for the download. If | 32 // |referrer| and |referrer_encoding| are the referrer for the download. If |
34 // |prefer_cache| is true, then if the response to |url| is in the HTTP cache it | 33 // |prefer_cache| is true, then if the response to |url| is in the HTTP cache it |
35 // will be used without revalidation. If |post_id| is non-negative, then it | 34 // will be used without revalidation. If |post_id| is non-negative, then it |
36 // identifies the post transaction used to originally retrieve the |url| | 35 // identifies the post transaction used to originally retrieve the |url| |
37 // resource - it also requires |prefer_cache| to be |true| since re-post'ing is | 36 // resource - it also requires |prefer_cache| to be |true| since re-post'ing is |
38 // not done. |save_info| specifies where the downloaded file should be saved, | 37 // not done. |save_info| specifies where the downloaded file should be saved, |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 GURL url_; | 266 GURL url_; |
268 bool do_not_prompt_for_login_; | 267 bool do_not_prompt_for_login_; |
269 std::unique_ptr<storage::BlobDataHandle> blob_data_handle_; | 268 std::unique_ptr<storage::BlobDataHandle> blob_data_handle_; |
270 | 269 |
271 DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters); | 270 DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters); |
272 }; | 271 }; |
273 | 272 |
274 } // namespace content | 273 } // namespace content |
275 | 274 |
276 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_ | 275 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_ |
OLD | NEW |