Commit 6a49603a authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Remove some old confirm-to-quit code

BUG=874341
R=sky

Change-Id: I996a9f57e569acb62eec7e27f8ae0015b92d0ceb
Reviewed-on: https://chromium-review.googlesource.com/1196932Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587843}
parent 5ed9548b
...@@ -69,13 +69,13 @@ ...@@ -69,13 +69,13 @@
#import "chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h" #import "chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h"
#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h" #include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h"
#import "chrome/browser/ui/cocoa/confirm_quit.h"
#import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h" #import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h"
#include "chrome/browser/ui/cocoa/handoff_active_url_observer_bridge.h" #include "chrome/browser/ui/cocoa/handoff_active_url_observer_bridge.h"
#import "chrome/browser/ui/cocoa/history_menu_bridge.h" #import "chrome/browser/ui/cocoa/history_menu_bridge.h"
#include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h" #include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h"
#import "chrome/browser/ui/cocoa/profiles/profile_menu_controller.h" #import "chrome/browser/ui/cocoa/profiles/profile_menu_controller.h"
#import "chrome/browser/ui/cocoa/share_menu_controller.h" #import "chrome/browser/ui/cocoa/share_menu_controller.h"
#import "chrome/browser/ui/confirm_quit.h"
#include "chrome/browser/ui/extensions/application_launch.h" #include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/startup/startup_browser_creator.h" #include "chrome/browser/ui/startup/startup_browser_creator.h"
#include "chrome/browser/ui/startup/startup_browser_creator_impl.h" #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
......
...@@ -290,11 +290,7 @@ ...@@ -290,11 +290,7 @@
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h" #include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
#endif #include "chrome/browser/ui/cocoa/confirm_quit.h"
#if defined(OS_MACOSX) || defined(OS_WIN) || \
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
#include "chrome/browser/ui/confirm_quit.h"
#endif #endif
#if defined(OS_WIN) #if defined(OS_WIN)
...@@ -742,10 +738,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { ...@@ -742,10 +738,6 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
NotificationChannelsProviderAndroid::RegisterProfilePrefs(registry); NotificationChannelsProviderAndroid::RegisterProfilePrefs(registry);
#endif #endif
#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
confirm_quit::RegisterLocalState(registry);
#endif
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID)
UnifiedAutoplayConfig::RegisterProfilePrefs(registry); UnifiedAutoplayConfig::RegisterProfilePrefs(registry);
#endif #endif
......
...@@ -2336,13 +2336,6 @@ jumbo_split_static_library("ui") { ...@@ -2336,13 +2336,6 @@ jumbo_split_static_library("ui") {
} }
} }
if (is_mac || is_win || (is_linux && !is_chromeos)) {
sources += [
"confirm_quit.cc",
"confirm_quit.h",
]
}
if (is_mac) { if (is_mac) {
sources += [ sources += [
"browser_commands_mac.cc", "browser_commands_mac.cc",
...@@ -2397,6 +2390,8 @@ jumbo_split_static_library("ui") { ...@@ -2397,6 +2390,8 @@ jumbo_split_static_library("ui") {
"cocoa/chrome_style.h", "cocoa/chrome_style.h",
"cocoa/color_chooser_mac.h", "cocoa/color_chooser_mac.h",
"cocoa/color_chooser_mac.mm", "cocoa/color_chooser_mac.mm",
"cocoa/confirm_quit.cc",
"cocoa/confirm_quit.h",
"cocoa/confirm_quit_panel_controller.h", "cocoa/confirm_quit_panel_controller.h",
"cocoa/confirm_quit_panel_controller.mm", "cocoa/confirm_quit_panel_controller.mm",
"cocoa/dock_icon.h", "cocoa/dock_icon.h",
......
...@@ -1251,14 +1251,6 @@ bool CanViewSource(const Browser* browser) { ...@@ -1251,14 +1251,6 @@ bool CanViewSource(const Browser* browser) {
CanViewSource(); CanViewSource();
} }
#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
void ToggleConfirmToQuitOption(Browser* browser) {
PrefService* pref_service = browser->profile()->GetPrefs();
bool enabled = pref_service->GetBoolean(prefs::kConfirmToQuitEnabled);
pref_service->SetBoolean(prefs::kConfirmToQuitEnabled, !enabled);
}
#endif
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
void CreateBookmarkAppFromCurrentWebContents(Browser* browser) { void CreateBookmarkAppFromCurrentWebContents(Browser* browser) {
base::RecordAction(UserMetricsAction("CreateHostedApp")); base::RecordAction(UserMetricsAction("CreateHostedApp"));
......
...@@ -150,9 +150,6 @@ void CopyURL(Browser* browser); ...@@ -150,9 +150,6 @@ void CopyURL(Browser* browser);
// the tabbed Browser. // the tabbed Browser.
Browser* OpenInChrome(Browser* hosted_app_browser); Browser* OpenInChrome(Browser* hosted_app_browser);
bool CanViewSource(const Browser* browser); bool CanViewSource(const Browser* browser);
#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
void ToggleConfirmToQuitOption(Browser* browser);
#endif
void CreateBookmarkAppFromCurrentWebContents(Browser* browser); void CreateBookmarkAppFromCurrentWebContents(Browser* browser);
bool CanCreateBookmarkApp(const Browser* browser); bool CanCreateBookmarkApp(const Browser* browser);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/ui/confirm_quit.h" #include "chrome/browser/ui/cocoa/confirm_quit.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
...@@ -11,11 +11,7 @@ ...@@ -11,11 +11,7 @@
namespace confirm_quit { namespace confirm_quit {
void RecordHistogram(ConfirmQuitMetric sample) { void RecordHistogram(ConfirmQuitMetric sample) {
#if defined(OS_MACOSX)
UMA_HISTOGRAM_ENUMERATION("OSX.ConfirmToQuit", sample, kSampleCount); UMA_HISTOGRAM_ENUMERATION("OSX.ConfirmToQuit", sample, kSampleCount);
#else
UMA_HISTOGRAM_ENUMERATION("ConfirmToQuit", sample, kSampleCount);
#endif
} }
void RegisterLocalState(PrefRegistrySimple* registry) { void RegisterLocalState(PrefRegistrySimple* registry) {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_CONFIRM_QUIT_H_ #ifndef CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_H_
#define CHROME_BROWSER_UI_CONFIRM_QUIT_H_ #define CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_H_
#include "base/time/time.h" #include "base/time/time.h"
...@@ -47,4 +47,4 @@ void RegisterLocalState(PrefRegistrySimple* registry); ...@@ -47,4 +47,4 @@ void RegisterLocalState(PrefRegistrySimple* registry);
} // namespace confirm_quit } // namespace confirm_quit
#endif // CHROME_BROWSER_UI_CONFIRM_QUIT_H_ #endif // CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_H_
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/confirm_quit.h" #include "chrome/browser/ui/cocoa/confirm_quit.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_registry_simple.h"
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
#import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h" #import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h"
#include "chrome/browser/ui/cocoa/confirm_quit.h"
#import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
#include "chrome/browser/ui/confirm_quit.h"
#include "testing/gtest_mac.h" #include "testing/gtest_mac.h"
#include "ui/base/accelerators/platform_accelerator_cocoa.h" #include "ui/base/accelerators/platform_accelerator_cocoa.h"
......
...@@ -408,14 +408,11 @@ const char kContextualSearchDisabledValue[] = "false"; ...@@ -408,14 +408,11 @@ const char kContextualSearchDisabledValue[] = "false";
const char kContextualSearchEnabledValue[] = "true"; const char kContextualSearchEnabledValue[] = "true";
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
#if defined(OS_MACOSX) || defined(OS_WIN) || \ #if defined(OS_MACOSX)
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
// Boolean that indicates whether the browser should put up a confirmation // Boolean that indicates whether the browser should put up a confirmation
// window when the user is attempting to quit. Only on Mac, Windows, and Linux. // window when the user is attempting to quit. Only on Mac.
const char kConfirmToQuitEnabled[] = "browser.confirm_to_quit"; const char kConfirmToQuitEnabled[] = "browser.confirm_to_quit";
#endif
#if defined(OS_MACOSX)
// Boolean that indicates whether the browser should show the toolbar when it's // Boolean that indicates whether the browser should show the toolbar when it's
// in fullscreen. Mac only. // in fullscreen. Mac only.
const char kShowFullscreenToolbar[] = "browser.show_fullscreen_toolbar"; const char kShowFullscreenToolbar[] = "browser.show_fullscreen_toolbar";
......
...@@ -167,12 +167,9 @@ extern const char kContextualSearchEnabled[]; ...@@ -167,12 +167,9 @@ extern const char kContextualSearchEnabled[];
extern const char kContextualSearchDisabledValue[]; extern const char kContextualSearchDisabledValue[];
extern const char kContextualSearchEnabledValue[]; extern const char kContextualSearchEnabledValue[];
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
#if defined(OS_MACOSX) || defined(OS_WIN) || \
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
extern const char kConfirmToQuitEnabled[];
#endif
extern const char kShowInternalAccessibilityTree[]; extern const char kShowInternalAccessibilityTree[];
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
extern const char kConfirmToQuitEnabled[];
extern const char kShowFullscreenToolbar[]; extern const char kShowFullscreenToolbar[];
extern const char kAllowJavascriptAppleEvents[]; extern const char kAllowJavascriptAppleEvents[];
#endif #endif
......
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