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

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

Issue 2467833002: Implement redirect handling on MojoAsyncResourceHandler (Closed)
Patch Set: fix Created 4 years, 1 month 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/mojo_async_resource_handler.h
diff --git a/content/browser/loader/mojo_async_resource_handler.h b/content/browser/loader/mojo_async_resource_handler.h
index 9edd9db10f9499b318448b24564ec34cf1e79250..2c25b135ae9ff2c3880af1ad8668eae43b616f67 100644
--- a/content/browser/loader/mojo_async_resource_handler.h
+++ b/content/browser/loader/mojo_async_resource_handler.h
@@ -33,9 +33,7 @@ struct ResourceResponse;
// load events from the resource dispatcher host. This class is used only
// when LoadingWithMojo runtime flag is enabled.
//
-// TODO(yhirano): Implement redirects.
// TODO(yhirano): Add histograms.
-// TODO(yhirano): Set zoom level.
// TODO(yhirano): Send cached metadata.
//
// This class can be inherited only for tests.
@@ -67,7 +65,7 @@ class CONTENT_EXPORT MojoAsyncResourceHandler
// mojom::URLLoader implementation
void FollowRedirect() override;
- void ResumeForTesting();
+ void OnWritableForTesting();
static void SetAllocationSizeForTesting(size_t size);
static constexpr size_t kDefaultAllocationSize = 512 * 1024;
@@ -89,8 +87,6 @@ class CONTENT_EXPORT MojoAsyncResourceHandler
bool AllocateWriterIOBuffer(scoped_refptr<net::IOBufferWithSize>* buf,
bool* defer);
- void Resume();
- void OnDefer();
bool CheckForSufficientResource();
void OnWritable(MojoResult result);
void Cancel();
@@ -101,7 +97,8 @@ class CONTENT_EXPORT MojoAsyncResourceHandler
bool has_checked_for_sufficient_resources_ = false;
bool sent_received_response_message_ = false;
bool is_using_io_buffer_not_from_writer_ = false;
- bool did_defer_ = false;
+ bool did_defer_on_writing_ = false;
+ bool did_defer_on_redirect_ = false;
base::TimeTicks response_started_ticks_;
int64_t reported_total_received_bytes_ = 0;

Powered by Google App Engine
This is Rietveld 408576698