Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1741)

Side by Side Diff: webkit/tools/test_shell/simple_dom_storage_system.cc

Issue 10005049: DomStorage house cleaning (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/dom_storage/dom_storage_types.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "googleurl/src/gurl.h" 7 #include "googleurl/src/gurl.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h " 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h "
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 DCHECK_NE(dom_storage::kLocalStorageNamespaceId, namespace_id_); 104 DCHECK_NE(dom_storage::kLocalStorageNamespaceId, namespace_id_);
105 int new_id = kInvalidNamespaceId; 105 int new_id = kInvalidNamespaceId;
106 if (Context()) { 106 if (Context()) {
107 new_id = Context()->AllocateSessionId(); 107 new_id = Context()->AllocateSessionId();
108 Context()->CloneSessionNamespace(namespace_id_, new_id); 108 Context()->CloneSessionNamespace(namespace_id_, new_id);
109 } 109 }
110 return new NamespaceImpl(parent_, new_id); 110 return new NamespaceImpl(parent_, new_id);
111 } 111 }
112 112
113 void SimpleDomStorageSystem::NamespaceImpl::close() { 113 void SimpleDomStorageSystem::NamespaceImpl::close() {
114 // TODO(michaeln): remove this deprecated method.
114 } 115 }
115 116
116 // AreaImpl ----------------------------- 117 // AreaImpl -----------------------------
117 118
118 SimpleDomStorageSystem::AreaImpl::AreaImpl( 119 SimpleDomStorageSystem::AreaImpl::AreaImpl(
119 const base::WeakPtr<SimpleDomStorageSystem>& parent, 120 const base::WeakPtr<SimpleDomStorageSystem>& parent,
120 int namespace_id, const GURL& origin) 121 int namespace_id, const GURL& origin)
121 : parent_(parent), 122 : parent_(parent),
122 connection_id_(0) { 123 connection_id_(0) {
123 if (Host()) 124 if (Host())
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 205
205 WebStorageNamespace* SimpleDomStorageSystem::CreateLocalStorageNamespace() { 206 WebStorageNamespace* SimpleDomStorageSystem::CreateLocalStorageNamespace() {
206 return new NamespaceImpl(weak_factory_.GetWeakPtr()); 207 return new NamespaceImpl(weak_factory_.GetWeakPtr());
207 } 208 }
208 209
209 WebStorageNamespace* SimpleDomStorageSystem::CreateSessionStorageNamespace() { 210 WebStorageNamespace* SimpleDomStorageSystem::CreateSessionStorageNamespace() {
210 int id = context_->AllocateSessionId(); 211 int id = context_->AllocateSessionId();
211 context_->CreateSessionNamespace(id); 212 context_->CreateSessionNamespace(id);
212 return new NamespaceImpl(weak_factory_.GetWeakPtr(), id); 213 return new NamespaceImpl(weak_factory_.GetWeakPtr(), id);
213 } 214 }
OLDNEW
« no previous file with comments | « webkit/dom_storage/dom_storage_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698