Commit 1e9a6599 authored by Marijn Kruisselbrink's avatar Marijn Kruisselbrink Committed by Commit Bot

Revert "Policy WebUI: 'Reload Policies' button reloads google update policies"

This reverts commit e0309342.

Reason for revert: doesn't compile on for example https://ci.chromium.org/p/chrome/builders/ci/win-chrome/14113

../../chrome/browser/ui/webui/policy_ui_handler.cc(1298,30): error: no viable overloaded '='
updater_status_provider_ = std::make_unique<UpdaterStatusProvider>();
~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../buildtools/third_party/libc++/trunk/include\memory(2551,15): note: candidate function not viable: 'this' argument has type 'const std::unique_ptr<PolicyStatusProvider>', but method is not marked const


Original change's description:
> Policy WebUI: 'Reload Policies' button reloads google update policies
> 
> Bug: 1119703
> Change-Id: Ib91b37dc1da4f06782caea7b67ecc6d0c8c87b2d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367673
> Commit-Queue: Yann Dago <ydago@chromium.org>
> Reviewed-by: Owen Min <zmin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#802644}

TBR=zmin@chromium.org,ydago@chromium.org

Change-Id: I6c3b3bb79801e5aae68ab97f5ba79e5b8d10509a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1119703
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2381300Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802668}
parent e71c95b8
...@@ -895,7 +895,15 @@ void PolicyUIHandler::RegisterMessages() { ...@@ -895,7 +895,15 @@ void PolicyUIHandler::RegisterMessages() {
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
#if defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) #if defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
ReloadUpdaterPolicies(); updater_status_provider_ = std::make_unique<UpdaterStatusProvider>();
base::PostTaskAndReplyWithResult(
base::ThreadPool::CreateCOMSTATaskRunner(
{base::TaskPriority::USER_BLOCKING,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN, base::MayBlock()})
.get(),
FROM_HERE, base::BindOnce(&GetGoogleUpdatePolicies),
base::BindOnce(&PolicyUIHandler::SetUpdaterPolicies,
weak_factory_.GetWeakPtr()));
#endif // defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
if (!user_status_provider_.get()) if (!user_status_provider_.get())
...@@ -1177,11 +1185,6 @@ void PolicyUIHandler::HandleReloadPolicies(const base::ListValue* args) { ...@@ -1177,11 +1185,6 @@ void PolicyUIHandler::HandleReloadPolicies(const base::ListValue* args) {
} }
} }
#endif #endif
#if defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
ReloadUpdaterPolicies();
#endif // defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
GetPolicyService()->RefreshPolicies(base::BindOnce( GetPolicyService()->RefreshPolicies(base::BindOnce(
&PolicyUIHandler::OnRefreshPoliciesDone, weak_factory_.GetWeakPtr())); &PolicyUIHandler::OnRefreshPoliciesDone, weak_factory_.GetWeakPtr()));
} }
...@@ -1292,20 +1295,6 @@ void PolicyUIHandler::SetUpdaterPolicies( ...@@ -1292,20 +1295,6 @@ void PolicyUIHandler::SetUpdaterPolicies(
if (updater_policies_) if (updater_policies_)
SendPolicies(); SendPolicies();
} }
void PolicyUIHandler::ReloadUpdaterPolicies() const {
if (!updater_status_provider_)
updater_status_provider_ = std::make_unique<UpdaterStatusProvider>();
base::PostTaskAndReplyWithResult(
base::ThreadPool::CreateCOMSTATaskRunner(
{base::TaskPriority::USER_BLOCKING,
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN, base::MayBlock()})
.get(),
FROM_HERE, base::BindOnce(&GetGoogleUpdatePolicies),
base::BindOnce(&PolicyUIHandler::SetUpdaterPolicies,
weak_factory_.GetWeakPtr()));
}
#endif // defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
void PolicyUIHandler::OnRefreshPoliciesDone() { void PolicyUIHandler::OnRefreshPoliciesDone() {
......
...@@ -100,8 +100,6 @@ class PolicyUIHandler : public content::WebUIMessageHandler, ...@@ -100,8 +100,6 @@ class PolicyUIHandler : public content::WebUIMessageHandler,
// Sets |updater_policies_| in this instance and refreshes the UI via // Sets |updater_policies_| in this instance and refreshes the UI via
// SendPolicies. // SendPolicies.
void SetUpdaterPolicies(std::unique_ptr<policy::PolicyMap> updater_policies); void SetUpdaterPolicies(std::unique_ptr<policy::PolicyMap> updater_policies);
void ReloadUpdaterPolicies() const;
#endif // defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
// Send the status of cloud policy to the UI. For each scope that has cloud // Send the status of cloud policy to the UI. For each scope that has cloud
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment