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

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

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 (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 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 27 matching lines...) Expand all
38 virtual void CancelRequest() const = 0; 38 virtual void CancelRequest() const = 0;
39 39
40 // Describes the object. 40 // Describes the object.
41 virtual std::string DebugString() const = 0; 41 virtual std::string DebugString() const = 0;
42 }; 42 };
43 43
44 44
45 class CONTENT_EXPORT DownloadRequestHandle 45 class CONTENT_EXPORT DownloadRequestHandle
46 : public DownloadRequestHandleInterface { 46 : public DownloadRequestHandleInterface {
47 public: 47 public:
48 virtual ~DownloadRequestHandle(); 48 ~DownloadRequestHandle() override;
49 49
50 // Create a null DownloadRequestHandle: getters will return null, and 50 // Create a null DownloadRequestHandle: getters will return null, and
51 // all actions are no-ops. 51 // all actions are no-ops.
52 // TODO(rdsmith): Ideally, actions would be forbidden rather than 52 // TODO(rdsmith): Ideally, actions would be forbidden rather than
53 // no-ops, to confirm that no non-testing code actually uses 53 // no-ops, to confirm that no non-testing code actually uses
54 // a null DownloadRequestHandle. But for now, we need the no-op 54 // a null DownloadRequestHandle. But for now, we need the no-op
55 // behavior for unit tests. Long-term, this should be fixed by 55 // behavior for unit tests. Long-term, this should be fixed by
56 // allowing mocking of ResourceDispatcherHost in unit tests. 56 // allowing mocking of ResourceDispatcherHost in unit tests.
57 DownloadRequestHandle(); 57 DownloadRequestHandle();
58 58
59 // Note that |rdh| is required to be non-null. 59 // Note that |rdh| is required to be non-null.
60 DownloadRequestHandle(const base::WeakPtr<DownloadResourceHandler>& handler, 60 DownloadRequestHandle(const base::WeakPtr<DownloadResourceHandler>& handler,
61 int child_id, 61 int child_id,
62 int render_view_id, 62 int render_view_id,
63 int request_id); 63 int request_id);
64 64
65 // Implement DownloadRequestHandleInterface interface. 65 // Implement DownloadRequestHandleInterface interface.
66 virtual WebContents* GetWebContents() const override; 66 WebContents* GetWebContents() const override;
67 virtual DownloadManager* GetDownloadManager() const override; 67 DownloadManager* GetDownloadManager() const override;
68 virtual void PauseRequest() const override; 68 void PauseRequest() const override;
69 virtual void ResumeRequest() const override; 69 void ResumeRequest() const override;
70 virtual void CancelRequest() const override; 70 void CancelRequest() const override;
71 virtual std::string DebugString() const override; 71 std::string DebugString() const override;
72 72
73 private: 73 private:
74 base::WeakPtr<DownloadResourceHandler> handler_; 74 base::WeakPtr<DownloadResourceHandler> handler_;
75 75
76 // The ID of the child process that started the download. 76 // The ID of the child process that started the download.
77 int child_id_; 77 int child_id_;
78 78
79 // The ID of the render view that started the download. 79 // The ID of the render view that started the download.
80 int render_view_id_; 80 int render_view_id_;
81 81
82 // The ID associated with the request used for the download. 82 // The ID associated with the request used for the download.
83 int request_id_; 83 int request_id_;
84 }; 84 };
85 85
86 } // namespace content 86 } // namespace content
87 87
88 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_ 88 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_HANDLE_H_
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/browser/download/download_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698