| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 118 } |
| 119 RequestHeadersType::const_iterator request_headers_begin() const { | 119 RequestHeadersType::const_iterator request_headers_begin() const { |
| 120 return request_headers_.begin(); | 120 return request_headers_.begin(); |
| 121 } | 121 } |
| 122 RequestHeadersType::const_iterator request_headers_end() const { | 122 RequestHeadersType::const_iterator request_headers_end() const { |
| 123 return request_headers_.end(); | 123 return request_headers_.end(); |
| 124 } | 124 } |
| 125 content::ResourceContext* resource_context() const { | 125 content::ResourceContext* resource_context() const { |
| 126 return resource_context_; | 126 return resource_context_; |
| 127 } | 127 } |
| 128 ResourceDispatcherHost* resource_dispatcher_host() const { | |
| 129 return resource_dispatcher_host_; | |
| 130 } | |
| 131 const base::FilePath& file_path() const { return save_info_.file_path; } | 128 const base::FilePath& file_path() const { return save_info_.file_path; } |
| 132 const string16& suggested_name() const { return save_info_.suggested_name; } | 129 const string16& suggested_name() const { return save_info_.suggested_name; } |
| 133 int64 offset() const { return save_info_.offset; } | 130 int64 offset() const { return save_info_.offset; } |
| 134 const std::string& hash_state() const { return save_info_.hash_state; } | 131 const std::string& hash_state() const { return save_info_.hash_state; } |
| 135 bool prompt() const { return save_info_.prompt_for_save_location; } | 132 bool prompt() const { return save_info_.prompt_for_save_location; } |
| 136 const GURL& url() const { return url_; } | 133 const GURL& url() const { return url_; } |
| 137 | 134 |
| 138 // Note that this is state changing--the DownloadUrlParameters object | 135 // Note that this is state changing--the DownloadUrlParameters object |
| 139 // will not have a file_stream attached to it after this call. | 136 // will not have a file_stream attached to it after this call. |
| 140 scoped_ptr<net::FileStream> GetFileStream() { | 137 scoped_ptr<net::FileStream> GetFileStream() { |
| 141 return save_info_.file_stream.Pass(); | 138 return save_info_.file_stream.Pass(); |
| 142 } | 139 } |
| 143 | 140 |
| 144 private: | 141 private: |
| 145 OnStartedCallback callback_; | 142 OnStartedCallback callback_; |
| 146 bool content_initiated_; | 143 bool content_initiated_; |
| 147 RequestHeadersType request_headers_; | 144 RequestHeadersType request_headers_; |
| 148 int load_flags_; | 145 int load_flags_; |
| 149 std::string last_modified_; | 146 std::string last_modified_; |
| 150 std::string etag_; | 147 std::string etag_; |
| 151 std::string method_; | 148 std::string method_; |
| 152 std::string post_body_; | 149 std::string post_body_; |
| 153 int64 post_id_; | 150 int64 post_id_; |
| 154 bool prefer_cache_; | 151 bool prefer_cache_; |
| 155 Referrer referrer_; | 152 Referrer referrer_; |
| 156 std::string referrer_encoding_; | 153 std::string referrer_encoding_; |
| 157 int render_process_host_id_; | 154 int render_process_host_id_; |
| 158 int render_view_host_routing_id_; | 155 int render_view_host_routing_id_; |
| 159 ResourceContext* resource_context_; | 156 ResourceContext* resource_context_; |
| 160 ResourceDispatcherHost* resource_dispatcher_host_; | |
| 161 DownloadSaveInfo save_info_; | 157 DownloadSaveInfo save_info_; |
| 162 GURL url_; | 158 GURL url_; |
| 163 | 159 |
| 164 DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters); | 160 DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters); |
| 165 }; | 161 }; |
| 166 | 162 |
| 167 } // namespace content | 163 } // namespace content |
| 168 | 164 |
| 169 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_ | 165 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_URL_PARAMETERS_H_ |
| OLD | NEW |