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

Unified Diff: content/public/child/url_loader_throttle.h

Issue 2914423002: Network service: move URLLoaderThrottle and ThrottlingURLLoader. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « content/public/child/BUILD.gn ('k') | content/public/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/child/url_loader_throttle.h
diff --git a/content/public/child/url_loader_throttle.h b/content/public/child/url_loader_throttle.h
deleted file mode 100644
index e72a4ff253b0391b91e68b6a7c01b9620f4a6933..0000000000000000000000000000000000000000
--- a/content/public/child/url_loader_throttle.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_PUBLIC_RENDERER_URL_LOADER_THROTTLE_H_
-#define CONTENT_PUBLIC_RENDERER_URL_LOADER_THROTTLE_H_
-
-#include "content/common/content_export.h"
-#include "content/public/common/resource_type.h"
-
-class GURL;
-
-namespace net {
-struct RedirectInfo;
-}
-
-namespace content {
-
-// A URLLoaderThrottle gets notified at various points during the process of
-// loading a resource. At each stage, it has the opportunity to defer the
-// resource load.
-class CONTENT_EXPORT URLLoaderThrottle {
- public:
- // An interface for the throttle implementation to resume (when deferred) or
- // cancel the resource load.
- class CONTENT_EXPORT Delegate {
- public:
- // Cancels the resource load with the specified error code.
- virtual void CancelWithError(int error_code) = 0;
-
- // Resumes the deferred resource load. It is a no-op if the resource load is
- // not deferred or has already been canceled.
- virtual void Resume() = 0;
-
- protected:
- virtual ~Delegate() {}
- };
-
- virtual ~URLLoaderThrottle() {}
-
- // Called before the resource request is started.
- virtual void WillStartRequest(const GURL& url,
- int load_flags,
- ResourceType resource_type,
- bool* defer) {}
-
- // Called when the request was redirected. |redirect_info| contains the
- // redirect responses's HTTP status code and some information about the new
- // request that will be sent if the redirect is followed, including the new
- // URL and new method.
- virtual void WillRedirectRequest(const net::RedirectInfo& redirect_info,
- bool* defer) {}
-
- // Called when the response headers and meta data are available.
- virtual void WillProcessResponse(bool* defer) {}
-
- void set_delegate(Delegate* delegate) { delegate_ = delegate; }
-
- protected:
- URLLoaderThrottle() = default;
-
- Delegate* delegate_ = nullptr;
-};
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_RENDERER_URL_LOADER_THROTTLE_H_
« no previous file with comments | « content/public/child/BUILD.gn ('k') | content/public/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698