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

Side by Side Diff: chrome/browser/renderer_host/download_resource_handler.h

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Set the content length to 0 to indicate unknown size to DownloadManager. 64 // Set the content length to 0 to indicate unknown size to DownloadManager.
65 void set_content_length(const int64& content_length); 65 void set_content_length(const int64& content_length);
66 66
67 void set_content_disposition(const std::string& content_disposition); 67 void set_content_disposition(const std::string& content_disposition);
68 68
69 void CheckWriteProgress(); 69 void CheckWriteProgress();
70 70
71 std::string DebugString() const; 71 std::string DebugString() const;
72 72
73 private: 73 private:
74 ~DownloadResourceHandler(); 74 virtual ~DownloadResourceHandler();
75 75
76 void StartPauseTimer(); 76 void StartPauseTimer();
77 77
78 int download_id_; 78 int download_id_;
79 GlobalRequestID global_id_; 79 GlobalRequestID global_id_;
80 int render_view_id_; 80 int render_view_id_;
81 scoped_refptr<net::IOBuffer> read_buffer_; 81 scoped_refptr<net::IOBuffer> read_buffer_;
82 std::string content_disposition_; 82 std::string content_disposition_;
83 int64 content_length_; 83 int64 content_length_;
84 DownloadFileManager* download_file_manager_; 84 DownloadFileManager* download_file_manager_;
85 net::URLRequest* request_; 85 net::URLRequest* request_;
86 bool save_as_; // Request was initiated via "Save As" by the user. 86 bool save_as_; // Request was initiated via "Save As" by the user.
87 DownloadSaveInfo save_info_; 87 DownloadSaveInfo save_info_;
88 scoped_ptr<DownloadBuffer> buffer_; 88 scoped_ptr<DownloadBuffer> buffer_;
89 ResourceDispatcherHost* rdh_; 89 ResourceDispatcherHost* rdh_;
90 bool is_paused_; 90 bool is_paused_;
91 base::OneShotTimer<DownloadResourceHandler> pause_timer_; 91 base::OneShotTimer<DownloadResourceHandler> pause_timer_;
92 base::TimeTicks download_start_time_; // used to collect stats. 92 base::TimeTicks download_start_time_; // used to collect stats.
93 static const int kReadBufSize = 32768; // bytes 93 static const int kReadBufSize = 32768; // bytes
94 static const size_t kLoadsToWrite = 100; // number of data buffers queued 94 static const size_t kLoadsToWrite = 100; // number of data buffers queued
95 static const int kThrottleTimeMs = 200; // milliseconds 95 static const int kThrottleTimeMs = 200; // milliseconds
96 96
97 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); 97 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler);
98 }; 98 };
99 99
100 #endif // CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_ 100 #endif // CHROME_BROWSER_RENDERER_HOST_DOWNLOAD_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/renderer_host/render_widget_host_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698