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

Unified Diff: ui/base/dragdrop/os_exchange_data_provider_aura.cc

Issue 2179813003: Allow OSExchangeData::Provider to be overridden at run time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac + win Created 4 years, 5 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: ui/base/dragdrop/os_exchange_data_provider_aura.cc
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aura.cc b/ui/base/dragdrop/os_exchange_data_provider_aura.cc
index e3578fa40d271d16120851e527f7aec5ab112481..6093a8e4f68a014e057080e3504dfe2c86eed6b6 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aura.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_aura.cc
@@ -5,6 +5,7 @@
#include "ui/base/dragdrop/os_exchange_data_provider_aura.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "net/base/filename_util.h"
#include "ui/base/clipboard/clipboard.h"
@@ -19,7 +20,8 @@ OSExchangeDataProviderAura::OSExchangeDataProviderAura()
OSExchangeDataProviderAura::~OSExchangeDataProviderAura() {}
-OSExchangeData::Provider* OSExchangeDataProviderAura::Clone() const {
+std::unique_ptr<OSExchangeData::Provider>
+OSExchangeDataProviderAura::Clone() const {
OSExchangeDataProviderAura* ret = new OSExchangeDataProviderAura();
ret->formats_ = formats_;
ret->string_ = string_;
@@ -31,7 +33,7 @@ OSExchangeData::Provider* OSExchangeDataProviderAura::Clone() const {
ret->html_ = html_;
ret->base_url_ = base_url_;
- return ret;
+ return base::WrapUnique<OSExchangeData::Provider>(ret);
}
void OSExchangeDataProviderAura::MarkOriginatedFromRenderer() {
@@ -217,12 +219,4 @@ bool OSExchangeDataProviderAura::GetPlainTextURL(GURL* url) const {
return true;
}
-///////////////////////////////////////////////////////////////////////////////
-// OSExchangeData, public:
-
-// static
-OSExchangeData::Provider* OSExchangeData::CreateProvider() {
- return new OSExchangeDataProviderAura();
-}
-
} // namespace ui
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_aura.h ('k') | ui/base/dragdrop/os_exchange_data_provider_aurax11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698