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 "webkit/tools/test_shell/simple_appcache_system.h" | 5 #include "webkit/tools/test_shell/simple_appcache_system.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/lock.h" | 8 #include "base/lock.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "base/waitable_event.h" | 10 #include "base/waitable_event.h" |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 URLRequest* request, int64* cache_id, GURL* manifest_url) { | 360 URLRequest* request, int64* cache_id, GURL* manifest_url) { |
361 if (is_initialized()) { | 361 if (is_initialized()) { |
362 DCHECK(is_io_thread()); | 362 DCHECK(is_io_thread()); |
363 AppCacheInterceptor::GetExtraResponseInfo( | 363 AppCacheInterceptor::GetExtraResponseInfo( |
364 request, cache_id, manifest_url); | 364 request, cache_id, manifest_url); |
365 } | 365 } |
366 } | 366 } |
367 | 367 |
368 void SimpleAppCacheSystem::WillDestroyCurrentMessageLoop() { | 368 void SimpleAppCacheSystem::WillDestroyCurrentMessageLoop() { |
369 DCHECK(is_io_thread()); | 369 DCHECK(is_io_thread()); |
370 DCHECK(backend_impl_->hosts().empty()); | |
371 | 370 |
372 delete backend_impl_; | 371 delete backend_impl_; |
373 delete service_; | 372 delete service_; |
374 backend_impl_ = NULL; | 373 backend_impl_ = NULL; |
375 service_ = NULL; | 374 service_ = NULL; |
376 io_message_loop_ = NULL; | 375 io_message_loop_ = NULL; |
377 | 376 |
378 // Just in case the main thread is waiting on it. | 377 // Just in case the main thread is waiting on it. |
379 backend_proxy_->SignalEvent(); | 378 backend_proxy_->SignalEvent(); |
380 } | 379 } |
OLD | NEW |