| 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/dom_storage/dom_storage_session.h" | 5 #include "webkit/dom_storage/dom_storage_session.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/tracked_objects.h" |
| 10 #include "webkit/dom_storage/dom_storage_context.h" | 11 #include "webkit/dom_storage/dom_storage_context.h" |
| 11 #include "webkit/dom_storage/dom_storage_task_runner.h" | 12 #include "webkit/dom_storage/dom_storage_task_runner.h" |
| 12 | 13 |
| 13 namespace dom_storage { | 14 namespace dom_storage { |
| 14 | 15 |
| 15 DomStorageSession::DomStorageSession(DomStorageContext* context) | 16 DomStorageSession::DomStorageSession(DomStorageContext* context) |
| 16 : context_(context), | 17 : context_(context), |
| 17 namespace_id_(context->AllocateSessionId()) { | 18 namespace_id_(context->AllocateSessionId()) { |
| 18 context->task_runner()->PostTask( | 19 context->task_runner()->PostTask( |
| 19 FROM_HERE, | 20 FROM_HERE, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 38 } | 39 } |
| 39 | 40 |
| 40 DomStorageSession::~DomStorageSession() { | 41 DomStorageSession::~DomStorageSession() { |
| 41 context_->task_runner()->PostTask( | 42 context_->task_runner()->PostTask( |
| 42 FROM_HERE, | 43 FROM_HERE, |
| 43 base::Bind(&DomStorageContext::DeleteSessionNamespace, | 44 base::Bind(&DomStorageContext::DeleteSessionNamespace, |
| 44 context_, namespace_id_)); | 45 context_, namespace_id_)); |
| 45 } | 46 } |
| 46 | 47 |
| 47 } // namespace dom_storage | 48 } // namespace dom_storage |
| OLD | NEW |