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

Unified Diff: third_party/WebKit/Source/platform/exported/WebContentSettingCallbacks.cpp

Issue 1916703002: Prepare for move-only PassOwnPtr in the remaining directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@core1
Patch Set: Merge with trunk. Created 4 years, 8 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/platform/exported/WebContentSettingCallbacks.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebContentSettingCallbacks.cpp b/third_party/WebKit/Source/platform/exported/WebContentSettingCallbacks.cpp
index 88319d38c866ff6415756a56d59d96e58b01524c..de907f6e6b835592696b6e22a7c76aa8c9c7a30d 100644
--- a/third_party/WebKit/Source/platform/exported/WebContentSettingCallbacks.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebContentSettingCallbacks.cpp
@@ -11,21 +11,21 @@ namespace blink {
class WebContentSettingCallbacksPrivate : public RefCounted<WebContentSettingCallbacksPrivate> {
public:
- static PassRefPtr<WebContentSettingCallbacksPrivate> create(const PassOwnPtr<ContentSettingCallbacks>& callbacks)
+ static PassRefPtr<WebContentSettingCallbacksPrivate> create(PassOwnPtr<ContentSettingCallbacks> callbacks)
{
- return adoptRef(new WebContentSettingCallbacksPrivate(callbacks));
+ return adoptRef(new WebContentSettingCallbacksPrivate(std::move(callbacks)));
}
ContentSettingCallbacks* callbacks() { return m_callbacks.get(); }
private:
- WebContentSettingCallbacksPrivate(const PassOwnPtr<ContentSettingCallbacks>& callbacks) : m_callbacks(callbacks) { }
+ WebContentSettingCallbacksPrivate(PassOwnPtr<ContentSettingCallbacks> callbacks) : m_callbacks(std::move(callbacks)) { }
OwnPtr<ContentSettingCallbacks> m_callbacks;
};
-WebContentSettingCallbacks::WebContentSettingCallbacks(const PassOwnPtr<ContentSettingCallbacks>& callbacks)
+WebContentSettingCallbacks::WebContentSettingCallbacks(PassOwnPtr<ContentSettingCallbacks>&& callbacks)
{
- m_private = WebContentSettingCallbacksPrivate::create(callbacks);
+ m_private = WebContentSettingCallbacksPrivate::create(std::move(callbacks));
}
void WebContentSettingCallbacks::reset()

Powered by Google App Engine
This is Rietveld 408576698