diff --git a/src/chrome/browser/background/background_mode_manager.cc b/src/chrome/browser/background/background_mode_manager.cc index 55d7b46c..c4c4a327 100644 --- a/src/chrome/browser/background/background_mode_manager.cc +++ b/src/chrome/browser/background/background_mode_manager.cc @@ -24,7 +24,6 @@ #include "base/metrics/user_metrics.h" #include "base/one_shot_event.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/single_thread_task_runner.h" #include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -372,11 +371,6 @@ BackgroundModeManager::~BackgroundModeManager() { // static void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) { -#if BUILDFLAG(IS_MAC) - registry->RegisterBooleanPref(prefs::kUserRemovedLoginItem, false); - registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false); - registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false); -#endif registry->RegisterBooleanPref(prefs::kBackgroundModeEnabled, false); } @@ -439,9 +433,11 @@ void BackgroundModeManager::LaunchBackgroundApplication( #if !BUILDFLAG(IS_CHROMEOS) apps::AppServiceProxyFactory::GetForProfile(profile) ->BrowserAppLauncher() - ->LaunchAppWithParams(CreateAppLaunchParamsUserContainer( - profile, extension, WindowOpenDisposition::NEW_FOREGROUND_TAB, - apps::LaunchSource::kFromBackgroundMode)); + ->LaunchAppWithParams( + CreateAppLaunchParamsUserContainer( + profile, extension, WindowOpenDisposition::NEW_FOREGROUND_TAB, + apps::LaunchSource::kFromBackgroundMode), + base::DoNothing()); #else // background mode is not used in Chrome OS platform. // TODO(crbug.com/1291803): Remove the background mode manager from Chrome OS @@ -874,6 +870,8 @@ void BackgroundModeManager::UpdateEnableLaunchOnStartup() { EnableLaunchOnStartup(*launch_on_startup_enabled_); } +namespace { + // Gets the image for the status tray icon, at the correct size for the current // platform and display settings. gfx::ImageSkia GetStatusTrayIcon() { @@ -906,6 +904,8 @@ gfx::ImageSkia GetStatusTrayIcon() { #endif } +} // namespace + void BackgroundModeManager::CreateStatusTrayIcon() { // Only need status icons on windows/linux. ChromeOS doesn't allow exiting // Chrome and Mac can use the dock icon instead.