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

Side by Side Diff: content/browser/download/download_job.cc

Issue 2823273004: Add new UMA stats for parallelizable download (Closed)
Patch Set: addressing comments Created 3 years, 8 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_job.h" 5 #include "content/browser/download/download_job.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "content/browser/download/download_file.h" 8 #include "content/browser/download/download_file.h"
9 #include "content/browser/download/download_item_impl.h" 9 #include "content/browser/download/download_item_impl.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 DCHECK_CURRENTLY_ON(BrowserThread::UI); 55 DCHECK_CURRENTLY_ON(BrowserThread::UI);
56 DownloadFile* download_file = download_item_->download_file_.get(); 56 DownloadFile* download_file = download_item_->download_file_.get();
57 if (download_file) { 57 if (download_file) {
58 BrowserThread::PostTask( 58 BrowserThread::PostTask(
59 BrowserThread::FILE, FROM_HERE, 59 BrowserThread::FILE, FROM_HERE,
60 base::Bind(&DownloadFile::SetPotentialFileLength, 60 base::Bind(&DownloadFile::SetPotentialFileLength,
61 base::Unretained(download_file), length)); 61 base::Unretained(download_file), length));
62 } 62 }
63 } 63 }
64 64
65 bool DownloadJob::UsesParallelRequests() const {
66 return false;
67 }
68
69 void DownloadJob::CancelRequestWithOffset(int64_t offset) {} 65 void DownloadJob::CancelRequestWithOffset(int64_t offset) {}
70 66
67 bool DownloadJob::IsParallelizable() const {
68 return false;
69 }
70
71 } // namespace content 71 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698