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

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

Issue 10578055: Rewrite guts of ResourceLoader and BufferedResourceHandler to suck less. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_RESOURCE_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_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 const GURL& url, 64 const GURL& url,
65 bool* defer) OVERRIDE; 65 bool* defer) OVERRIDE;
66 66
67 // Create a new buffer, which will be handed to the download thread for file 67 // Create a new buffer, which will be handed to the download thread for file
68 // writing and deletion. 68 // writing and deletion.
69 virtual bool OnWillRead(int request_id, 69 virtual bool OnWillRead(int request_id,
70 net::IOBuffer** buf, 70 net::IOBuffer** buf,
71 int* buf_size, 71 int* buf_size,
72 int min_size) OVERRIDE; 72 int min_size) OVERRIDE;
73 73
74 virtual bool OnReadCompleted(int request_id, int* bytes_read, 74 virtual bool OnReadCompleted(int request_id, int bytes_read,
75 bool* defer) OVERRIDE; 75 bool* defer) OVERRIDE;
76 76
77 virtual bool OnResponseCompleted(int request_id, 77 virtual bool OnResponseCompleted(int request_id,
78 const net::URLRequestStatus& status, 78 const net::URLRequestStatus& status,
79 const std::string& security_info) OVERRIDE; 79 const std::string& security_info) OVERRIDE;
80 80
81 void PauseRequest(); 81 void PauseRequest();
82 void ResumeRequest(); 82 void ResumeRequest();
83 void CancelRequest(); 83 void CancelRequest();
84 84
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // For DCHECKing 128 // For DCHECKing
129 bool on_response_started_called_; 129 bool on_response_started_called_;
130 130
131 static const int kReadBufSize = 32768; // bytes 131 static const int kReadBufSize = 32768; // bytes
132 static const int kThrottleTimeMs = 200; // milliseconds 132 static const int kThrottleTimeMs = 200; // milliseconds
133 133
134 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler); 134 DISALLOW_COPY_AND_ASSIGN(DownloadResourceHandler);
135 }; 135 };
136 136
137 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_ 137 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_RESOURCE_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698