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

Unified Diff: content/browser/net/url_request_insecure_interceptor.h

Issue 2445993006: [WIP] Upgrade-insecure-request: upgrade insecurely-redirected requests.
Patch Set: bugfix Created 4 years, 2 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/net/url_request_insecure_interceptor.h
diff --git a/content/browser/net/url_request_insecure_interceptor.h b/content/browser/net/url_request_insecure_interceptor.h
new file mode 100644
index 0000000000000000000000000000000000000000..662a1ed23f8061f608cb9c65ef5a5ff9c54ae868
--- /dev/null
+++ b/content/browser/net/url_request_insecure_interceptor.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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_BROWSER_NET_URL_REQUEST_INSECURE_INTERCEPTOR_H_
+#define CONTENT_BROWSER_NET_URL_REQUEST_INSECURE_INTERCEPTOR_H_
+
+#include "net/url_request/url_request_interceptor.h"
+
+namespace content {
+
+// An URLRequestInterceptor that upgrade insecure request during redirections.
+class URLRequestInsecureInterceptor : public net::URLRequestInterceptor {
+ public:
+ URLRequestInsecureInterceptor();
+ ~URLRequestInsecureInterceptor() override;
+
+ protected:
+ // Override from net::URLRequestInterceptor:
+ net::URLRequestJob* MaybeInterceptRequest(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const override;
+ net::URLRequestJob* MaybeInterceptResponse(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate) const override;
+ net::URLRequestJob* MaybeInterceptRedirect(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const GURL& location) const override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(URLRequestInsecureInterceptor);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_NET_URL_REQUEST_INTERCEPTOR_H_
« no previous file with comments | « content/browser/loader/resource_request_info_impl.cc ('k') | content/browser/net/url_request_insecure_interceptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698