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

Unified Diff: content/child/appcache/appcache_frontend_impl.cc

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: content/child/appcache/appcache_frontend_impl.cc
diff --git a/content/child/appcache/appcache_frontend_impl.cc b/content/child/appcache/appcache_frontend_impl.cc
index d34be9b7c42d083414345de38e429dcdac11723c..6496f698c7b89961e1ca2ff9ed8eec63a845793a 100644
--- a/content/child/appcache/appcache_frontend_impl.cc
+++ b/content/child/appcache/appcache_frontend_impl.cc
@@ -60,13 +60,14 @@ void AppCacheFrontendImpl::OnProgressEventRaised(
}
}
-void AppCacheFrontendImpl::OnErrorEventRaised(const std::vector<int>& host_ids,
- const std::string& message) {
+void AppCacheFrontendImpl::OnErrorEventRaised(
+ const std::vector<int>& host_ids,
+ const appcache::ErrorDetails& details) {
for (std::vector<int>::const_iterator i = host_ids.begin();
i != host_ids.end(); ++i) {
WebApplicationCacheHostImpl* host = GetHost(*i);
if (host)
- host->OnErrorEventRaised(message);
+ host->OnErrorEventRaised(details);
}
}
@@ -99,6 +100,7 @@ COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReady ==
(int)appcache::UPDATE_READY, UpdateReady);
COMPILE_ASSERT((int)WebApplicationCacheHost::Obsolete ==
(int)appcache::OBSOLETE, Obsolete);
+
COMPILE_ASSERT((int)WebApplicationCacheHost::CheckingEvent ==
(int)appcache::CHECKING_EVENT, CheckingEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::ErrorEvent ==
@@ -115,6 +117,7 @@ COMPILE_ASSERT((int)WebApplicationCacheHost::CachedEvent ==
(int)appcache::CACHED_EVENT, CachedEvent);
COMPILE_ASSERT((int)WebApplicationCacheHost::ObsoleteEvent ==
(int)appcache::OBSOLETE_EVENT, ObsoleteEvent);
+
COMPILE_ASSERT((int)WebConsoleMessage::LevelDebug ==
(int)appcache::LOG_DEBUG, LevelDebug);
COMPILE_ASSERT((int)WebConsoleMessage::LevelLog ==
@@ -124,4 +127,29 @@ COMPILE_ASSERT((int)WebConsoleMessage::LevelWarning ==
COMPILE_ASSERT((int)WebConsoleMessage::LevelError ==
(int)appcache::LOG_ERROR, LevelError);
+COMPILE_ASSERT((int)WebApplicationCacheHost::ManifestError ==
+ (int)appcache::MANIFEST_ERROR,
+ ManifestError);
+COMPILE_ASSERT((int)WebApplicationCacheHost::SignatureError ==
+ (int)appcache::SIGNATURE_ERROR,
+ SignatureError);
+COMPILE_ASSERT((int)WebApplicationCacheHost::ResourceError ==
+ (int)appcache::RESOURCE_ERROR,
+ ResourceError);
+COMPILE_ASSERT((int)WebApplicationCacheHost::ChangedError ==
+ (int)appcache::CHANGED_ERROR,
+ ChangedError);
+COMPILE_ASSERT((int)WebApplicationCacheHost::AbortError ==
+ (int)appcache::ABORT_ERROR,
+ AbortError);
+COMPILE_ASSERT((int)WebApplicationCacheHost::QuotaError ==
+ (int)appcache::QUOTA_ERROR,
+ QuotaError);
+COMPILE_ASSERT((int)WebApplicationCacheHost::PolicyError ==
+ (int)appcache::POLICY_ERROR,
+ PolicyError);
+COMPILE_ASSERT((int)WebApplicationCacheHost::UnknownError ==
+ (int)appcache::UNKNOWN_ERROR,
+ UnknownError);
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698