diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 02:31:55 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 02:31:55 +0000 |
commit | 097dde28cb2f5967871351232406ebb7ec317ad3 (patch) | |
tree | b935d8d1a54c4dcfb0c9e06b89436af70359190e /chrome/common/appcache | |
parent | 42061043c5f2186fb42fa9bef37c3ae3115e2fd3 (diff) | |
download | chromium_src-097dde28cb2f5967871351232406ebb7ec317ad3.zip chromium_src-097dde28cb2f5967871351232406ebb7ec317ad3.tar.gz chromium_src-097dde28cb2f5967871351232406ebb7ec317ad3.tar.bz2 |
New javascript console logging related to the appcache.
* Log an error message when an update job results in an error.
* Log info messages for progress events and other update status changed events.
* Consistently use "Application Cache" in the console messages.
TEST=existing unit tests apply for functional correctness, manual testing to see the new console output
BUG=none
Review URL: http://codereview.chromium.org/2910007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52270 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/appcache')
-rw-r--r-- | chrome/common/appcache/appcache_dispatcher.cc | 7 | ||||
-rw-r--r-- | chrome/common/appcache/appcache_dispatcher.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/chrome/common/appcache/appcache_dispatcher.cc b/chrome/common/appcache/appcache_dispatcher.cc index ff44f92..6cf40cc 100644 --- a/chrome/common/appcache/appcache_dispatcher.cc +++ b/chrome/common/appcache/appcache_dispatcher.cc @@ -14,6 +14,7 @@ bool AppCacheDispatcher::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(AppCacheMsg_StatusChanged, OnStatusChanged) IPC_MESSAGE_HANDLER(AppCacheMsg_EventRaised, OnEventRaised) IPC_MESSAGE_HANDLER(AppCacheMsg_ProgressEventRaised, OnProgressEventRaised) + IPC_MESSAGE_HANDLER(AppCacheMsg_ErrorEventRaised, OnErrorEventRaised) IPC_MESSAGE_HANDLER(AppCacheMsg_LogMessage, OnLogMessage) IPC_MESSAGE_HANDLER(AppCacheMsg_ContentBlocked, OnContentBlocked) IPC_MESSAGE_UNHANDLED(handled = false) @@ -42,6 +43,12 @@ void AppCacheDispatcher::OnProgressEventRaised( frontend_impl_.OnProgressEventRaised(host_ids, url, num_total, num_complete); } +void AppCacheDispatcher::OnErrorEventRaised( + const std::vector<int>& host_ids, + const std::string& message) { + frontend_impl_.OnErrorEventRaised(host_ids, message); +} + void AppCacheDispatcher::OnLogMessage( int host_id, int log_level, const std::string& message) { frontend_impl_.OnLogMessage( diff --git a/chrome/common/appcache/appcache_dispatcher.h b/chrome/common/appcache/appcache_dispatcher.h index 393e281..d21be54 100644 --- a/chrome/common/appcache/appcache_dispatcher.h +++ b/chrome/common/appcache/appcache_dispatcher.h @@ -33,6 +33,8 @@ class AppCacheDispatcher { appcache::EventID event_id); void OnProgressEventRaised(const std::vector<int>& host_ids, const GURL& url, int num_total, int num_complete); + void OnErrorEventRaised(const std::vector<int>& host_ids, + const std::string& message); void OnLogMessage(int host_id, int log_level, const std::string& message); void OnContentBlocked(int host_id, const GURL& manifest_url); |