OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_REQUEST_H_ |
| 7 |
| 8 #include "content/browser/appcache/appcache_request.h" |
| 9 #include "content/common/content_export.h" |
| 10 |
| 11 namespace net { |
| 12 class URLRequest; |
| 13 } // namespace net |
| 14 |
| 15 namespace content { |
| 16 |
| 17 // AppCacheRequest wrapper for the URLRequest class. |
| 18 class CONTENT_EXPORT AppCacheURLRequest : public AppCacheRequest { |
| 19 public: |
| 20 // Factory function to create an instance of the AppCacheURLRequest class. |
| 21 static AppCacheURLRequest* Create(net::URLRequest* url_request); |
| 22 |
| 23 // AppCacheRequest overrides. |
| 24 const GURL& GetURL() const override; |
| 25 const std::string& GetMethod() const override; |
| 26 const GURL& GetFirstPartyForCookies() const override; |
| 27 const GURL GetReferrer() const override; |
| 28 bool IsSuccess() const override; |
| 29 bool IsCancelled() const override; |
| 30 bool IsError() const override; |
| 31 int GetResponseCode() const override; |
| 32 std::string GetResponseHeaderByName(const std::string& name) const override; |
| 33 |
| 34 net::URLRequest* GetURLRequest() const override; |
| 35 |
| 36 protected: |
| 37 AppCacheURLRequest(net::URLRequest* url_request); |
| 38 virtual ~AppCacheURLRequest(); |
| 39 |
| 40 private: |
| 41 net::URLRequest* url_request_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(AppCacheURLRequest); |
| 44 }; |
| 45 |
| 46 } // namespace content |
| 47 |
| 48 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_H_ |
OLD | NEW |