Chromium Code Reviews| 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..9c23385765c04c36c68531bbd8890dd3a3930d25 100644 |
| --- a/chrome/browser/ui/webui/policy_ui.cc |
| +++ b/chrome/browser/ui/webui/policy_ui.cc |
| @@ -16,6 +16,7 @@ |
| #include "base/time/time.h" |
| #include "base/values.h" |
| #include "chrome/browser/browser_process.h" |
| +#include "chrome/browser/browser_process_platform_part.h" |
|
bartfab (slow)
2015/04/29 17:27:54
Nit: You only need this #if defined(OS_CHROMEOS)
binjin
2015/04/29 17:32:13
Done.
|
| #include "chrome/browser/policy/profile_policy_connector.h" |
| #include "chrome/browser/policy/profile_policy_connector_factory.h" |
| #include "chrome/browser/policy/schema_registry_service.h" |
| @@ -36,6 +37,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 +809,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 |
| + // service is landed and tested. http://crbug.com/480982 |
| + policy::BrowserPolicyConnectorChromeOS* connector = |
| + g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| + connector->GetDeviceCloudPolicyManager() |
| + ->core() |
| + ->remote_commands_service() |
| + ->FetchRemoteCommands(); |
| +#endif |
| GetPolicyService()->RefreshPolicies( |
| base::Bind(&PolicyUIHandler::OnRefreshPoliciesDone, |
| weak_factory_.GetWeakPtr())); |