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

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

Issue 2382973002: Convert WebSecurityOrigin -> GURL without re-parsing the url (Closed)
Patch Set: rebase on #427122 Created 4 years, 1 month 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;
17 16
18 namespace content { 17 namespace content {
19 18
20 LocalStorageNamespace::LocalStorageNamespace( 19 LocalStorageNamespace::LocalStorageNamespace(
21 LocalStorageCachedAreas* local_storage_cached_areas) 20 LocalStorageCachedAreas* local_storage_cached_areas)
22 : local_storage_cached_areas_(local_storage_cached_areas) { 21 : local_storage_cached_areas_(local_storage_cached_areas) {
23 } 22 }
24 23
25 LocalStorageNamespace::~LocalStorageNamespace() { 24 LocalStorageNamespace::~LocalStorageNamespace() {
26 } 25 }
27 26
28 WebStorageArea* LocalStorageNamespace::createStorageArea( 27 WebStorageArea* LocalStorageNamespace::createStorageArea(
29 const WebString& origin) { 28 const blink::WebSecurityOrigin& origin) {
30 return new LocalStorageArea(local_storage_cached_areas_->GetCachedArea( 29 return new LocalStorageArea(
31 url::Origin(blink::WebStringToGURL(origin)))); 30 local_storage_cached_areas_->GetCachedArea(origin));
32 } 31 }
33 32
34 bool LocalStorageNamespace::isSameNamespace( 33 bool LocalStorageNamespace::isSameNamespace(
35 const WebStorageNamespace& other) const { 34 const WebStorageNamespace& other) const {
36 NOTREACHED() << "This method should only be called for session storage."; 35 NOTREACHED() << "This method should only be called for session storage.";
37 return false; 36 return false;
38 } 37 }
39 38
40 } // namespace content 39 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/dom_storage/local_storage_namespace.h ('k') | content/renderer/dom_storage/webstoragenamespace_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698