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

Side by Side Diff: Source/core/storage/StorageNamespace.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All Rights Reserved. 2 * Copyright (C) 2009 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 17 matching lines...) Expand all
28 28
29 #include "core/storage/StorageArea.h" 29 #include "core/storage/StorageArea.h"
30 #include "platform/weborigin/SecurityOrigin.h" 30 #include "platform/weborigin/SecurityOrigin.h"
31 #include "public/platform/Platform.h" 31 #include "public/platform/Platform.h"
32 #include "public/platform/WebStorageArea.h" 32 #include "public/platform/WebStorageArea.h"
33 #include "public/platform/WebStorageNamespace.h" 33 #include "public/platform/WebStorageNamespace.h"
34 #include "wtf/MainThread.h" 34 #include "wtf/MainThread.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 StorageNamespace::StorageNamespace(PassOwnPtr<blink::WebStorageNamespace> webSto rageNamespace) 38 StorageNamespace::StorageNamespace(PassOwnPtr<WebStorageNamespace> webStorageNam espace)
39 : m_webStorageNamespace(webStorageNamespace) 39 : m_webStorageNamespace(webStorageNamespace)
40 { 40 {
41 } 41 }
42 42
43 StorageNamespace::~StorageNamespace() 43 StorageNamespace::~StorageNamespace()
44 { 44 {
45 } 45 }
46 46
47 PassOwnPtrWillBeRawPtr<StorageArea> StorageNamespace::localStorageArea(SecurityO rigin* origin) 47 PassOwnPtrWillBeRawPtr<StorageArea> StorageNamespace::localStorageArea(SecurityO rigin* origin)
48 { 48 {
49 ASSERT(isMainThread()); 49 ASSERT(isMainThread());
50 static blink::WebStorageNamespace* localStorageNamespace = 0; 50 static WebStorageNamespace* localStorageNamespace = 0;
51 if (!localStorageNamespace) 51 if (!localStorageNamespace)
52 localStorageNamespace = blink::Platform::current()->createLocalStorageNa mespace(); 52 localStorageNamespace = Platform::current()->createLocalStorageNamespace ();
53 return adoptPtrWillBeNoop(new StorageArea(adoptPtr(localStorageNamespace->cr eateStorageArea(origin->toString())), LocalStorage)); 53 return StorageArea::create(adoptPtr(localStorageNamespace->createStorageArea (origin->toString())), LocalStorage);
54 } 54 }
55 55
56 PassOwnPtrWillBeRawPtr<StorageArea> StorageNamespace::storageArea(SecurityOrigin * origin) 56 PassOwnPtrWillBeRawPtr<StorageArea> StorageNamespace::storageArea(SecurityOrigin * origin)
57 { 57 {
58 return adoptPtrWillBeNoop(new StorageArea(adoptPtr(m_webStorageNamespace->cr eateStorageArea(origin->toString())), SessionStorage)); 58 return StorageArea::create(adoptPtr(m_webStorageNamespace->createStorageArea (origin->toString())), SessionStorage);
59 } 59 }
60 60
61 bool StorageNamespace::isSameNamespace(const blink::WebStorageNamespace& session Namespace) const 61 bool StorageNamespace::isSameNamespace(const WebStorageNamespace& sessionNamespa ce) const
62 { 62 {
63 return m_webStorageNamespace && m_webStorageNamespace->isSameNamespace(sessi onNamespace); 63 return m_webStorageNamespace && m_webStorageNamespace->isSameNamespace(sessi onNamespace);
64 } 64 }
65 65
66 } // namespace blink 66 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698