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

Unified Diff: ui/base/dragdrop/os_exchange_data_provider_mac.h

Issue 1852433004: Fix NSPasteboard leaks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile error. Created 4 years, 9 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/clipboard/clipboard_util_mac_unittest.mm ('k') | ui/base/dragdrop/os_exchange_data_provider_mac.mm » ('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_mac.h
diff --git a/ui/base/dragdrop/os_exchange_data_provider_mac.h b/ui/base/dragdrop/os_exchange_data_provider_mac.h
index c619ab9d806b49f6fc93bb436215f221e233efc8..378602923a97eeb0f38ccd4c0a2081a6c0a26304 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_mac.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_mac.h
@@ -5,20 +5,21 @@
#ifndef UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_
#define UI_BASE_DRAGDROP_OS_EXCHANGE_DATA_PROVIDER_MAC_H_
-#import "base/mac/scoped_nsobject.h"
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#import "ui/base/clipboard/clipboard_util_mac.h"
#include "ui/base/dragdrop/os_exchange_data.h"
@class NSPasteboard;
namespace ui {
+class UniquePasteboard;
// OSExchangeData::Provider implementation for Mac.
class UI_BASE_EXPORT OSExchangeDataProviderMac
: public OSExchangeData::Provider {
public:
OSExchangeDataProviderMac();
- explicit OSExchangeDataProviderMac(NSPasteboard* pasteboard);
~OSExchangeDataProviderMac() override;
// Overridden from OSExchangeData::Provider:
@@ -45,7 +46,8 @@ class UI_BASE_EXPORT OSExchangeDataProviderMac
bool HasCustomFormat(const Clipboard::FormatType& format) const override;
private:
- base::scoped_nsobject<NSPasteboard> pasteboard_;
+ explicit OSExchangeDataProviderMac(scoped_refptr<ui::UniquePasteboard>);
+ scoped_refptr<ui::UniquePasteboard> pasteboard_;
DISALLOW_COPY_AND_ASSIGN(OSExchangeDataProviderMac);
};
« no previous file with comments | « ui/base/clipboard/clipboard_util_mac_unittest.mm ('k') | ui/base/dragdrop/os_exchange_data_provider_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698