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

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

Issue 2526983002: Refactor ResourceHandler API. (Closed)
Patch Set: Response to comments 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/navigation_resource_handler.h
diff --git a/content/browser/loader/navigation_resource_handler.h b/content/browser/loader/navigation_resource_handler.h
index 9608807d665690a5c3b12787de94530152a8c7f4..8b143819f17001802da0662a7aa4a92ea0537c68 100644
--- a/content/browser/loader/navigation_resource_handler.h
+++ b/content/browser/loader/navigation_resource_handler.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_
#define CONTENT_BROWSER_LOADER_NAVIGATION_RESOURCE_HANDLER_H_
+#include <memory>
+
#include "base/macros.h"
#include "content/browser/loader/resource_handler.h"
#include "content/browser/loader/stream_writer.h"
@@ -15,6 +17,7 @@ class SSLInfo;
namespace content {
class NavigationURLLoaderImplCore;
+class ResourceController;
class ResourceDispatcherHostDelegate;
struct SSLStatus;
@@ -42,18 +45,23 @@ class NavigationResourceHandler : public ResourceHandler {
void ProceedWithResponse();
// ResourceHandler implementation.
- void SetController(ResourceController* controller) override;
- bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
- ResourceResponse* response,
- bool* defer) override;
- bool OnResponseStarted(ResourceResponse* response, bool* defer) override;
- bool OnWillStart(const GURL& url, bool* defer) override;
+ void OnRequestRedirected(
+ const net::RedirectInfo& redirect_info,
+ ResourceResponse* response,
+ std::unique_ptr<ResourceController> controller) override;
+ void OnResponseStarted(
+ ResourceResponse* response,
+ std::unique_ptr<ResourceController> controller) override;
+ void OnWillStart(const GURL& url,
+ std::unique_ptr<ResourceController> controller) override;
bool OnWillRead(scoped_refptr<net::IOBuffer>* buf,
int* buf_size,
int min_size) override;
- bool OnReadCompleted(int bytes_read, bool* defer) override;
- void OnResponseCompleted(const net::URLRequestStatus& status,
- bool* defer) override;
+ void OnReadCompleted(int bytes_read,
+ std::unique_ptr<ResourceController> controller) override;
+ void OnResponseCompleted(
+ const net::URLRequestStatus& status,
+ std::unique_ptr<ResourceController> controller) override;
void OnDataDownloaded(int bytes_downloaded) override;
private:
« no previous file with comments | « content/browser/loader/mojo_async_resource_handler_unittest.cc ('k') | content/browser/loader/navigation_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698