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

Unified Diff: ui/base/dragdrop/os_exchange_data_provider_win.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
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_win.h ('k') | ui/base/dragdrop/os_exchange_data_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/os_exchange_data_provider_win.cc
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.cc b/ui/base/dragdrop/os_exchange_data_provider_win.cc
index 47f1e0bb1d283fba3e89f6c7eebf7b3245721157..c09780fdf9e2ca5eceb72e40132bba5a00255096 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.cc
@@ -12,6 +12,7 @@
#include "base/i18n/file_util_icu.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/pickle.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/scoped_hglobal.h"
@@ -276,8 +277,9 @@ OSExchangeDataProviderWin::OSExchangeDataProviderWin()
OSExchangeDataProviderWin::~OSExchangeDataProviderWin() {
}
-OSExchangeData::Provider* OSExchangeDataProviderWin::Clone() const {
- return new OSExchangeDataProviderWin(data_object());
+std::unique_ptr<OSExchangeData::Provider>
+OSExchangeDataProviderWin::Clone() const {
+ return base::MakeUnique<OSExchangeDataProviderWin>(data_object());
}
void OSExchangeDataProviderWin::MarkOriginatedFromRenderer() {
@@ -1065,12 +1067,4 @@ static STGMEDIUM* GetStorageForFileDescriptor(
return storage;
}
-///////////////////////////////////////////////////////////////////////////////
-// OSExchangeData, public:
-
-// static
-OSExchangeData::Provider* OSExchangeData::CreateProvider() {
- return new OSExchangeDataProviderWin();
-}
-
} // namespace ui
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_win.h ('k') | ui/base/dragdrop/os_exchange_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698