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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 1ad21f84c45a579ad9a20107aed454871379ac13..60f68693b2e1eade39cf4690c6a6e1aa3dcd6648 100644
--- a/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
+++ b/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
@@ -30,12 +30,10 @@
#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(std::unique_ptr<WebStorageNamespace> webStorageNamespace)
+StorageNamespace::StorageNamespace(PassOwnPtr<WebStorageNamespace> webStorageNamespace)
: m_webStorageNamespace(std::move(webStorageNamespace))
{
}
@@ -50,12 +48,12 @@ StorageArea* StorageNamespace::localStorageArea(SecurityOrigin* origin)
static WebStorageNamespace* localStorageNamespace = nullptr;
if (!localStorageNamespace)
localStorageNamespace = Platform::current()->createLocalStorageNamespace();
- return StorageArea::create(wrapUnique(localStorageNamespace->createStorageArea(origin->toString())), LocalStorage);
+ return StorageArea::create(adoptPtr(localStorageNamespace->createStorageArea(origin->toString())), LocalStorage);
}
StorageArea* StorageNamespace::storageArea(SecurityOrigin* origin)
{
- return StorageArea::create(wrapUnique(m_webStorageNamespace->createStorageArea(origin->toString())), SessionStorage);
+ return StorageArea::create(adoptPtr(m_webStorageNamespace->createStorageArea(origin->toString())), SessionStorage);
}
bool StorageNamespace::isSameNamespace(const WebStorageNamespace& sessionNamespace) const

Powered by Google App Engine
This is Rietveld 408576698