OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/appcache/appcache_service.h" | 5 #include "webkit/appcache/appcache_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 service_->DeleteAppCacheGroup(manifest_url_, net::CompletionCallback()); | 460 service_->DeleteAppCacheGroup(manifest_url_, net::CompletionCallback()); |
461 delete this; | 461 delete this; |
462 } | 462 } |
463 | 463 |
464 | 464 |
465 // AppCacheService ------- | 465 // AppCacheService ------- |
466 | 466 |
467 AppCacheService::AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy) | 467 AppCacheService::AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy) |
468 : appcache_policy_(NULL), quota_client_(NULL), | 468 : appcache_policy_(NULL), quota_client_(NULL), |
469 quota_manager_proxy_(quota_manager_proxy), | 469 quota_manager_proxy_(quota_manager_proxy), |
470 request_context_(NULL), clear_local_state_on_exit_(false) { | 470 request_context_(NULL), clear_local_state_on_exit_(false), |
| 471 save_session_state_(false) { |
471 if (quota_manager_proxy_) { | 472 if (quota_manager_proxy_) { |
472 quota_client_ = new AppCacheQuotaClient(this); | 473 quota_client_ = new AppCacheQuotaClient(this); |
473 quota_manager_proxy_->RegisterClient(quota_client_); | 474 quota_manager_proxy_->RegisterClient(quota_client_); |
474 } | 475 } |
475 } | 476 } |
476 | 477 |
477 AppCacheService::~AppCacheService() { | 478 AppCacheService::~AppCacheService() { |
478 DCHECK(backends_.empty()); | 479 DCHECK(backends_.empty()); |
479 std::for_each(pending_helpers_.begin(), | 480 std::for_each(pending_helpers_.begin(), |
480 pending_helpers_.end(), | 481 pending_helpers_.end(), |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 backends_.insert( | 551 backends_.insert( |
551 BackendMap::value_type(backend_impl->process_id(), backend_impl)); | 552 BackendMap::value_type(backend_impl->process_id(), backend_impl)); |
552 } | 553 } |
553 | 554 |
554 void AppCacheService::UnregisterBackend( | 555 void AppCacheService::UnregisterBackend( |
555 AppCacheBackendImpl* backend_impl) { | 556 AppCacheBackendImpl* backend_impl) { |
556 backends_.erase(backend_impl->process_id()); | 557 backends_.erase(backend_impl->process_id()); |
557 } | 558 } |
558 | 559 |
559 } // namespace appcache | 560 } // namespace appcache |
OLD | NEW |