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

Unified Diff: chrome/browser/ui/webui/policy_ui.cc

Issue 1106193003: Allow user to manually fetch remote commands (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-0420
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/policy_ui.cc
diff --git a/chrome/browser/ui/webui/policy_ui.cc b/chrome/browser/ui/webui/policy_ui.cc
index d2e73e74be61fda360dd2c42cc5b626cb4339405..921bd87cd8b9910c16868155399fccfbb8ed216d 100644
--- a/chrome/browser/ui/webui/policy_ui.cc
+++ b/chrome/browser/ui/webui/policy_ui.cc
@@ -36,6 +36,7 @@
#include "components/policy/core/common/policy_namespace.h"
#include "components/policy/core/common/policy_service.h"
#include "components/policy/core/common/policy_types.h"
+#include "components/policy/core/common/remote_commands/remote_commands_service.h"
#include "components/policy/core/common/schema.h"
#include "components/policy/core/common/schema_map.h"
#include "components/policy/core/common/schema_registry.h"
@@ -807,6 +808,18 @@ void PolicyUIHandler::HandleInitialized(const base::ListValue* args) {
}
void PolicyUIHandler::HandleReloadPolicies(const base::ListValue* args) {
+#if defined(OS_CHROMEOS)
+ // Allow user to manually fetch remote commands, in case invalidation
+ // service is not working properly.
+ // TODO(binjin): evaluate and possibly remove this after invalidation
bartfab (slow) 2015/04/29 15:21:38 Nit: Please reference a bug number.
binjin 2015/04/29 17:24:42 Done.
+ // service is landed and tested.
+ policy::BrowserPolicyConnectorChromeOS* connector =
bartfab (slow) 2015/04/29 15:21:38 Nit: #include "chrome/browser/chromeos/policy/brow
binjin 2015/04/29 17:24:42 It's already included, inside defined(OS_CHROMEOS)
+ g_browser_process->platform_part()->browser_policy_connector_chromeos();
bartfab (slow) 2015/04/29 15:21:38 Nit: #include "chrome/browser/browser_process_plat
binjin 2015/04/29 17:24:42 Done.
+ connector->GetDeviceCloudPolicyManager()
+ ->core()
+ ->remote_commands_service()
+ ->FetchRemoteCommands();
+#endif
GetPolicyService()->RefreshPolicies(
base::Bind(&PolicyUIHandler::OnRefreshPoliciesDone,
weak_factory_.GetWeakPtr()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698