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

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

Issue 2752603002: Propagate server response error and interrupt the download. (Closed)
Patch Set: Created 3 years, 9 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_DOWNLOAD_JOB_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 23 matching lines...) Expand all
34 34
35 // Return the WebContents associated with the download. Usually used to 35 // Return the WebContents associated with the download. Usually used to
36 // associate a browser window for any UI that needs to be displayed to the 36 // associate a browser window for any UI that needs to be displayed to the
37 // user. 37 // user.
38 // Or return nullptr if the download is not associated with an active 38 // Or return nullptr if the download is not associated with an active
39 // WebContents. 39 // WebContents.
40 virtual WebContents* GetWebContents() const = 0; 40 virtual WebContents* GetWebContents() const = 0;
41 41
42 protected: 42 protected:
43 void StartDownload() const; 43 void StartDownload() const;
44 void Interrupt(DownloadInterruptReason reason);
44 45
45 DownloadItemImpl* download_item_; 46 DownloadItemImpl* download_item_;
46 47
47 private: 48 private:
48 // If the download progress is paused by the user. 49 // If the download progress is paused by the user.
49 bool is_paused_; 50 bool is_paused_;
50 51
51 DISALLOW_COPY_AND_ASSIGN(DownloadJob); 52 DISALLOW_COPY_AND_ASSIGN(DownloadJob);
52 }; 53 };
53 54
54 } // namespace content 55 } // namespace content
55 56
56 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_ 57 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_JOB_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_job.cc » ('j') | content/browser/download/download_worker.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698