| OLD | NEW |
| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(const std::vector<int>& host_ids, |
| 64 const std::string& message) { | 64 const std::string& message, |
| 65 const std::string& reason, |
| 66 const GURL& url, |
| 67 int status) { |
| 65 for (std::vector<int>::const_iterator i = host_ids.begin(); | 68 for (std::vector<int>::const_iterator i = host_ids.begin(); |
| 66 i != host_ids.end(); ++i) { | 69 i != host_ids.end(); ++i) { |
| 67 WebApplicationCacheHostImpl* host = GetHost(*i); | 70 WebApplicationCacheHostImpl* host = GetHost(*i); |
| 68 if (host) | 71 if (host) |
| 69 host->OnErrorEventRaised(message); | 72 host->OnErrorEventRaised(message, reason, url, status); |
| 70 } | 73 } |
| 71 } | 74 } |
| 72 | 75 |
| 73 void AppCacheFrontendImpl::OnLogMessage(int host_id, | 76 void AppCacheFrontendImpl::OnLogMessage(int host_id, |
| 74 appcache::LogLevel log_level, | 77 appcache::LogLevel log_level, |
| 75 const std::string& message) { | 78 const std::string& message) { |
| 76 WebApplicationCacheHostImpl* host = GetHost(host_id); | 79 WebApplicationCacheHostImpl* host = GetHost(host_id); |
| 77 if (host) | 80 if (host) |
| 78 host->OnLogMessage(log_level, message); | 81 host->OnLogMessage(log_level, message); |
| 79 } | 82 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 127 } // namespace content | 130 } // namespace content |
| OLD | NEW |