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

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

Issue 6915017: Chrome side to allow WebKit layer to use WebPermissionClient to check if access to local storage ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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_webstoragearea_impl.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) 2010 The Chromium Authors. All rights reserved. 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 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 "content/renderer/renderer_webstoragenamespace_impl.h" 5 #include "content/renderer/renderer_webstoragenamespace_impl.h"
6 6
7 #include "content/renderer/render_thread.h" 7 #include "content/renderer/render_thread.h"
8 #include "content/renderer/renderer_webstoragearea_impl.h" 8 #include "content/renderer/renderer_webstoragearea_impl.h"
9 9
10 using WebKit::WebStorageArea; 10 using WebKit::WebStorageArea;
(...skipping 16 matching lines...) Expand all
27 27
28 RendererWebStorageNamespaceImpl::~RendererWebStorageNamespaceImpl() { 28 RendererWebStorageNamespaceImpl::~RendererWebStorageNamespaceImpl() {
29 } 29 }
30 30
31 WebStorageArea* RendererWebStorageNamespaceImpl::createStorageArea( 31 WebStorageArea* RendererWebStorageNamespaceImpl::createStorageArea(
32 const WebString& origin) { 32 const WebString& origin) {
33 // Ideally, we'd keep a hash map of origin to these objects. Unfortunately 33 // Ideally, we'd keep a hash map of origin to these objects. Unfortunately
34 // this doesn't seem practical because there's no good way to ref-count these 34 // this doesn't seem practical because there's no good way to ref-count these
35 // objects, and it'd be unclear who owned them. So, instead, we'll pay the 35 // objects, and it'd be unclear who owned them. So, instead, we'll pay the
36 // price in terms of wasted memory. 36 // price in terms of wasted memory.
37 return new RendererWebStorageAreaImpl(namespace_id_, origin); 37 return new RendererWebStorageAreaImpl(namespace_id_, origin, storage_type_);
38 } 38 }
39 39
40 WebStorageNamespace* RendererWebStorageNamespaceImpl::copy() { 40 WebStorageNamespace* RendererWebStorageNamespaceImpl::copy() {
41 // By returning NULL, we're telling WebKit to lazily fetch it the next time 41 // By returning NULL, we're telling WebKit to lazily fetch it the next time
42 // session storage is used. In the WebViewClient::createView, we do the 42 // session storage is used. In the WebViewClient::createView, we do the
43 // book-keeping necessary to make it a true copy-on-write despite not doing 43 // book-keeping necessary to make it a true copy-on-write despite not doing
44 // anything here, now. 44 // anything here, now.
45 return NULL; 45 return NULL;
46 } 46 }
47 47
48 void RendererWebStorageNamespaceImpl::close() { 48 void RendererWebStorageNamespaceImpl::close() {
49 // This is called only on LocalStorage namespaces when WebKit thinks its 49 // This is called only on LocalStorage namespaces when WebKit thinks its
50 // shutting down. This has no impact on Chromium. 50 // shutting down. This has no impact on Chromium.
51 } 51 }
OLDNEW
« no previous file with comments | « content/renderer/renderer_webstoragearea_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698