Index: ui/base/dragdrop/os_exchange_data_provider_mac.mm |
diff --git a/ui/base/dragdrop/os_exchange_data_provider_mac.mm b/ui/base/dragdrop/os_exchange_data_provider_mac.mm |
index 9f9fa915ca48465435f7d41c69db236e602c0e05..11b0a495bb12312609aef9ad8992d20b8ca1724c 100644 |
--- a/ui/base/dragdrop/os_exchange_data_provider_mac.mm |
+++ b/ui/base/dragdrop/os_exchange_data_provider_mac.mm |
@@ -29,8 +29,10 @@ OSExchangeDataProviderMac::OSExchangeDataProviderMac( |
OSExchangeDataProviderMac::~OSExchangeDataProviderMac() { |
} |
-OSExchangeData::Provider* OSExchangeDataProviderMac::Clone() const { |
- return new OSExchangeDataProviderMac(pasteboard_); |
+std::unique_ptr<OSExchangeData::Provider> |
+OSExchangeDataProviderMac::Clone() const { |
+ return std::unique_ptr<OSExchangeData::Provider>( |
+ new OSExchangeDataProviderMac(pasteboard_)); |
} |
void OSExchangeDataProviderMac::MarkOriginatedFromRenderer() { |
@@ -199,7 +201,8 @@ OSExchangeDataProviderMac::CreateDataFromPasteboard(NSPasteboard* pasteboard) { |
for (NSPasteboardItem* item in [pasteboard pasteboardItems]) |
ClipboardUtil::AddDataToPasteboard(provider->pasteboard_->get(), item); |
- return base::MakeUnique<OSExchangeData>(provider); |
+ return base::MakeUnique<OSExchangeData>( |
+ base::WrapUnique<OSExchangeData::Provider>(provider)); |
} |
// static |
@@ -212,12 +215,4 @@ NSArray* OSExchangeDataProviderMac::SupportedPasteboardTypes() { |
]; |
} |
-/////////////////////////////////////////////////////////////////////////////// |
-// OSExchangeData, public: |
- |
-// static |
-OSExchangeData::Provider* OSExchangeData::CreateProvider() { |
- return new OSExchangeDataProviderMac; |
-} |
- |
} // namespace ui |