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.
|
} |
} |