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

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

Issue 9999021: Don't hardcode the "Local Storage" directory name in DomStorageContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased better. 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_context_unittest.cc ('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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 else 185 else
186 somethingCleared = false; 186 somethingCleared = false;
187 } 187 }
188 188
189 // SimpleDomStorageSystem ----------------------------- 189 // SimpleDomStorageSystem -----------------------------
190 190
191 SimpleDomStorageSystem* SimpleDomStorageSystem::g_instance_; 191 SimpleDomStorageSystem* SimpleDomStorageSystem::g_instance_;
192 192
193 SimpleDomStorageSystem::SimpleDomStorageSystem() 193 SimpleDomStorageSystem::SimpleDomStorageSystem()
194 : weak_factory_(this), 194 : weak_factory_(this),
195 context_(new DomStorageContext(FilePath(), NULL, NULL)), 195 context_(new DomStorageContext(FilePath(), FilePath(), NULL, NULL)),
196 host_(new DomStorageHost(context_)) { 196 host_(new DomStorageHost(context_)) {
197 DCHECK(!g_instance_); 197 DCHECK(!g_instance_);
198 g_instance_ = this; 198 g_instance_ = this;
199 } 199 }
200 200
201 SimpleDomStorageSystem::~SimpleDomStorageSystem() { 201 SimpleDomStorageSystem::~SimpleDomStorageSystem() {
202 g_instance_ = NULL; 202 g_instance_ = NULL;
203 host_.reset(); 203 host_.reset();
204 } 204 }
205 205
206 WebStorageNamespace* SimpleDomStorageSystem::CreateLocalStorageNamespace() { 206 WebStorageNamespace* SimpleDomStorageSystem::CreateLocalStorageNamespace() {
207 return new NamespaceImpl(weak_factory_.GetWeakPtr()); 207 return new NamespaceImpl(weak_factory_.GetWeakPtr());
208 } 208 }
209 209
210 WebStorageNamespace* SimpleDomStorageSystem::CreateSessionStorageNamespace() { 210 WebStorageNamespace* SimpleDomStorageSystem::CreateSessionStorageNamespace() {
211 int id = context_->AllocateSessionId(); 211 int id = context_->AllocateSessionId();
212 context_->CreateSessionNamespace(id); 212 context_->CreateSessionNamespace(id);
213 return new NamespaceImpl(weak_factory_.GetWeakPtr(), id); 213 return new NamespaceImpl(weak_factory_.GetWeakPtr(), id);
214 } 214 }
OLDNEW
« no previous file with comments | « webkit/dom_storage/dom_storage_context_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698