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

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..ab15b3d5424e20e7053429be6d1bd2f8f60fd08c 100644
--- a/remoting/host/clipboard_win.cc
+++ b/remoting/host/clipboard_win.cc
@@ -32,7 +32,12 @@ class ScopedClipboard {
~ScopedClipboard() {
if (opened_) {
+ // CloseClipboard() must be called with anonymous access token. See
+ // crbug.com/441834 .
+ BOOL result = ::ImpersonateAnonymousToken(::GetCurrentThread());
+ CHECK(result);
Wez 2014/12/12 19:25:36 nit: I think it'd be acceptable to just CHECK(ApiC
Sergey Ulanov 2014/12/12 19:34:00 Side effects inside DCHECKs are often hard to debu
::CloseClipboard();
+ ::RevertToSelf();
Wez 2014/12/12 19:25:36 CHECK this as well?
Sergey Ulanov 2014/12/12 19:34:00 Done.
}
}
« 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