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

Unified Diff: chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc

Issue 2847853003: Remove policy watching from It2MeHost. (Closed)
Patch Set: Add dep. Created 3 years, 7 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 | « chrome/browser/extensions/api/DEPS ('k') | remoting/host/it2me/it2me_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
diff --git a/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc b/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
index 9d2da8fdc07bd5f17bc3ef342716cfdffe8e8b58..47375a5b74c6493c06905f19cdf40f20fb99a61b 100644
--- a/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
@@ -18,13 +18,14 @@
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/arc/extensions/arc_support_message_host.h"
-#include "components/policy/core/common/policy_service.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/common/constants.h"
#include "extensions/common/url_pattern.h"
#include "net/url_request/url_request_context_getter.h"
+#include "remoting/base/auto_thread_task_runner.h"
#include "remoting/host/chromoting_host_context.h"
#include "remoting/host/it2me/it2me_native_messaging_host.h"
+#include "remoting/host/policy_watcher.h"
#include "ui/gfx/native_widget_types.h"
#include "url/gurl.h"
@@ -104,9 +105,12 @@ std::unique_ptr<NativeMessageHost> CreateIt2MeHost() {
content::BrowserThread::UI),
content::BrowserThread::GetTaskRunnerForThread(
content::BrowserThread::FILE));
+ std::unique_ptr<remoting::PolicyWatcher> policy_watcher =
+ remoting::PolicyWatcher::Create(g_browser_process->policy_service(),
+ context->file_task_runner());
std::unique_ptr<NativeMessageHost> host(
new remoting::It2MeNativeMessagingHost(
- /*needs_elevation=*/false, g_browser_process->policy_service(),
+ /*needs_elevation=*/false, std::move(policy_watcher),
std::move(context), std::move(host_factory)));
return host;
}
« no previous file with comments | « chrome/browser/extensions/api/DEPS ('k') | remoting/host/it2me/it2me_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698