| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ |
| 6 #define WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 int host_id, | 145 int host_id, |
| 146 int64 appcache_id) = 0; | 146 int64 appcache_id) = 0; |
| 147 virtual void MarkAsForeignEntry(int host_id, const GURL& document_url, | 147 virtual void MarkAsForeignEntry(int host_id, const GURL& document_url, |
| 148 int64 cache_document_was_loaded_from) = 0; | 148 int64 cache_document_was_loaded_from) = 0; |
| 149 virtual Status GetStatus(int host_id) = 0; | 149 virtual Status GetStatus(int host_id) = 0; |
| 150 virtual bool StartUpdate(int host_id) = 0; | 150 virtual bool StartUpdate(int host_id) = 0; |
| 151 virtual bool SwapCache(int host_id) = 0; | 151 virtual bool SwapCache(int host_id) = 0; |
| 152 virtual void GetResourceList( | 152 virtual void GetResourceList( |
| 153 int host_id, std::vector<AppCacheResourceInfo>* resource_infos) = 0; | 153 int host_id, std::vector<AppCacheResourceInfo>* resource_infos) = 0; |
| 154 | 154 |
| 155 protected: |
| 155 virtual ~AppCacheBackend() {} | 156 virtual ~AppCacheBackend() {} |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 // Useful string constants. | 159 // Useful string constants. |
| 159 // Note: These are also defined elsewhere in the chrome code base in | 160 // Note: These are also defined elsewhere in the chrome code base in |
| 160 // url_contants.h .cc, however the appcache library doesn't not have | 161 // url_contants.h .cc, however the appcache library doesn't not have |
| 161 // any dependencies on the chrome library, so we can't use them in here. | 162 // any dependencies on the chrome library, so we can't use them in here. |
| 162 extern const char kHttpScheme[]; | 163 extern const char kHttpScheme[]; |
| 163 extern const char kHttpsScheme[]; | 164 extern const char kHttpsScheme[]; |
| 164 extern const char kHttpGETMethod[]; | 165 extern const char kHttpGETMethod[]; |
| 165 extern const char kHttpHEADMethod[]; | 166 extern const char kHttpHEADMethod[]; |
| 166 | 167 |
| 167 bool IsSchemeSupported(const GURL& url); | 168 bool IsSchemeSupported(const GURL& url); |
| 168 bool IsMethodSupported(const std::string& method); | 169 bool IsMethodSupported(const std::string& method); |
| 169 bool IsSchemeAndMethodSupported(const net::URLRequest* request); | 170 bool IsSchemeAndMethodSupported(const net::URLRequest* request); |
| 170 | 171 |
| 171 APPCACHE_EXPORT extern const FilePath::CharType kAppCacheDatabaseName[]; | 172 APPCACHE_EXPORT extern const FilePath::CharType kAppCacheDatabaseName[]; |
| 172 | 173 |
| 173 } // namespace | 174 } // namespace |
| 174 | 175 |
| 175 #endif // WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ | 176 #endif // WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ |
| OLD | NEW |