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. | |
kinuko
2017/05/03 01:28:21
... for the cases that uses URLLoader.
?
Could y
ananta
2017/05/03 01:34:00
Done.
ananta
2017/05/03 01:34:00
Done.
| |
14 class CONTENT_EXPORT AppCacheURLLoader : public AppCacheRequest { | |
15 public: | |
16 // Factory function to create an instance of the AppCacheResourceRequest | |
17 // class. | |
18 static AppCacheURLLoader* Create(const ResourceRequest& request); | |
19 | |
20 // AppCacheRequest overrides. | |
21 // TODO(ananta) | |
22 // Add support to the GetURL() call to return the updated URL while following | |
23 // a chain of redirects. | |
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 // TODO(ananta) | |
29 // ResourceRequest only identifies the request unlike URLRequest which | |
30 // contains response information as well. We need the following methods to | |
31 // work for AppCache. Look into this. | |
32 bool IsSuccess() const override; | |
33 bool IsCancelled() const override; | |
34 bool IsError() const override; | |
35 int GetResponseCode() const override; | |
36 std::string GetResponseHeaderByName(const std::string& name) const override; | |
37 | |
38 ResourceRequest* GetResourceRequest() override; | |
39 | |
40 protected: | |
41 AppCacheURLLoader(const ResourceRequest& request); | |
kinuko
2017/05/03 01:28:21
nit: explicit
ananta
2017/05/03 01:34:00
Done.
ananta
2017/05/03 01:34:01
Done.
| |
42 ~AppCacheURLLoader() override; | |
43 | |
44 private: | |
45 ResourceRequest request_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(AppCacheURLLoader); | |
48 }; | |
49 | |
50 } // namespace content | |
51 | |
52 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_URL_LOADER_H_ | |
OLD | NEW |