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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/CacheStorage.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/cachestorage/CacheStorage.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
index f6152032369a9380c233095e39bd3df831905bb2..057bd46ccb62c019823d75f97aaaa90c12b6858d 100644
--- a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
@@ -15,6 +15,8 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerCacheStorage.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -95,7 +97,7 @@ public:
{
if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
return;
- Cache* cache = Cache::create(m_cacheStorage->m_scopedFetcher, adoptPtr(webCache.release()));
+ Cache* cache = Cache::create(m_cacheStorage->m_scopedFetcher, wrapUnique(webCache.release()));
m_cacheStorage->m_nameToCacheMap.set(m_cacheName, cache);
m_resolver->resolve(cache);
m_resolver.clear();
@@ -216,7 +218,7 @@ private:
CacheStorage* CacheStorage::create(GlobalFetch::ScopedFetcher* fetcher, WebServiceWorkerCacheStorage* webCacheStorage)
{
- return new CacheStorage(fetcher, adoptPtr(webCacheStorage));
+ return new CacheStorage(fetcher, wrapUnique(webCacheStorage));
}
ScriptPromise CacheStorage::open(ScriptState* scriptState, const String& cacheName, ExceptionState& exceptionState)
@@ -325,7 +327,7 @@ ScriptPromise CacheStorage::matchImpl(ScriptState* scriptState, const Request* r
return promise;
}
-CacheStorage::CacheStorage(GlobalFetch::ScopedFetcher* fetcher, PassOwnPtr<WebServiceWorkerCacheStorage> webCacheStorage)
+CacheStorage::CacheStorage(GlobalFetch::ScopedFetcher* fetcher, std::unique_ptr<WebServiceWorkerCacheStorage> webCacheStorage)
: m_scopedFetcher(fetcher)
, m_webCacheStorage(std::move(webCacheStorage))
{

Powered by Google App Engine
This is Rietveld 408576698