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

Unified Diff: remoting/host/clipboard_win.cc

Issue 798943003: Call CloseClipboard() with anonymous access token. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/clipboard_win.cc
diff --git a/remoting/host/clipboard_win.cc b/remoting/host/clipboard_win.cc
index 21ae6c77395d1e26c030260cd0eab96e72cc6530..f78457fda4cf5559b0553fdd95bd718e9cc77810 100644
--- a/remoting/host/clipboard_win.cc
+++ b/remoting/host/clipboard_win.cc
@@ -32,7 +32,13 @@ class ScopedClipboard {
~ScopedClipboard() {
if (opened_) {
+ // CloseClipboard() must be called with anonymous access token. See
+ // crbug.com/441834 .
+ BOOL result = ::ImpersonateAnonymousToken(::GetCurrentThread());
+ CHECK(result);
::CloseClipboard();
+ result = ::RevertToSelf();
+ CHECK(result);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698