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

Unified Diff: content/browser/loader/redirect_to_file_resource_handler.h

Issue 2654893002: Add unit tests for RedirectToFileResourceHandler. (Closed)
Patch Set: Remove old tests, update comment Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/redirect_to_file_resource_handler.h
diff --git a/content/browser/loader/redirect_to_file_resource_handler.h b/content/browser/loader/redirect_to_file_resource_handler.h
index 8163a4246feb88de98192ff304b151f4746d0064..bdd59e077304eaa587f9bf3c7dc99c23fdf09b12 100644
--- a/content/browser/loader/redirect_to_file_resource_handler.h
+++ b/content/browser/loader/redirect_to_file_resource_handler.h
@@ -40,6 +40,10 @@ namespace content {
class CONTENT_EXPORT RedirectToFileResourceHandler
: public LayeredResourceHandler {
public:
+ // Exposed for testing.
+ static const int kInitialReadBufSize;
+ static const int kMaxReadBufSize;
+
typedef base::Callback<void(const CreateTemporaryFileStreamCallback&)>
CreateTemporaryFileStreamFunction;
@@ -66,6 +70,9 @@ class CONTENT_EXPORT RedirectToFileResourceHandler
void OnResponseCompleted(const net::URLRequestStatus& status,
bool* defer) override;
+ // Returns the size of |buf_|, to make sure it's being increased as expected.
+ int GetBufferSizeForTesting() const;
+
private:
void DidCreateTemporaryFile(base::File::Error error_code,
std::unique_ptr<net::FileStream> file_stream,

Powered by Google App Engine
This is Rietveld 408576698