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

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

Issue 2660723002: ResourceHandler::OnWillStart: Remove min_size argument. (Closed)
Patch Set: Merge Created 3 years, 10 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
« no previous file with comments | « no previous file | content/browser/download/download_request_core.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_REQUEST_CORE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bool OnResponseStarted(const std::string& override_mime_type); 63 bool OnResponseStarted(const std::string& override_mime_type);
64 64
65 // Should be called to handle a redirect. The caller should only allow the 65 // Should be called to handle a redirect. The caller should only allow the
66 // redirect to be followed if the return value is true. 66 // redirect to be followed if the return value is true.
67 bool OnRequestRedirected(); 67 bool OnRequestRedirected();
68 68
69 // Starts a read cycle. Creates a new IOBuffer which can be passed into 69 // Starts a read cycle. Creates a new IOBuffer which can be passed into
70 // URLRequest::Read(). Call OnReadCompleted() when the Read operation 70 // URLRequest::Read(). Call OnReadCompleted() when the Read operation
71 // completes. 71 // completes.
72 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf, 72 bool OnWillRead(scoped_refptr<net::IOBuffer>* buf,
73 int* buf_size, 73 int* buf_size);
74 int min_size);
75 74
76 // Used to notify DownloadRequestCore that the caller is about to abort the 75 // Used to notify DownloadRequestCore that the caller is about to abort the
77 // outer request. |reason| will be used as the final interrupt reason when 76 // outer request. |reason| will be used as the final interrupt reason when
78 // OnResponseCompleted() is called. 77 // OnResponseCompleted() is called.
79 void OnWillAbort(DownloadInterruptReason reason); 78 void OnWillAbort(DownloadInterruptReason reason);
80 79
81 // Should be called when the Read() operation completes. |defer| will be set 80 // Should be called when the Read() operation completes. |defer| will be set
82 // to true if reading is to be suspended. In the latter case, once more data 81 // to true if reading is to be suspended. In the latter case, once more data
83 // can be read, invokes the |on_ready_to_read_callback|. 82 // can be read, invokes the |on_ready_to_read_callback|.
84 bool OnReadCompleted(int bytes_read, bool* defer); 83 bool OnReadCompleted(int bytes_read, bool* defer);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 164
166 // Each successful OnWillRead will yield a buffer of this size. 165 // Each successful OnWillRead will yield a buffer of this size.
167 static const int kReadBufSize = 32768; // bytes 166 static const int kReadBufSize = 32768; // bytes
168 167
169 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore); 168 DISALLOW_COPY_AND_ASSIGN(DownloadRequestCore);
170 }; 169 };
171 170
172 } // namespace content 171 } // namespace content
173 172
174 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_ 173 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_CORE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_request_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698