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

Unified Diff: content/browser/download/base_file.cc

Issue 1513413002: Enable "Hide Extension" option when "Save Link As" on the Mac Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits. Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/base_file.h ('k') | content/browser/download/base_file_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/base_file.cc
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index f9b80155018d4a00aa2a6df90bcb32b3666c2672..0ce0e10aeabd6adef5ea1181ba09a900adc73e00 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -41,7 +41,8 @@ BaseFile::BaseFile(const base::FilePath& full_path,
start_tick_(base::TimeTicks::Now()),
calculate_hash_(calculate_hash),
detached_(false),
- bound_net_log_(bound_net_log) {
+ bound_net_log_(bound_net_log),
+ hide_file_extension_(false) {
memcpy(sha256_hash_, kEmptySha256Hash, crypto::kSHA256Length);
if (calculate_hash_) {
secure_hash_.reset(crypto::SecureHash::Create(crypto::SecureHash::SHA256));
@@ -251,6 +252,10 @@ std::string BaseFile::DebugString() const {
detached_ ? 'T' : 'F');
}
+void BaseFile::set_hide_file_extension(bool hide_file_extension) {
+ hide_file_extension_ = hide_file_extension;
+}
+
DownloadInterruptReason BaseFile::Open() {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(!detached_);
« no previous file with comments | « content/browser/download/base_file.h ('k') | content/browser/download/base_file_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698