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

Unified Diff: chrome/browser/extensions/api/messaging/native_message_process_host.h

Issue 118253005: Add managed policies for Native Messaging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/extensions/api/messaging/native_message_process_host.h
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.h b/chrome/browser/extensions/api/messaging/native_message_process_host.h
index 74e63b1e6bb4ddbbdc291f24aaf6f23616b9c207..f3c8c08ddba3a1a11002d5474d0d3f84d39817a7 100644
--- a/chrome/browser/extensions/api/messaging/native_message_process_host.h
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host.h
@@ -16,6 +16,8 @@
#include "content/public/browser/browser_thread.h"
#include "ui/gfx/native_widget_types.h"
+class PrefService;
+
namespace net {
class DrainableIOBuffer;
@@ -52,6 +54,12 @@ class NativeMessageProcessHost
virtual ~NativeMessageProcessHost();
+ // Verifies that the native messaging host with the specified name is allowed
+ // by the system policies.
+ static bool IsHostAllowed(
+ const PrefService* pref_service,
+ const std::string& native_host_name);
+
static scoped_ptr<NativeMessageProcessHost> Create(
gfx::NativeView native_view,
base::WeakPtr<Client> weak_client_ui,

Powered by Google App Engine
This is Rietveld 408576698