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

Side by Side Diff: content/renderer/renderer_webstoragenamespace_impl.cc

Issue 10162015: Pull domstorage specifics out of RenderThreadImpl into DomStorageDispatcher (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | « content/renderer/renderer_webstoragenamespace_impl.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
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/renderer/renderer_webstoragenamespace_impl.h"
6
7 #include "base/logging.h"
8 #include "content/renderer/renderer_webstoragearea_impl.h"
9 #include "webkit/dom_storage/dom_storage_types.h"
10
11 using WebKit::WebStorageArea;
12 using WebKit::WebStorageNamespace;
13 using WebKit::WebString;
14
15 RendererWebStorageNamespaceImpl::RendererWebStorageNamespaceImpl()
16 : namespace_id_(dom_storage::kLocalStorageNamespaceId) {
17 }
18
19 RendererWebStorageNamespaceImpl::RendererWebStorageNamespaceImpl(
20 int64 namespace_id)
21 : namespace_id_(namespace_id) {
22 DCHECK_NE(dom_storage::kInvalidSessionStorageNamespaceId, namespace_id);
23 }
24
25 RendererWebStorageNamespaceImpl::~RendererWebStorageNamespaceImpl() {
26 }
27
28 WebStorageArea* RendererWebStorageNamespaceImpl::createStorageArea(
29 const WebString& origin) {
30 return new RendererWebStorageAreaImpl(namespace_id_, origin);
31 }
32
33 WebStorageNamespace* RendererWebStorageNamespaceImpl::copy() {
34 // By returning NULL, we're telling WebKit to lazily fetch it the next time
35 // session storage is used. In the WebViewClient::createView, we do the
36 // book-keeping necessary to make it a true copy-on-write despite not doing
37 // anything here, now.
38 return NULL;
39 }
40
41 bool RendererWebStorageNamespaceImpl::isSameNamespace(
42 const WebStorageNamespace& other) const {
43 const RendererWebStorageNamespaceImpl* other_impl =
44 static_cast<const RendererWebStorageNamespaceImpl*>(&other);
45 return namespace_id_ == other_impl->namespace_id_;
46 }
OLDNEW
« no previous file with comments | « content/renderer/renderer_webstoragenamespace_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698