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

Side by Side Diff: content/browser/download/download_types.h

Issue 9351024: Clean up unused members and constructors from DownloadCreateInfo and DownloadSaveInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
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_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/memory/linked_ptr.h" 10 #include "base/memory/linked_ptr.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "net/base/file_stream.h" 12 #include "net/base/file_stream.h"
13 13
14 // Holds the information about how to save a download file. 14 // Holds the information about how to save a download file.
15 // In the case of download continuation, |file_path| is set to the current file 15 // In the case of download continuation, |file_path| is set to the current file
16 // name, |offset| is set to the point where we left off, and |hash_state| will 16 // name, |offset| is set to the point where we left off, and |hash_state| will
17 // hold the state of the hash algorithm where we left off. 17 // hold the state of the hash algorithm where we left off.
18 struct CONTENT_EXPORT DownloadSaveInfo { 18 struct CONTENT_EXPORT DownloadSaveInfo {
19 DownloadSaveInfo(); 19 DownloadSaveInfo();
20 ~DownloadSaveInfo(); 20 ~DownloadSaveInfo();
21 21
22 // This is usually the tentative final name, but not during resumption 22 // If non-empty, contains the full target path of the download that has been
23 // where it will be the intermediate file name. 23 // determined prior to download initiation. This is considered to be a trusted
24 // path.
24 FilePath file_path; 25 FilePath file_path;
25 26
27 // If non-empty, contains an untrusted filename suggestion. This can't contain
28 // a path (only a filename), and is only effective if |file_path| is empty.
Randy Smith (Not in Mondays) 2012/02/08 18:53:54 Thank you for improving these comments.
29 string16 suggested_name;
30
31 // If non-NULL, contains the source data stream for the file contents.
26 linked_ptr<net::FileStream> file_stream; 32 linked_ptr<net::FileStream> file_stream;
27 33
28 string16 suggested_name;
29
30 // The file offset at which to start the download. May be 0. 34 // The file offset at which to start the download. May be 0.
31 int64 offset; 35 int64 offset;
32 36
33 // The state of the hash at the start of the download. May be empty. 37 // The state of the hash at the start of the download. May be empty.
34 std::string hash_state; 38 std::string hash_state;
35 39
36 // If |prompt_for_save_location| is true, and |file_path| is empty, then 40 // If |prompt_for_save_location| is true, and |file_path| is empty, then
37 // the user will be prompted for a location to save the download. Otherwise, 41 // the user will be prompted for a location to save the download. Otherwise,
38 // the location will be determined automatically using |file_path| as a 42 // the location will be determined automatically using |file_path| as a
39 // basis if |file_path| is not empty. 43 // basis if |file_path| is not empty.
40 // |prompt_for_save_location| defaults to false. 44 // |prompt_for_save_location| defaults to false.
41 bool prompt_for_save_location; 45 bool prompt_for_save_location;
42 }; 46 };
43 47
44 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_ 48 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698