OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 it != update_hosts_.end(); ++it) { | 236 it != update_hosts_.end(); ++it) { |
237 AppCacheHost* host = *it; | 237 AppCacheHost* host = *it; |
238 update_->StartUpdate(host, | 238 update_->StartUpdate(host, |
239 (host ? host->pending_master_entry_url() : GURL())); | 239 (host ? host->pending_master_entry_url() : GURL())); |
240 } | 240 } |
241 update_hosts_.clear(); // only trigger once | 241 update_hosts_.clear(); // only trigger once |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, | 245 virtual void OnErrorEventRaised(const std::vector<int>& host_ids, |
246 const std::string& message) OVERRIDE { | 246 const appcache::ErrorDetails& details) |
247 error_message_ = message; | 247 OVERRIDE { |
| 248 error_message_ = details.message; |
248 OnEventRaised(host_ids, ERROR_EVENT); | 249 OnEventRaised(host_ids, ERROR_EVENT); |
249 } | 250 } |
250 | 251 |
251 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, | 252 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, |
252 const GURL& url, | 253 const GURL& url, |
253 int num_total, | 254 int num_total, |
254 int num_complete) OVERRIDE { | 255 int num_complete) OVERRIDE { |
255 if (!ignore_progress_events_) | 256 if (!ignore_progress_events_) |
256 OnEventRaised(host_ids, PROGRESS_EVENT); | 257 OnEventRaised(host_ids, PROGRESS_EVENT); |
257 | 258 |
(...skipping 3425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3683 | 3684 |
3684 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) { | 3685 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsSuccess) { |
3685 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest); | 3686 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsSuccessTest); |
3686 } | 3687 } |
3687 | 3688 |
3688 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) { | 3689 TEST_F(AppCacheUpdateJobTest, CrossOriginHttpsDenied) { |
3689 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest); | 3690 RunTestOnIOThread(&AppCacheUpdateJobTest::CrossOriginHttpsDeniedTest); |
3690 } | 3691 } |
3691 | 3692 |
3692 } // namespace appcache | 3693 } // namespace appcache |
OLD | NEW |