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 "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/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 service_->DeleteAppCacheGroup(manifest_url_, net::CompletionCallback()); | 418 service_->DeleteAppCacheGroup(manifest_url_, net::CompletionCallback()); |
419 delete this; | 419 delete this; |
420 } | 420 } |
421 | 421 |
422 | 422 |
423 // AppCacheService ------- | 423 // AppCacheService ------- |
424 | 424 |
425 AppCacheService::AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy) | 425 AppCacheService::AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy) |
426 : appcache_policy_(NULL), quota_client_(NULL), | 426 : appcache_policy_(NULL), quota_client_(NULL), |
427 quota_manager_proxy_(quota_manager_proxy), | 427 quota_manager_proxy_(quota_manager_proxy), |
428 request_context_(NULL), clear_local_state_on_exit_(false), | 428 request_context_(NULL), |
429 save_session_state_(false) { | 429 force_keep_session_state_(false) { |
430 if (quota_manager_proxy_) { | 430 if (quota_manager_proxy_) { |
431 quota_client_ = new AppCacheQuotaClient(this); | 431 quota_client_ = new AppCacheQuotaClient(this); |
432 quota_manager_proxy_->RegisterClient(quota_client_); | 432 quota_manager_proxy_->RegisterClient(quota_client_); |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 AppCacheService::~AppCacheService() { | 436 AppCacheService::~AppCacheService() { |
437 DCHECK(backends_.empty()); | 437 DCHECK(backends_.empty()); |
438 std::for_each(pending_helpers_.begin(), | 438 std::for_each(pending_helpers_.begin(), |
439 pending_helpers_.end(), | 439 pending_helpers_.end(), |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 backends_.insert( | 505 backends_.insert( |
506 BackendMap::value_type(backend_impl->process_id(), backend_impl)); | 506 BackendMap::value_type(backend_impl->process_id(), backend_impl)); |
507 } | 507 } |
508 | 508 |
509 void AppCacheService::UnregisterBackend( | 509 void AppCacheService::UnregisterBackend( |
510 AppCacheBackendImpl* backend_impl) { | 510 AppCacheBackendImpl* backend_impl) { |
511 backends_.erase(backend_impl->process_id()); | 511 backends_.erase(backend_impl->process_id()); |
512 } | 512 } |
513 | 513 |
514 } // namespace appcache | 514 } // namespace appcache |
OLD | NEW |