| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/callback.h" | 5 #include "base/callback.h" |
| 6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
| 7 #include "net/url_request/url_request.h" | 7 #include "net/url_request/url_request.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "webkit/appcache/appcache.h" | 9 #include "webkit/appcache/appcache.h" |
| 10 #include "webkit/appcache/appcache_backend_impl.h" | 10 #include "webkit/appcache/appcache_backend_impl.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 appcache::EventID event_id) { | 50 appcache::EventID event_id) { |
| 51 last_event_id_ = event_id; | 51 last_event_id_ = event_id; |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, | 54 virtual void OnProgressEventRaised(const std::vector<int>& host_ids, |
| 55 const GURL& url, | 55 const GURL& url, |
| 56 int num_total, int num_complete) { | 56 int num_total, int num_complete) { |
| 57 last_event_id_ = PROGRESS_EVENT; | 57 last_event_id_ = PROGRESS_EVENT; |
| 58 } | 58 } |
| 59 | 59 |
| 60 virtual void OnLogMessage(int host_id, appcache::LogLevel log_level, |
| 61 const std::string& message) { |
| 62 } |
| 63 |
| 60 virtual void OnContentBlocked(int host_id) { | 64 virtual void OnContentBlocked(int host_id) { |
| 61 } | 65 } |
| 62 | 66 |
| 63 int last_host_id_; | 67 int last_host_id_; |
| 64 int64 last_cache_id_; | 68 int64 last_cache_id_; |
| 65 appcache::Status last_status_; | 69 appcache::Status last_status_; |
| 66 appcache::Status last_status_changed_; | 70 appcache::Status last_status_changed_; |
| 67 appcache::EventID last_event_id_; | 71 appcache::EventID last_event_id_; |
| 68 }; | 72 }; |
| 69 | 73 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 342 |
| 339 // Simulate the parent being torn down. | 343 // Simulate the parent being torn down. |
| 340 backend_impl.UnregisterHost(kParentHostId); | 344 backend_impl.UnregisterHost(kParentHostId); |
| 341 parent_host = NULL; | 345 parent_host = NULL; |
| 342 EXPECT_EQ(NULL, backend_impl.GetHost(kParentHostId)); | 346 EXPECT_EQ(NULL, backend_impl.GetHost(kParentHostId)); |
| 343 EXPECT_EQ(NULL, worker_host->GetParentAppCacheHost()); | 347 EXPECT_EQ(NULL, worker_host->GetParentAppCacheHost()); |
| 344 } | 348 } |
| 345 | 349 |
| 346 } // namespace appcache | 350 } // namespace appcache |
| 347 | 351 |
| OLD | NEW |