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

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

Issue 2872943003: Reduce unnecessary download interruptions due to parallel requests (Closed)
Patch Set: more restrictions on DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE Created 3 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
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 #ifndef CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_JOB_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_JOB_H_
6 #define CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_JOB_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_JOB_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <vector> 10 #include <vector>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // slice. 49 // slice.
50 WorkerMap workers_; 50 WorkerMap workers_;
51 51
52 private: 52 private:
53 friend class ParallelDownloadJobTest; 53 friend class ParallelDownloadJobTest;
54 54
55 // DownloadWorker::Delegate implementation. 55 // DownloadWorker::Delegate implementation.
56 void OnByteStreamReady( 56 void OnByteStreamReady(
57 DownloadWorker* worker, 57 DownloadWorker* worker,
58 std::unique_ptr<ByteStreamReader> stream_reader) override; 58 std::unique_ptr<ByteStreamReader> stream_reader) override;
59 void OnServerResponseError(DownloadWorker* worker,
60 DownloadInterruptReason reason) override;
61 59
62 // Build parallel requests after a delay, to effectively measure the single 60 // Build parallel requests after a delay, to effectively measure the single
63 // stream bandwidth. 61 // stream bandwidth.
64 void BuildParallelRequestAfterDelay(); 62 void BuildParallelRequestAfterDelay();
65 63
66 // Build parallel requests to download. This function is the entry point for 64 // Build parallel requests to download. This function is the entry point for
67 // all parallel downloads. 65 // all parallel downloads.
68 void BuildParallelRequests(); 66 void BuildParallelRequests();
69 67
70 // Build one http request for each slice from the second slice. 68 // Build one http request for each slice from the second slice.
(...skipping 20 matching lines...) Expand all
91 89
92 // If the download progress is canceled. 90 // If the download progress is canceled.
93 bool is_canceled_; 91 bool is_canceled_;
94 92
95 DISALLOW_COPY_AND_ASSIGN(ParallelDownloadJob); 93 DISALLOW_COPY_AND_ASSIGN(ParallelDownloadJob);
96 }; 94 };
97 95
98 } // namespace content 96 } // namespace content
99 97
100 #endif // CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_JOB_H_ 98 #endif // CONTENT_BROWSER_DOWNLOAD_PARALLEL_DOWNLOAD_JOB_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_worker.cc ('k') | content/browser/download/parallel_download_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698