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

Side by Side Diff: content/renderer/dom_storage/local_storage_namespace.cc

Issue 1814003002: Implement the renderer side of the mojo based local storage implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/dom_storage/local_storage_namespace.h" 5 #include "content/renderer/dom_storage/local_storage_namespace.h"
6 6
7 #include "content/renderer/dom_storage/local_storage_area.h" 7 #include "content/renderer/dom_storage/local_storage_area.h"
8 #include "content/renderer/dom_storage/local_storage_cached_areas.h" 8 #include "content/renderer/dom_storage/local_storage_cached_areas.h"
9 #include "third_party/WebKit/public/platform/URLConversion.h" 9 #include "third_party/WebKit/public/platform/URLConversion.h"
10 #include "third_party/WebKit/public/platform/WebURL.h" 10 #include "third_party/WebKit/public/platform/WebURL.h"
11 #include "url/gurl.h" 11 #include "url/gurl.h"
12 #include "url/origin.h" 12 #include "url/origin.h"
13 13
14 using blink::WebStorageArea; 14 using blink::WebStorageArea;
15 using blink::WebStorageNamespace; 15 using blink::WebStorageNamespace;
16 using blink::WebString; 16 using blink::WebString;
17 17
18 namespace content { 18 namespace content {
19 19
20 LocalStorageNamespace::LocalStorageNamespace( 20 LocalStorageNamespace::LocalStorageNamespace(
21 LocalStorageCachedAreas* local_storage_cached_areas) 21 LocalStorageCachedAreas* local_storage_cached_areas)
22 : local_storage_cached_areas_(local_storage_cached_areas) { 22 : local_storage_cached_areas_(local_storage_cached_areas) {
23 } 23 }
24 24
25 LocalStorageNamespace::~LocalStorageNamespace() { 25 LocalStorageNamespace::~LocalStorageNamespace() {
26 } 26 }
27 27
28 WebStorageArea* LocalStorageNamespace::createStorageArea( 28 WebStorageArea* LocalStorageNamespace::createStorageArea(
29 const WebString& origin) { 29 const WebString& origin) {
30 return new LocalStorageArea( 30 return new LocalStorageArea(local_storage_cached_areas_->GetCachedArea(
31 local_storage_cached_areas_->GetLocalStorageCachedArea( 31 url::Origin(blink::WebStringToGURL(origin))));
32 url::Origin(blink::WebStringToGURL(origin))));
33 } 32 }
34 33
35 bool LocalStorageNamespace::isSameNamespace( 34 bool LocalStorageNamespace::isSameNamespace(
36 const WebStorageNamespace& other) const { 35 const WebStorageNamespace& other) const {
37 NOTREACHED() << "This method should only be called for session storage."; 36 NOTREACHED() << "This method should only be called for session storage.";
38 return false; 37 return false;
39 } 38 }
40 39
41 } // namespace content 40 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/dom_storage/local_storage_cached_areas.cc ('k') | mojo/common/common_type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698