Commit 167f534d authored by Robert Sesek's avatar Robert Sesek Committed by Commit Bot

mac: Remove workarounds for the MessagePump timer invalidation hack.

The CFRunLoopTimer invalidation hack has been removed from MessagePump,
so the workarounds for bugs caused by it can be removed.

Bug: 925998, 920795, 1031343
Change-Id: I0c560a5569d798b3b41f5c287b2dc36fd0fcb715
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2251746Reviewed-by: default avatarccameron <ccameron@chromium.org>
Reviewed-by: default avatarLambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779929}
parent 81a14da9
...@@ -63,12 +63,6 @@ __attribute__((visibility("default"))) int APP_SHIM_ENTRY_POINT_NAME( ...@@ -63,12 +63,6 @@ __attribute__((visibility("default"))) int APP_SHIM_ENTRY_POINT_NAME(
} // extern "C" } // extern "C"
void PostRepeatingDelayedTask() {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::BindOnce(&PostRepeatingDelayedTask),
base::TimeDelta::FromDays(1));
}
int APP_SHIM_ENTRY_POINT_NAME(const app_mode::ChromeAppModeInfo* info) { int APP_SHIM_ENTRY_POINT_NAME(const app_mode::ChromeAppModeInfo* info) {
base::CommandLine::Init(info->argc, info->argv); base::CommandLine::Init(info->argc, info->argv);
...@@ -142,14 +136,6 @@ int APP_SHIM_ENTRY_POINT_NAME(const app_mode::ChromeAppModeInfo* info) { ...@@ -142,14 +136,6 @@ int APP_SHIM_ENTRY_POINT_NAME(const app_mode::ChromeAppModeInfo* info) {
ui::WindowResizeHelperMac::Get()->Init(main_task_executor.task_runner()); ui::WindowResizeHelperMac::Get()->Init(main_task_executor.task_runner());
base::PlatformThread::SetName("CrAppShimMain"); base::PlatformThread::SetName("CrAppShimMain");
// TODO(https://crbug.com/925998): This workaround ensures that there is
// always delayed work enqueued. If there is ever not enqueued delayed work,
// then NSMenus and NSAlerts can start misbehaving (see
// https://crbug.com/920795 for examples). This workaround is not an
// appropriate solution to the problem, and should be replaced by a fix in
// the relevant message pump code.
PostRepeatingDelayedTask();
AppShimController::Params controller_params; AppShimController::Params controller_params;
// Note that |info->user_data_dir| for shims contains the app data path, // Note that |info->user_data_dir| for shims contains the app data path,
// <user_data_dir>/<profile_dir>/Web Applications/_crx_extensionid/. // <user_data_dir>/<profile_dir>/Web Applications/_crx_extensionid/.
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "remoting/base/string_resources.h" #include "remoting/base/string_resources.h"
...@@ -514,16 +513,6 @@ void PermissionWizard::Impl::OnPermissionCheckResult(bool result) { ...@@ -514,16 +513,6 @@ void PermissionWizard::Impl::OnPermissionCheckResult(bool result) {
_hasPermission = result; _hasPermission = result;
// Ugly workaround for crbug.com/1031343:
// Polling stops when permission is granted. Posting a task to execute in the
// future seems to keep the system's UI message-pump active, in order to
// render the button outlines.
// TODO(lambroslambrou): Remove this hack and fix the underlying problem.
if (_hasPermission) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::DoNothing(), base::TimeDelta::Max());
}
if (_hasPermission && _autoAdvance) { if (_hasPermission && _autoAdvance) {
// Skip showing the "Next" button, and immediately kick off a permission // Skip showing the "Next" button, and immediately kick off a permission
// check for the next page, if any. // check for the next page, if any.
......
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