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

Side by Side 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: Restore failed_resource_url Created 6 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "content/child/appcache/appcache_frontend_impl.h" 5 #include "content/child/appcache/appcache_frontend_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/child/appcache/web_application_cache_host_impl.h" 8 #include "content/child/appcache/web_application_cache_host_impl.h"
9 #include "third_party/WebKit/public/web/WebConsoleMessage.h" 9 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 int num_total, 53 int num_total,
54 int num_complete) { 54 int num_complete) {
55 for (std::vector<int>::const_iterator i = host_ids.begin(); 55 for (std::vector<int>::const_iterator i = host_ids.begin();
56 i != host_ids.end(); ++i) { 56 i != host_ids.end(); ++i) {
57 WebApplicationCacheHostImpl* host = GetHost(*i); 57 WebApplicationCacheHostImpl* host = GetHost(*i);
58 if (host) 58 if (host)
59 host->OnProgressEventRaised(url, num_total, num_complete); 59 host->OnProgressEventRaised(url, num_total, num_complete);
60 } 60 }
61 } 61 }
62 62
63 void AppCacheFrontendImpl::OnErrorEventRaised(const std::vector<int>& host_ids, 63 void AppCacheFrontendImpl::OnErrorEventRaised(
64 const std::string& message) { 64 const std::vector<int>& host_ids,
65 const appcache::ErrorDetails& details) {
65 for (std::vector<int>::const_iterator i = host_ids.begin(); 66 for (std::vector<int>::const_iterator i = host_ids.begin();
66 i != host_ids.end(); ++i) { 67 i != host_ids.end(); ++i) {
67 WebApplicationCacheHostImpl* host = GetHost(*i); 68 WebApplicationCacheHostImpl* host = GetHost(*i);
68 if (host) 69 if (host)
69 host->OnErrorEventRaised(message); 70 host->OnErrorEventRaised(details);
70 } 71 }
71 } 72 }
72 73
73 void AppCacheFrontendImpl::OnLogMessage(int host_id, 74 void AppCacheFrontendImpl::OnLogMessage(int host_id,
74 appcache::LogLevel log_level, 75 appcache::LogLevel log_level,
75 const std::string& message) { 76 const std::string& message) {
76 WebApplicationCacheHostImpl* host = GetHost(host_id); 77 WebApplicationCacheHostImpl* host = GetHost(host_id);
77 if (host) 78 if (host)
78 host->OnLogMessage(log_level, message); 79 host->OnLogMessage(log_level, message);
79 } 80 }
(...skipping 12 matching lines...) Expand all
92 COMPILE_ASSERT((int)WebApplicationCacheHost::Idle == 93 COMPILE_ASSERT((int)WebApplicationCacheHost::Idle ==
93 (int)appcache::IDLE, Idle); 94 (int)appcache::IDLE, Idle);
94 COMPILE_ASSERT((int)WebApplicationCacheHost::Checking == 95 COMPILE_ASSERT((int)WebApplicationCacheHost::Checking ==
95 (int)appcache::CHECKING, Checking); 96 (int)appcache::CHECKING, Checking);
96 COMPILE_ASSERT((int)WebApplicationCacheHost::Downloading == 97 COMPILE_ASSERT((int)WebApplicationCacheHost::Downloading ==
97 (int)appcache::DOWNLOADING, Downloading); 98 (int)appcache::DOWNLOADING, Downloading);
98 COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReady == 99 COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReady ==
99 (int)appcache::UPDATE_READY, UpdateReady); 100 (int)appcache::UPDATE_READY, UpdateReady);
100 COMPILE_ASSERT((int)WebApplicationCacheHost::Obsolete == 101 COMPILE_ASSERT((int)WebApplicationCacheHost::Obsolete ==
101 (int)appcache::OBSOLETE, Obsolete); 102 (int)appcache::OBSOLETE, Obsolete);
103
102 COMPILE_ASSERT((int)WebApplicationCacheHost::CheckingEvent == 104 COMPILE_ASSERT((int)WebApplicationCacheHost::CheckingEvent ==
103 (int)appcache::CHECKING_EVENT, CheckingEvent); 105 (int)appcache::CHECKING_EVENT, CheckingEvent);
104 COMPILE_ASSERT((int)WebApplicationCacheHost::ErrorEvent == 106 COMPILE_ASSERT((int)WebApplicationCacheHost::ErrorEvent ==
105 (int)appcache::ERROR_EVENT, ErrorEvent); 107 (int)appcache::ERROR_EVENT, ErrorEvent);
106 COMPILE_ASSERT((int)WebApplicationCacheHost::NoUpdateEvent == 108 COMPILE_ASSERT((int)WebApplicationCacheHost::NoUpdateEvent ==
107 (int)appcache::NO_UPDATE_EVENT, NoUpdateEvent); 109 (int)appcache::NO_UPDATE_EVENT, NoUpdateEvent);
108 COMPILE_ASSERT((int)WebApplicationCacheHost::DownloadingEvent == 110 COMPILE_ASSERT((int)WebApplicationCacheHost::DownloadingEvent ==
109 (int)appcache::DOWNLOADING_EVENT, DownloadingEvent); 111 (int)appcache::DOWNLOADING_EVENT, DownloadingEvent);
110 COMPILE_ASSERT((int)WebApplicationCacheHost::ProgressEvent == 112 COMPILE_ASSERT((int)WebApplicationCacheHost::ProgressEvent ==
111 (int)appcache::PROGRESS_EVENT, ProgressEvent); 113 (int)appcache::PROGRESS_EVENT, ProgressEvent);
112 COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReadyEvent == 114 COMPILE_ASSERT((int)WebApplicationCacheHost::UpdateReadyEvent ==
113 (int)appcache::UPDATE_READY_EVENT, UpdateReadyEvent); 115 (int)appcache::UPDATE_READY_EVENT, UpdateReadyEvent);
114 COMPILE_ASSERT((int)WebApplicationCacheHost::CachedEvent == 116 COMPILE_ASSERT((int)WebApplicationCacheHost::CachedEvent ==
115 (int)appcache::CACHED_EVENT, CachedEvent); 117 (int)appcache::CACHED_EVENT, CachedEvent);
116 COMPILE_ASSERT((int)WebApplicationCacheHost::ObsoleteEvent == 118 COMPILE_ASSERT((int)WebApplicationCacheHost::ObsoleteEvent ==
117 (int)appcache::OBSOLETE_EVENT, ObsoleteEvent); 119 (int)appcache::OBSOLETE_EVENT, ObsoleteEvent);
120
118 COMPILE_ASSERT((int)WebConsoleMessage::LevelDebug == 121 COMPILE_ASSERT((int)WebConsoleMessage::LevelDebug ==
119 (int)appcache::LOG_DEBUG, LevelDebug); 122 (int)appcache::LOG_DEBUG, LevelDebug);
120 COMPILE_ASSERT((int)WebConsoleMessage::LevelLog == 123 COMPILE_ASSERT((int)WebConsoleMessage::LevelLog ==
121 (int)appcache::LOG_INFO, LevelLog); 124 (int)appcache::LOG_INFO, LevelLog);
122 COMPILE_ASSERT((int)WebConsoleMessage::LevelWarning == 125 COMPILE_ASSERT((int)WebConsoleMessage::LevelWarning ==
123 (int)appcache::LOG_WARNING, LevelWarning); 126 (int)appcache::LOG_WARNING, LevelWarning);
124 COMPILE_ASSERT((int)WebConsoleMessage::LevelError == 127 COMPILE_ASSERT((int)WebConsoleMessage::LevelError ==
125 (int)appcache::LOG_ERROR, LevelError); 128 (int)appcache::LOG_ERROR, LevelError);
126 129
130 COMPILE_ASSERT((int)WebApplicationCacheHost::ManifestError ==
131 (int)appcache::MANIFEST_ERROR,
132 ManifestError);
133 COMPILE_ASSERT((int)WebApplicationCacheHost::SignatureError ==
134 (int)appcache::SIGNATURE_ERROR,
135 SignatureError);
136 COMPILE_ASSERT((int)WebApplicationCacheHost::ResourceError ==
137 (int)appcache::RESOURCE_ERROR,
138 ResourceError);
139 COMPILE_ASSERT((int)WebApplicationCacheHost::ChangedError ==
140 (int)appcache::CHANGED_ERROR,
141 ChangedError);
142 COMPILE_ASSERT((int)WebApplicationCacheHost::AbortError ==
143 (int)appcache::ABORT_ERROR,
144 AbortError);
145 COMPILE_ASSERT((int)WebApplicationCacheHost::QuotaError ==
146 (int)appcache::QUOTA_ERROR,
147 QuotaError);
148 COMPILE_ASSERT((int)WebApplicationCacheHost::PolicyError ==
149 (int)appcache::POLICY_ERROR,
150 PolicyError);
151 COMPILE_ASSERT((int)WebApplicationCacheHost::UnknownError ==
152 (int)appcache::UNKNOWN_ERROR,
153 UnknownError);
154
127 } // namespace content 155 } // namespace content
OLDNEW
« no previous file with comments | « content/child/appcache/appcache_frontend_impl.h ('k') | content/child/appcache/web_application_cache_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698