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

Side by Side Diff: content/browser/download/download_file_impl.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 unified diff | Download patch
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 #include "content/browser/download/download_file_impl.h" 5 #include "content/browser/download/download_file_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 237 }
238 238
239 std::string DownloadFileImpl::GetHashState() { 239 std::string DownloadFileImpl::GetHashState() {
240 return file_.GetHashState(); 240 return file_.GetHashState();
241 } 241 }
242 242
243 void DownloadFileImpl::SetClientGuid(const std::string& guid) { 243 void DownloadFileImpl::SetClientGuid(const std::string& guid) {
244 file_.SetClientGuid(guid); 244 file_.SetClientGuid(guid);
245 } 245 }
246 246
247 void DownloadFileImpl::SetHideFileExtension(bool hide_extension) {
248 file_.set_hide_file_extension(hide_extension);
249 }
250
247 void DownloadFileImpl::StreamActive() { 251 void DownloadFileImpl::StreamActive() {
248 base::TimeTicks start(base::TimeTicks::Now()); 252 base::TimeTicks start(base::TimeTicks::Now());
249 base::TimeTicks now; 253 base::TimeTicks now;
250 scoped_refptr<net::IOBuffer> incoming_data; 254 scoped_refptr<net::IOBuffer> incoming_data;
251 size_t incoming_data_size = 0; 255 size_t incoming_data_size = 0;
252 size_t total_incoming_data_size = 0; 256 size_t total_incoming_data_size = 0;
253 size_t num_buffers = 0; 257 size_t num_buffers = 0;
254 ByteStreamReader::StreamState state(ByteStreamReader::STREAM_EMPTY); 258 ByteStreamReader::StreamState state(ByteStreamReader::STREAM_EMPTY);
255 DownloadInterruptReason reason = DOWNLOAD_INTERRUPT_REASON_NONE; 259 DownloadInterruptReason reason = DOWNLOAD_INTERRUPT_REASON_NONE;
256 base::TimeDelta delta( 260 base::TimeDelta delta(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 observer_, file_.bytes_so_far(), CurrentSpeed(), 356 observer_, file_.bytes_so_far(), CurrentSpeed(),
353 GetHashState())); 357 GetHashState()));
354 } 358 }
355 359
356 // static 360 // static
357 int DownloadFile::GetNumberOfDownloadFiles() { 361 int DownloadFile::GetNumberOfDownloadFiles() {
358 return number_active_objects_; 362 return number_active_objects_;
359 } 363 }
360 364
361 } // namespace content 365 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_file_impl.h ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698