OLD | NEW |
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_H_ |
7 | 7 |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // wasn't found, | 54 // wasn't found, |
55 virtual std::string GetResponseHeaderByName( | 55 virtual std::string GetResponseHeaderByName( |
56 const std::string& name) const = 0; | 56 const std::string& name) const = 0; |
57 | 57 |
58 // Returns true if the scheme and method are supported for AppCache. | 58 // Returns true if the scheme and method are supported for AppCache. |
59 static bool IsSchemeAndMethodSupportedForAppCache( | 59 static bool IsSchemeAndMethodSupportedForAppCache( |
60 const AppCacheRequest* request); | 60 const AppCacheRequest* request); |
61 | 61 |
62 protected: | 62 protected: |
63 friend class AppCacheRequestHandler; | 63 friend class AppCacheRequestHandler; |
| 64 // Enables the AppCacheJob to call GetURLRequest() and GetResourceRequest(). |
| 65 friend class AppCacheJob; |
64 | 66 |
65 AppCacheRequest() {} | 67 AppCacheRequest() {} |
66 | 68 |
67 // Getters for the request types we currently support. | 69 // Getters for the request types we currently support. |
68 virtual net::URLRequest* GetURLRequest(); | 70 virtual net::URLRequest* GetURLRequest(); |
69 | 71 |
70 // Returns the underlying ResourceRequest. Please note that only one of | 72 // Returns the underlying ResourceRequest. Please note that only one of |
71 // GetURLRequest() and GetResourceRequest() should return valid results. | 73 // GetURLRequest() and GetResourceRequest() should return valid results. |
72 virtual ResourceRequest* GetResourceRequest(); | 74 virtual ResourceRequest* GetResourceRequest(); |
73 | 75 |
74 DISALLOW_COPY_AND_ASSIGN(AppCacheRequest); | 76 DISALLOW_COPY_AND_ASSIGN(AppCacheRequest); |
75 }; | 77 }; |
76 | 78 |
77 } // namespace content | 79 } // namespace content |
78 | 80 |
79 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_H_ | 81 #endif // CONTENT_BROWSER_APPCACHE_APPCACHE_REQUEST_H_ |
OLD | NEW |