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

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

Issue 10905284: Use the user's preferred downloads directory for creating the initial download file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows path check Created 8 years, 3 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_FILE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
7 7
8 #include "content/browser/download/download_file.h" 8 #include "content/browser/download/download_file.h"
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // The stream through which data comes. 77 // The stream through which data comes.
78 // TODO(rdsmith): Move this into BaseFile; requires using the same 78 // TODO(rdsmith): Move this into BaseFile; requires using the same
79 // stream semantics in SavePackage. Alternatively, replace SaveFile 79 // stream semantics in SavePackage. Alternatively, replace SaveFile
80 // with DownloadFile and get rid of BaseFile. 80 // with DownloadFile and get rid of BaseFile.
81 scoped_ptr<content::ByteStreamReader> stream_reader_; 81 scoped_ptr<content::ByteStreamReader> stream_reader_;
82 82
83 // The unique identifier for this download, assigned at creation by 83 // The unique identifier for this download, assigned at creation by
84 // the DownloadFileManager for its internal record keeping. 84 // the DownloadFileManager for its internal record keeping.
85 content::DownloadId id_; 85 content::DownloadId id_;
86 86
87 // The default directory for creating the download file.
88 FilePath default_download_directory_;
89
87 // Used to trigger progress updates. 90 // Used to trigger progress updates.
88 scoped_ptr<base::RepeatingTimer<DownloadFileImpl> > update_timer_; 91 scoped_ptr<base::RepeatingTimer<DownloadFileImpl> > update_timer_;
89 92
90 // The handle to the request information. Used for operations outside the 93 // The handle to the request information. Used for operations outside the
91 // download system, specifically canceling a download. 94 // download system, specifically canceling a download.
92 scoped_ptr<DownloadRequestHandleInterface> request_handle_; 95 scoped_ptr<DownloadRequestHandleInterface> request_handle_;
93 96
94 // DownloadManager this download belongs to. 97 // DownloadManager this download belongs to.
95 scoped_refptr<content::DownloadManager> download_manager_; 98 scoped_refptr<content::DownloadManager> download_manager_;
96 99
97 // Statistics 100 // Statistics
98 size_t bytes_seen_; 101 size_t bytes_seen_;
99 base::TimeDelta disk_writes_time_; 102 base::TimeDelta disk_writes_time_;
100 base::TimeTicks download_start_; 103 base::TimeTicks download_start_;
101 104
102 net::BoundNetLog bound_net_log_; 105 net::BoundNetLog bound_net_log_;
103 106
104 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; 107 base::WeakPtrFactory<DownloadFileImpl> weak_factory_;
105 108
106 // RAII handle to keep the system from sleeping while we're downloading. 109 // RAII handle to keep the system from sleeping while we're downloading.
107 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_; 110 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_;
108 111
109 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); 112 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl);
110 }; 113 };
111 114
112 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_create_info.h ('k') | content/browser/download/download_file_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698