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

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

Issue 8404049: Added member data to classes to support download resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rearranged structures for greater consistency. Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.
Randy Smith (Not in Mondays) 2011/11/22 17:37:49 I think it makes sense to have a comment here some
ahendrickson 2011/11/22 23:46:44 Done.
15 struct CONTENT_EXPORT DownloadSaveInfo { 15 struct CONTENT_EXPORT DownloadSaveInfo {
16 DownloadSaveInfo(); 16 DownloadSaveInfo();
17 DownloadSaveInfo(const DownloadSaveInfo& info); 17 DownloadSaveInfo(const DownloadSaveInfo& info);
18 ~DownloadSaveInfo(); 18 ~DownloadSaveInfo();
19 DownloadSaveInfo& operator=(const DownloadSaveInfo& info); 19 DownloadSaveInfo& operator=(const DownloadSaveInfo& info);
20 20
21 // This is usually the tentative final name, but not during resumption.
Randy Smith (Not in Mondays) 2011/11/22 17:37:49 nit: Specify what it is during resumption.
ahendrickson 2011/11/22 23:46:44 Done.
21 FilePath file_path; 22 FilePath file_path;
23
22 linked_ptr<net::FileStream> file_stream; 24 linked_ptr<net::FileStream> file_stream;
25
23 string16 suggested_name; 26 string16 suggested_name;
27
28 // The file offset at which to start the download. May be 0.
29 size_t offset;
30
31 // The state of the hash at the start of the download. May be empty.
32 std::string hash_state;
24 }; 33 };
25 34
26 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_ 35 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698