Commit 24cd3e8d authored by atwilson@chromium.org's avatar atwilson@chromium.org

Remove confirmation dialog from BackgroundModeManager.

After UI review, we decided we don't want to display a confirmation dialog if the user turns off "Let chrome run in the background" when there are no windows open. We'll just silently exit.

BUG=76828
TEST=Install background app, close all browser windows, right click status icon and uncheck "Let chrome run...", should see no confirmation dialog.

Review URL: http://codereview.chromium.org/7064009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86376 0039d316-1c4b-4281-b951-d872f2087c98
parent 7da22145
...@@ -357,9 +357,6 @@ be available for now. --> ...@@ -357,9 +357,6 @@ be available for now. -->
<message name="IDS_OPTIONS_BACKGROUND_ENABLE_BACKGROUND_MODE" desc="The label of the check-box that enables background mode"> <message name="IDS_OPTIONS_BACKGROUND_ENABLE_BACKGROUND_MODE" desc="The label of the check-box that enables background mode">
Continue running background apps when Chromium is closed Continue running background apps when Chromium is closed
</message> </message>
<message name="IDS_CONFIRM_EXIT_BACKGROUND_MODE_BODY" desc="Confirmation displayed when disabling background mode via the status tray context menu when there are no windows open">
Are you sure you want to quit Chromium? (This setting can be toggled in <ph name="ADVANCED_OPTIONS_TAB_TITLE">$1<ex>Options - Under the Hood</ex></ph>)
</message>
<message name="IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY" desc="Summary of problem displayed in dialog when we can't create a directory for this user."> <message name="IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY" desc="Summary of problem displayed in dialog when we can't create a directory for this user.">
Chromium cannot read and write to its data directory:\n\n<ph name="USER_DATA_DIRECTORY">$1<ex>C:\Documents and Settings\devint\Local Settings\Application Data\Google\Chrome</ex></ph> Chromium cannot read and write to its data directory:\n\n<ph name="USER_DATA_DIRECTORY">$1<ex>C:\Documents and Settings\devint\Local Settings\Application Data\Google\Chrome</ex></ph>
</message> </message>
......
...@@ -355,9 +355,6 @@ Chrome supports. --> ...@@ -355,9 +355,6 @@ Chrome supports. -->
<message name="IDS_OPTIONS_BACKGROUND_ENABLE_BACKGROUND_MODE" desc="The label of the check-box that enables background mode"> <message name="IDS_OPTIONS_BACKGROUND_ENABLE_BACKGROUND_MODE" desc="The label of the check-box that enables background mode">
Continue running background apps when Google Chrome is closed Continue running background apps when Google Chrome is closed
</message> </message>
<message name="IDS_CONFIRM_EXIT_BACKGROUND_MODE_BODY" desc="Confirmation displayed when disabling background mode via the status tray context menu when there are no windows open">
Are you sure you want to quit Google Chrome? (This setting can be toggled in <ph name="ADVANCED_OPTIONS_TAB_TITLE">$1<ex>Options - Under the Hood</ex></ph>)
</message>
<message name="IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY" desc="Summary of problem displayed in dialog when we can't create a directory for this user."> <message name="IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY" desc="Summary of problem displayed in dialog when we can't create a directory for this user.">
Google Chrome cannot read and write to its data directory:\n\n<ph name="USER_DATA_DIRECTORY">$1<ex>C:\Documents and Settings\devint\Local Settings\Application Data\Google\Chrome</ex></ph> Google Chrome cannot read and write to its data directory:\n\n<ph name="USER_DATA_DIRECTORY">$1<ex>C:\Documents and Settings\devint\Local Settings\Application Data\Google\Chrome</ex></ph>
</message> </message>
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "chrome/browser/background_mode_manager.h" #include "chrome/browser/background_mode_manager.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/status_icons/status_icon.h" #include "chrome/browser/status_icons/status_icon.h"
#include "chrome/browser/status_icons/status_tray.h" #include "chrome/browser/status_icons/status_tray.h"
...@@ -396,22 +395,6 @@ void BackgroundModeManager::ExecuteCommand(int item) { ...@@ -396,22 +395,6 @@ void BackgroundModeManager::ExecuteCommand(int item) {
// not be visible). // not be visible).
DCHECK(IsBackgroundModePrefEnabled()); DCHECK(IsBackgroundModePrefEnabled());
DCHECK(BrowserList::WillKeepAlive()); DCHECK(BrowserList::WillKeepAlive());
if (BrowserList::size() == 0) {
// There are no windows open - unchecking this will exit Chrome. Warn
// the user.
string16 tab_title = l10n_util::GetStringFUTF16(IDS_OPTIONS_TAB_TITLE,
l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE),
l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_TAB_LABEL));
if (!platform_util::SimpleYesNoBox(
NULL,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
l10n_util::GetStringFUTF16(
IDS_CONFIRM_EXIT_BACKGROUND_MODE_BODY,
tab_title))) {
return;
}
}
// Set the background mode pref to "disabled" - the resulting notification // Set the background mode pref to "disabled" - the resulting notification
// will result in a call to DisableBackgroundMode(). // will result in a call to DisableBackgroundMode().
......
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