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

Side by Side Diff: content/public/browser/download_save_info.h

Issue 11028131: Shift passage of FileStream in downloads system to be by scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Al's comments. Created 8 years, 2 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_PUBLIC_BROWSER_DOWNLOAD_SAVE_INFO_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_SAVE_INFO_H_
6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_SAVE_INFO_H_ 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_SAVE_INFO_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/memory/linked_ptr.h" 9 #include "base/memory/linked_ptr.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 12 matching lines...) Expand all
23 // If non-empty, contains the full target path of the download that has been 23 // If non-empty, contains the full target path of the download that has been
24 // determined prior to download initiation. This is considered to be a trusted 24 // determined prior to download initiation. This is considered to be a trusted
25 // path. 25 // path.
26 FilePath file_path; 26 FilePath file_path;
27 27
28 // If non-empty, contains an untrusted filename suggestion. This can't contain 28 // If non-empty, contains an untrusted filename suggestion. This can't contain
29 // a path (only a filename), and is only effective if |file_path| is empty. 29 // a path (only a filename), and is only effective if |file_path| is empty.
30 string16 suggested_name; 30 string16 suggested_name;
31 31
32 // If non-NULL, contains the source data stream for the file contents. 32 // If non-NULL, contains the source data stream for the file contents.
33 linked_ptr<net::FileStream> file_stream; 33 scoped_ptr<net::FileStream> file_stream;
34 34
35 // The file offset at which to start the download. May be 0. 35 // The file offset at which to start the download. May be 0.
36 int64 offset; 36 int64 offset;
37 37
38 // The state of the hash at the start of the download. May be empty. 38 // The state of the hash at the start of the download. May be empty.
39 std::string hash_state; 39 std::string hash_state;
40 40
41 // If |prompt_for_save_location| is true, and |file_path| is empty, then 41 // If |prompt_for_save_location| is true, and |file_path| is empty, then
42 // the user will be prompted for a location to save the download. Otherwise, 42 // the user will be prompted for a location to save the download. Otherwise,
43 // the location will be determined automatically using |file_path| as a 43 // the location will be determined automatically using |file_path| as a
44 // basis if |file_path| is not empty. 44 // basis if |file_path| is not empty.
45 // |prompt_for_save_location| defaults to false. 45 // |prompt_for_save_location| defaults to false.
46 bool prompt_for_save_location; 46 bool prompt_for_save_location;
47
48 private:
49 DISALLOW_COPY_AND_ASSIGN(DownloadSaveInfo);
47 }; 50 };
48 51
49 } // namespace content 52 } // namespace content
50 53
51 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_SAVE_INFO_H_ 54 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_SAVE_INFO_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_drag_source_mac.mm ('k') | content/public/browser/download_url_parameters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698