Chromium Code Reviews

Side by Side Diff: webkit/appcache/appcache_interfaces.h

Issue 205017: Check for supported schemes and methods. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_host.cc ('k') | webkit/appcache/appcache_interfaces.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <vector> 9 #include <vector>
9 #include "base/basictypes.h" 10 #include "base/basictypes.h"
10 11
11 class GURL; 12 class GURL;
13 class URLRequest;
12 14
13 namespace appcache { 15 namespace appcache {
14 16
15 // Defines constants, types, and abstract classes used in the main 17 // Defines constants, types, and abstract classes used in the main
16 // process and in child processes. 18 // process and in child processes.
17 19
18 static const int kNoHostId = 0; 20 static const int kNoHostId = 0;
19 static const int64 kNoCacheId = 0; 21 static const int64 kNoCacheId = 0;
20 static const int64 kUnknownCacheId = -1; 22 static const int64 kUnknownCacheId = -1;
21 23
(...skipping 41 matching lines...)
63 const GURL& manifest_url) = 0; 65 const GURL& manifest_url) = 0;
64 virtual void MarkAsForeignEntry(int host_id, const GURL& document_url, 66 virtual void MarkAsForeignEntry(int host_id, const GURL& document_url,
65 int64 cache_document_was_loaded_from) = 0; 67 int64 cache_document_was_loaded_from) = 0;
66 virtual Status GetStatus(int host_id) = 0; 68 virtual Status GetStatus(int host_id) = 0;
67 virtual bool StartUpdate(int host_id) = 0; 69 virtual bool StartUpdate(int host_id) = 0;
68 virtual bool SwapCache(int host_id) = 0; 70 virtual bool SwapCache(int host_id) = 0;
69 71
70 virtual ~AppCacheBackend() {} 72 virtual ~AppCacheBackend() {}
71 }; 73 };
72 74
75 // Useful string constants.
76 // Note: These are also defined elsewhere in the chrome code base in
77 // url_contants.h .cc, however the appcache library doesn't not have
78 // any dependencies on the chrome library, so we can't use them in here.
79 extern const char kHttpScheme[];
80 extern const char kHttpsScheme[];
81 extern const char kHttpGETMethod[];
82 extern const char kHttpHEADMethod[];
83
84 bool IsSchemeSupported(const GURL& url);
85 bool IsMethodSupported(const std::string& method);
86 bool IsSchemeAndMethodSupported(const URLRequest* request);
87
73 } // namespace 88 } // namespace
74 89
75 #endif // WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ 90 #endif // WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_host.cc ('k') | webkit/appcache/appcache_interfaces.cc » ('j') | no next file with comments »

Powered by Google App Engine