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

Unified Diff: third_party/WebKit/Source/modules/storage/StorageNamespace.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
diff --git a/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp b/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
index 60f68693b2e1eade39cf4690c6a6e1aa3dcd6648..1ad21f84c45a579ad9a20107aed454871379ac13 100644
--- a/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
+++ b/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
@@ -30,10 +30,12 @@
#include "public/platform/Platform.h"
#include "public/platform/WebStorageArea.h"
#include "public/platform/WebStorageNamespace.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
-StorageNamespace::StorageNamespace(PassOwnPtr<WebStorageNamespace> webStorageNamespace)
+StorageNamespace::StorageNamespace(std::unique_ptr<WebStorageNamespace> webStorageNamespace)
: m_webStorageNamespace(std::move(webStorageNamespace))
{
}
@@ -48,12 +50,12 @@ StorageArea* StorageNamespace::localStorageArea(SecurityOrigin* origin)
static WebStorageNamespace* localStorageNamespace = nullptr;
if (!localStorageNamespace)
localStorageNamespace = Platform::current()->createLocalStorageNamespace();
- return StorageArea::create(adoptPtr(localStorageNamespace->createStorageArea(origin->toString())), LocalStorage);
+ return StorageArea::create(wrapUnique(localStorageNamespace->createStorageArea(origin->toString())), LocalStorage);
}
StorageArea* StorageNamespace::storageArea(SecurityOrigin* origin)
{
- return StorageArea::create(adoptPtr(m_webStorageNamespace->createStorageArea(origin->toString())), SessionStorage);
+ return StorageArea::create(wrapUnique(m_webStorageNamespace->createStorageArea(origin->toString())), SessionStorage);
}
bool StorageNamespace::isSameNamespace(const WebStorageNamespace& sessionNamespace) const

Powered by Google App Engine
This is Rietveld 408576698