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

Unified Diff: content/browser/appcache/appcache_url_request.h

Issue 2848493007: Reduce/Remove URLRequest dependencies from AppCacheRequestHandler (Closed)
Patch Set: Created 3 years, 8 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/appcache/appcache_url_request.h
diff --git a/content/browser/appcache/appcache_url_request.h b/content/browser/appcache/appcache_url_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..a14c93b2ce65ed3d46ee156626e06005fe63cc21
--- /dev/null
+++ b/content/browser/appcache/appcache_url_request.h
@@ -0,0 +1,48 @@
+// Copyright (c) 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_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_H_
+#define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_H_
+
+#include "content/browser/appcache/appcache_request.h"
+#include "content/common/content_export.h"
+
+namespace net {
+class URLRequest;
+} // namespace net
+
+namespace content {
+
+// AppCacheRequest wrapper for the URLRequest class.
+class CONTENT_EXPORT AppCacheURLRequest : public AppCacheRequest {
+ public:
+ // Factory function to create an instance of the AppCacheURLRequest class.
+ static AppCacheURLRequest* Create(net::URLRequest* url_request);
+
+ // AppCacheRequest overrides.
+ const GURL& GetURL() const override;
+ const std::string& GetMethod() const override;
+ const GURL& GetFirstPartyForCookies() const override;
+ const GURL GetReferrer() const override;
+ bool IsSuccess() const override;
+ bool IsCancelled() const override;
+ bool IsError() const override;
+ int GetResponseCode() const override;
+ std::string GetResponseHeaderByName(const std::string& name) const override;
+
+ net::URLRequest* GetURLRequest() const override;
+
+ protected:
+ AppCacheURLRequest(net::URLRequest* url_request);
+ virtual ~AppCacheURLRequest();
+
+ private:
+ net::URLRequest* url_request_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppCacheURLRequest);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698