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

Unified Diff: mojo/public/cpp/bindings/sync_call_restrictions.h

Issue 2085353003: Change ClipboardMus to use mojo::SyncCallRestrictions::ScopedAllowSyncCall. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « base/threading/thread_restrictions.h ('k') | ui/views/mus/clipboard_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/sync_call_restrictions.h
diff --git a/mojo/public/cpp/bindings/sync_call_restrictions.h b/mojo/public/cpp/bindings/sync_call_restrictions.h
index 07776d6b25c2f71ee7b4efe5bdfb7ccf165dfd7d..78c1b7f3b9d2050d834fd3cbb3d03075206b779f 100644
--- a/mojo/public/cpp/bindings/sync_call_restrictions.h
+++ b/mojo/public/cpp/bindings/sync_call_restrictions.h
@@ -18,6 +18,10 @@ namespace mus {
class GpuService;
}
+namespace views {
+class ClipboardMus;
+}
+
namespace mojo {
// In some processes, sync calls are disallowed. For example, in the browser
@@ -44,10 +48,17 @@ class SyncCallRestrictions {
#endif
private:
-// DO NOT ADD ANY OTHER FRIEND STATEMENTS, talk to mojo/OWNERS first.
-// BEGIN ALLOWED USAGE.
+ // DO NOT ADD ANY OTHER FRIEND STATEMENTS, talk to mojo/OWNERS first.
+ // BEGIN ALLOWED USAGE.
friend class mus::GpuService; // http://crbug.com/620058
-// END ALLOWED USAGE.
+ // END ALLOWED USAGE.
+
+ // BEGIN USAGE THAT NEEDS TO BE FIXED.
+ // In the non-mus case, we called blocking OS functions in the ui::Clipboard
+ // implementation which weren't caught by sync call restrictions. Our blocking
+ // calls to mus, however, are.
+ friend class views::ClipboardMus;
+ // END USAGE THAT NEEDS TO BE FIXED.
#if ENABLE_SYNC_CALL_RESTRICTIONS
static void IncreaseScopedAllowCount();
« no previous file with comments | « base/threading/thread_restrictions.h ('k') | ui/views/mus/clipboard_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698