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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp

Issue 2480293004: Mandate unique_ptr for base::IDMap in IDMapOwnPointer mode. (Closed)
Patch Set: Make changes requested by danakj, fix a few more headers 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
index 35b93af61fabaa5f2a64078f147bbe5929f488ef..bd905924c1fe7ed0944b95442e4256a6a7ac80c4 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp
@@ -142,8 +142,9 @@ ScriptPromise PresentationRequest::start(ScriptState* scriptState) {
// TODO(crbug.com/627655): Accept multiple URLs per PresentationRequest.
WebVector<WebURL> presentationUrls(static_cast<size_t>(1U));
presentationUrls[0] = m_url;
- client->startSession(presentationUrls,
- new PresentationConnectionCallbacks(resolver, this));
+ client->startSession(
+ presentationUrls,
+ WTF::makeUnique<PresentationConnectionCallbacks>(resolver, this));
return resolver->promise();
}
@@ -169,8 +170,9 @@ ScriptPromise PresentationRequest::reconnect(ScriptState* scriptState,
// TODO(crbug.com/627655): Accept multiple URLs per PresentationRequest.
WebVector<WebURL> presentationUrls(static_cast<size_t>(1U));
presentationUrls[0] = m_url;
- client->joinSession(presentationUrls, id,
- new PresentationConnectionCallbacks(resolver, this));
+ client->joinSession(
+ presentationUrls, id,
+ WTF::makeUnique<PresentationConnectionCallbacks>(resolver, this));
return resolver->promise();
}
@@ -193,7 +195,8 @@ ScriptPromise PresentationRequest::getAvailability(ScriptState* scriptState) {
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
client->getAvailability(
- m_url, new PresentationAvailabilityCallbacks(resolver, m_url));
+ m_url,
+ WTF::makeUnique<PresentationAvailabilityCallbacks>(resolver, m_url));
return resolver->promise();
}

Powered by Google App Engine
This is Rietveld 408576698