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

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

Issue 15011006: Remove DownloadItem::GetUserVerifiedFilePath() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with r201294 Created 7 years, 7 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 // Each download is represented by a DownloadItem, and all DownloadItems 5 // Each download is represented by a DownloadItem, and all DownloadItems
6 // are owned by the DownloadManager which maintains a global list of all 6 // are owned by the DownloadManager which maintains a global list of all
7 // downloads. DownloadItems are created when a user initiates a download, 7 // downloads. DownloadItems are created when a user initiates a download,
8 // and exist for the duration of the browser life time. 8 // and exist for the duration of the browser life time.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Target path of an in-progress download. We may be downloading to a 215 // Target path of an in-progress download. We may be downloading to a
216 // temporary or intermediate file (specified by GetFullPath()); this is the 216 // temporary or intermediate file (specified by GetFullPath()); this is the
217 // name we will use once the download completes. 217 // name we will use once the download completes.
218 // May be empty if the target path hasn't yet been determined. 218 // May be empty if the target path hasn't yet been determined.
219 virtual const base::FilePath& GetTargetFilePath() const = 0; 219 virtual const base::FilePath& GetTargetFilePath() const = 0;
220 220
221 // If the download forced a path rather than requesting name determination, 221 // If the download forced a path rather than requesting name determination,
222 // return the path requested. 222 // return the path requested.
223 virtual const base::FilePath& GetForcedFilePath() const = 0; 223 virtual const base::FilePath& GetForcedFilePath() const = 0;
224 224
225 // Returns the user-verified target file path for the download.
226 // This returns the same path as GetTargetFilePath() for safe downloads
227 // but does not for dangerous downloads until the name is verified.
228 virtual base::FilePath GetUserVerifiedFilePath() const = 0;
229
230 // Returns the file-name that should be reported to the user. If a display 225 // Returns the file-name that should be reported to the user. If a display
231 // name has been explicitly set using SetDisplayName(), this function returns 226 // name has been explicitly set using SetDisplayName(), this function returns
232 // that display name. Otherwise returns the final target filename. 227 // that display name. Otherwise returns the final target filename.
233 virtual base::FilePath GetFileNameToReportUser() const = 0; 228 virtual base::FilePath GetFileNameToReportUser() const = 0;
234 229
235 virtual TargetDisposition GetTargetDisposition() const = 0; 230 virtual TargetDisposition GetTargetDisposition() const = 0;
236 231
237 // Final hash of completely downloaded file; not valid if 232 // Final hash of completely downloaded file; not valid if
238 // GetState() != COMPLETED. 233 // GetState() != COMPLETED.
239 virtual const std::string& GetHash() const = 0; 234 virtual const std::string& GetHash() const = 0;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // return |name|. Has no effect on the final target filename. 320 // return |name|. Has no effect on the final target filename.
326 virtual void SetDisplayName(const base::FilePath& name) = 0; 321 virtual void SetDisplayName(const base::FilePath& name) = 0;
327 322
328 // Debug/testing ------------------------------------------------------------- 323 // Debug/testing -------------------------------------------------------------
329 virtual std::string DebugString(bool verbose) const = 0; 324 virtual std::string DebugString(bool verbose) const = 0;
330 }; 325 };
331 326
332 } // namespace content 327 } // namespace content
333 328
334 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_ 329 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_ITEM_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/public/test/mock_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698