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_LOADER_H_ | |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_H_ | |
7 | |
8 #include "content/browser/appcache/appcache_request.h" | |
9 #include "content/common/resource_request.h" | |
10 | |
11 namespace content { | |
12 | |
13 // AppCacheRequest wrapper for the ResourceRequest class for users of | |
14 // URLLoader. | |
15 class CONTENT_EXPORT AppCacheURLLoader : public AppCacheRequest { | |
michaeln
2017/05/03 02:32:12
Sorry for the naming nit, but this isn't the 'load
jam
2017/05/03 03:54:45
My suggestion was because one subclass is implemen
| |
16 public: | |
17 // Factory function to create an instance of the AppCacheResourceRequest | |
18 // class. | |
19 static AppCacheURLLoader* Create(const ResourceRequest& request); | |
20 | |
21 // AppCacheRequest overrides. | |
22 // TODO(ananta) | |
23 // Add support to the GetURL() call to return the updated URL while following | |
24 // a chain of redirects. | |
25 const GURL& GetURL() const override; | |
26 const std::string& GetMethod() const override; | |
27 const GURL& GetFirstPartyForCookies() const override; | |
28 const GURL GetReferrer() const override; | |
29 // TODO(ananta) | |
30 // ResourceRequest only identifies the request unlike URLRequest which | |
31 // contains response information as well. We need the following methods to | |
32 // work for AppCache. Look into this. | |
33 bool IsSuccess() const override; | |
34 bool IsCancelled() const override; | |
35 bool IsError() const override; | |
36 int GetResponseCode() const override; | |
37 std::string GetResponseHeaderByName(const std::string& name) const override; | |
38 | |
39 ResourceRequest* GetResourceRequest() override; | |
40 | |
41 protected: | |
42 explicit AppCacheURLLoader(const ResourceRequest& request); | |
43 ~AppCacheURLLoader() override; | |
44 | |
45 private: | |
46 ResourceRequest request_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(AppCacheURLLoader); | |
49 }; | |
50 | |
51 } // namespace content | |
52 | |
53 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_H_ | |
OLD | NEW |