Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1434)

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

Issue 164933002: Expose details for appcache error events [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make reason an enum Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMMON_APPCACHE_APPCACHE_INTERFACES_H_ 5 #ifndef WEBKIT_COMMON_APPCACHE_APPCACHE_INTERFACES_H_
6 #define WEBKIT_COMMON_APPCACHE_APPCACHE_INTERFACES_H_ 6 #define WEBKIT_COMMON_APPCACHE_APPCACHE_INTERFACES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 LOG_WARNING = 2, 57 LOG_WARNING = 2,
58 LOG_ERROR = 3, 58 LOG_ERROR = 3,
59 }; 59 };
60 60
61 enum NamespaceType { 61 enum NamespaceType {
62 FALLBACK_NAMESPACE, 62 FALLBACK_NAMESPACE,
63 INTERCEPT_NAMESPACE, 63 INTERCEPT_NAMESPACE,
64 NETWORK_NAMESPACE 64 NETWORK_NAMESPACE
65 }; 65 };
66 66
67 enum ErrorReason {
68 ERROR_MANIFEST_FETCH,
69 ERROR_MANIFEST_INVALID,
70 ERROR_MANIFEST_CHANGED,
71 ERROR_MANIFEST_OBSOLETE,
72 ERROR_RESOURCE_FETCH,
73 ERROR_QUOTA_EXCEEDED,
74 ERROR_POLICY,
75 ERROR_INTERNAL,
76 ERROR_LAST = ERROR_INTERNAL
michaeln 2014/02/27 23:16:06 I'm looking at this set of Reasons and comparing t
jsbell 2014/02/28 22:46:00 Agreed, see discussion under ERROR_RESOURCE_FETCH
77 };
78
67 struct WEBKIT_STORAGE_COMMON_EXPORT AppCacheInfo { 79 struct WEBKIT_STORAGE_COMMON_EXPORT AppCacheInfo {
68 AppCacheInfo(); 80 AppCacheInfo();
69 ~AppCacheInfo(); 81 ~AppCacheInfo();
70 82
71 GURL manifest_url; 83 GURL manifest_url;
72 base::Time creation_time; 84 base::Time creation_time;
73 base::Time last_update_time; 85 base::Time last_update_time;
74 base::Time last_access_time; 86 base::Time last_access_time;
75 int64 cache_id; 87 int64 cache_id;
76 int64 group_id; 88 int64 group_id;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 virtual void OnCacheSelected( 136 virtual void OnCacheSelected(
125 int host_id, const appcache::AppCacheInfo& info) = 0; 137 int host_id, const appcache::AppCacheInfo& info) = 0;
126 virtual void OnStatusChanged(const std::vector<int>& host_ids, 138 virtual void OnStatusChanged(const std::vector<int>& host_ids,
127 Status status) = 0; 139 Status status) = 0;
128 virtual void OnEventRaised(const std::vector<int>& host_ids, 140 virtual void OnEventRaised(const std::vector<int>& host_ids,
129 EventID event_id) = 0; 141 EventID event_id) = 0;
130 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, 142 virtual void OnProgressEventRaised(const std::vector<int>& host_ids,
131 const GURL& url, 143 const GURL& url,
132 int num_total, int num_complete) = 0; 144 int num_total, int num_complete) = 0;
133 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, 145 virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
134 const std::string& message) = 0; 146 const std::string& message,
147 appcache::ErrorReason reason,
148 const GURL& url,
149 int status) = 0;
135 virtual void OnContentBlocked(int host_id, 150 virtual void OnContentBlocked(int host_id,
136 const GURL& manifest_url) = 0; 151 const GURL& manifest_url) = 0;
137 virtual void OnLogMessage(int host_id, LogLevel log_level, 152 virtual void OnLogMessage(int host_id, LogLevel log_level,
138 const std::string& message) = 0; 153 const std::string& message) = 0;
139 virtual ~AppCacheFrontend() {} 154 virtual ~AppCacheFrontend() {}
140 }; 155 };
141 156
142 // Interface used by frontend (renderer) to talk to backend (browser-process). 157 // Interface used by frontend (renderer) to talk to backend (browser-process).
143 class WEBKIT_STORAGE_COMMON_EXPORT AppCacheBackend { 158 class WEBKIT_STORAGE_COMMON_EXPORT AppCacheBackend {
144 public: 159 public:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 WEBKIT_STORAGE_COMMON_EXPORT bool IsMethodSupported(const std::string& method); 199 WEBKIT_STORAGE_COMMON_EXPORT bool IsMethodSupported(const std::string& method);
185 WEBKIT_STORAGE_COMMON_EXPORT bool IsSchemeAndMethodSupported( 200 WEBKIT_STORAGE_COMMON_EXPORT bool IsSchemeAndMethodSupported(
186 const net::URLRequest* request); 201 const net::URLRequest* request);
187 202
188 WEBKIT_STORAGE_COMMON_EXPORT extern const base::FilePath::CharType 203 WEBKIT_STORAGE_COMMON_EXPORT extern const base::FilePath::CharType
189 kAppCacheDatabaseName[]; 204 kAppCacheDatabaseName[];
190 205
191 } // namespace 206 } // namespace
192 207
193 #endif // WEBKIT_COMMON_APPCACHE_APPCACHE_INTERFACES_H_ 208 #endif // WEBKIT_COMMON_APPCACHE_APPCACHE_INTERFACES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698