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

Unified Diff: components/mus/common/gpu_service.cc

Issue 2084993002: Mojo: add support for disallowing sync calls for a process. (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') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/common/gpu_service.cc
diff --git a/components/mus/common/gpu_service.cc b/components/mus/common/gpu_service.cc
index a4d110e82a854c8071231cebc8faa4f5075b94d4..a841cc2502547eb5b63ec41fa0bdb17e2bb7ea86 100644
--- a/components/mus/common/gpu_service.cc
+++ b/components/mus/common/gpu_service.cc
@@ -6,11 +6,11 @@
#include "base/command_line.h"
#include "base/memory/singleton.h"
-#include "base/threading/thread_restrictions.h"
#include "components/mus/common/gpu_type_converters.h"
#include "components/mus/common/mojo_gpu_memory_buffer_manager.h"
#include "components/mus/common/switches.h"
#include "components/mus/public/interfaces/gpu_service.mojom.h"
+#include "mojo/public/cpp/bindings/sync_call_restrictions.h"
#include "mojo/public/cpp/system/platform_handle.h"
#include "services/shell/public/cpp/connector.h"
@@ -59,9 +59,9 @@ scoped_refptr<gpu::GpuChannelHost> GpuService::EstablishGpuChannel(
mojom::ChannelHandlePtr channel_handle;
mojom::GpuInfoPtr gpu_info;
{
- // TODO(penghuang): Remove the ScopedAllowWait when HW rendering is enabled
- // in mus chrome.
- base::ThreadRestrictions::ScopedAllowWait allow_wait;
+ // TODO(penghuang): Remove the ScopedAllowSyncCall when HW rendering is
+ // enabled in mus chrome.
+ mojo::SyncCallRestrictions::ScopedAllowSyncCall allow_sync_call;
if (!gpu_service->EstablishGpuChannel(&client_id, &channel_handle,
&gpu_info)) {
DLOG(WARNING)
« no previous file with comments | « base/threading/thread_restrictions.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698