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 "base/tracked_objects.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 base::Bind(&DomStorageContext::CloneSessionNamespace, | 54 base::Bind(&DomStorageContext::CloneSessionNamespace, |
55 context, namepace_id_to_clone, clone_id, persistent_clone_id)); | 55 context, namepace_id_to_clone, clone_id, persistent_clone_id)); |
56 return new DomStorageSession(context, clone_id, persistent_clone_id); | 56 return new DomStorageSession(context, clone_id, persistent_clone_id); |
57 } | 57 } |
58 | 58 |
59 DomStorageSession::DomStorageSession(DomStorageContext* context, | 59 DomStorageSession::DomStorageSession(DomStorageContext* context, |
60 int64 namespace_id, | 60 int64 namespace_id, |
61 const std::string& persistent_namespace_id) | 61 const std::string& persistent_namespace_id) |
62 : context_(context), | 62 : context_(context), |
63 namespace_id_(namespace_id), | 63 namespace_id_(namespace_id), |
64 persistent_namespace_id_(persistent_namespace_id) { | 64 persistent_namespace_id_(persistent_namespace_id), |
| 65 should_persist_(false) { |
65 // This ctor is intended for use by the Clone() method. | 66 // This ctor is intended for use by the Clone() method. |
66 } | 67 } |
67 | 68 |
68 DomStorageSession::~DomStorageSession() { | 69 DomStorageSession::~DomStorageSession() { |
69 context_->task_runner()->PostTask( | 70 context_->task_runner()->PostTask( |
70 FROM_HERE, | 71 FROM_HERE, |
71 base::Bind(&DomStorageContext::DeleteSessionNamespace, | 72 base::Bind(&DomStorageContext::DeleteSessionNamespace, |
72 context_, namespace_id_, should_persist_)); | 73 context_, namespace_id_, should_persist_)); |
73 } | 74 } |
74 | 75 |
75 } // namespace dom_storage | 76 } // namespace dom_storage |
OLD | NEW |