| 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/tools/test_shell/simple_dom_storage_system.h" | 5 #include "webkit/tools/test_shell/simple_dom_storage_system.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 int session_namespace_id) | 87 int session_namespace_id) |
| 88 : parent_(parent), | 88 : parent_(parent), |
| 89 namespace_id_(session_namespace_id) { | 89 namespace_id_(session_namespace_id) { |
| 90 } | 90 } |
| 91 | 91 |
| 92 SimpleDomStorageSystem::NamespaceImpl::~NamespaceImpl() { | 92 SimpleDomStorageSystem::NamespaceImpl::~NamespaceImpl() { |
| 93 if (namespace_id_ == dom_storage::kLocalStorageNamespaceId || | 93 if (namespace_id_ == dom_storage::kLocalStorageNamespaceId || |
| 94 namespace_id_ == kInvalidNamespaceId || !Context()) { | 94 namespace_id_ == kInvalidNamespaceId || !Context()) { |
| 95 return; | 95 return; |
| 96 } | 96 } |
| 97 Context()->DeleteSessionNamespace(namespace_id_); | 97 Context()->DeleteSessionNamespace(namespace_id_, false); |
| 98 } | 98 } |
| 99 | 99 |
| 100 WebStorageArea* SimpleDomStorageSystem::NamespaceImpl::createStorageArea( | 100 WebStorageArea* SimpleDomStorageSystem::NamespaceImpl::createStorageArea( |
| 101 const WebString& origin) { | 101 const WebString& origin) { |
| 102 return new AreaImpl(parent_, namespace_id_, GURL(origin)); | 102 return new AreaImpl(parent_, namespace_id_, GURL(origin)); |
| 103 } | 103 } |
| 104 | 104 |
| 105 WebStorageNamespace* SimpleDomStorageSystem::NamespaceImpl::copy() { | 105 WebStorageNamespace* SimpleDomStorageSystem::NamespaceImpl::copy() { |
| 106 DCHECK_NE(dom_storage::kLocalStorageNamespaceId, namespace_id_); | 106 DCHECK_NE(dom_storage::kLocalStorageNamespaceId, namespace_id_); |
| 107 int new_id = kInvalidNamespaceId; | 107 int new_id = kInvalidNamespaceId; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 key, | 274 key, |
| 275 old_value, | 275 old_value, |
| 276 new_value, | 276 new_value, |
| 277 area->origin(), | 277 area->origin(), |
| 278 page_url, | 278 page_url, |
| 279 session_namespace_for_event_dispatch, | 279 session_namespace_for_event_dispatch, |
| 280 area_being_processed_, | 280 area_being_processed_, |
| 281 true /* originatedInProcess */); | 281 true /* originatedInProcess */); |
| 282 } | 282 } |
| 283 } | 283 } |
| OLD | NEW |