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

Unified 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: Don't leak details cross-origin 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 side-by-side diff with in-line comments
Download patch
Index: webkit/common/appcache/appcache_interfaces.h
diff --git a/webkit/common/appcache/appcache_interfaces.h b/webkit/common/appcache/appcache_interfaces.h
index b631728528af82271281c79b78572a06219b1e96..c99eb87f2ff87dde053423f4317b340d5f59e084 100644
--- a/webkit/common/appcache/appcache_interfaces.h
+++ b/webkit/common/appcache/appcache_interfaces.h
@@ -64,6 +64,18 @@ enum NamespaceType {
NETWORK_NAMESPACE
};
+enum ErrorReason {
+ MANIFEST_ERROR,
+ SIGNATURE_ERROR,
+ RESOURCE_ERROR,
+ CHANGED_ERROR,
+ ABORT_ERROR,
+ QUOTA_ERROR,
+ POLICY_ERROR,
+ UNKNOWN_ERROR,
+ ERROR_REASON_LAST = UNKNOWN_ERROR
+};
+
struct WEBKIT_STORAGE_COMMON_EXPORT AppCacheInfo {
AppCacheInfo();
~AppCacheInfo();
@@ -97,6 +109,22 @@ struct WEBKIT_STORAGE_COMMON_EXPORT AppCacheResourceInfo {
int64 response_id;
};
+struct WEBKIT_STORAGE_COMMON_EXPORT ErrorDetails {
+ ErrorDetails();
+ ErrorDetails(std::string message,
+ ErrorReason reason,
+ GURL url,
+ int status,
+ bool is_cross_origin);
+ ~ErrorDetails();
+
+ std::string message;
+ ErrorReason reason;
+ GURL url;
+ int status;
+ bool is_cross_origin;
+};
+
typedef std::vector<AppCacheResourceInfo> AppCacheResourceInfoVector;
struct WEBKIT_STORAGE_COMMON_EXPORT Namespace {
@@ -131,7 +159,7 @@ class WEBKIT_STORAGE_COMMON_EXPORT AppCacheFrontend {
const GURL& url,
int num_total, int num_complete) = 0;
virtual void OnErrorEventRaised(const std::vector<int>& host_ids,
- const std::string& message) = 0;
+ const appcache::ErrorDetails& details) = 0;
virtual void OnContentBlocked(int host_id,
const GURL& manifest_url) = 0;
virtual void OnLogMessage(int host_id, LogLevel log_level,

Powered by Google App Engine
This is Rietveld 408576698