summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcsilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 00:41:39 +0000
committercsilv@chromium.org <csilv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 00:41:39 +0000
commitd0c8d6f9c624cdced5b1f2531aac4553ad0686ef (patch)
treeaad0a773887bf202c3eeaab1821dee6c5ca3a142
parentd6d04478b20f1f43748ebe5f803205ce06a69288 (diff)
downloadchromium_src-d0c8d6f9c624cdced5b1f2531aac4553ad0686ef.zip
chromium_src-d0c8d6f9c624cdced5b1f2531aac4553ad0686ef.tar.gz
chromium_src-d0c8d6f9c624cdced5b1f2531aac4553ad0686ef.tar.bz2
Remove the 'restart required' alert when enabling the metrics reporting option, the alert is obsolete.
BUG=none TEST=Green tree and no 'restart required' alerts when enabling metrics in Chrome builds. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68919 Review URL: http://codereview.chromium.org/4778002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69206 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/dom_ui/options/advanced_options_handler.cc13
-rw-r--r--chrome/browser/dom_ui/options/advanced_options_handler.h2
-rw-r--r--chrome/browser/gtk/options/advanced_contents_gtk.cc22
-rw-r--r--chrome/browser/resources/options/advanced_options.js15
-rw-r--r--chrome/browser/ui/views/options/advanced_contents_view.cc3
5 files changed, 6 insertions, 49 deletions
diff --git a/chrome/browser/dom_ui/options/advanced_options_handler.cc b/chrome/browser/dom_ui/options/advanced_options_handler.cc
index 0903dd2..be4c788 100644
--- a/chrome/browser/dom_ui/options/advanced_options_handler.cc
+++ b/chrome/browser/dom_ui/options/advanced_options_handler.cc
@@ -179,13 +179,11 @@ void AdvancedOptionsHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_OPTIONS_RESET_OKLABEL));
localized_strings->SetString("optionsResetCancelLabel",
l10n_util::GetStringUTF16(IDS_OPTIONS_RESET_CANCELLABEL));
- localized_strings->SetString("optionsRestartRequired",
- l10n_util::GetStringUTF16(IDS_OPTIONS_RESTART_REQUIRED));
}
void AdvancedOptionsHandler::Initialize() {
DCHECK(dom_ui_);
- SetupMetricsReportingCheckbox(false);
+ SetupMetricsReportingCheckbox();
SetupMetricsReportingSettingVisibility();
SetupDefaultZoomLevel();
SetupDownloadLocationPath();
@@ -356,9 +354,7 @@ void AdvancedOptionsHandler::HandleMetricsReportingCheckbox(
UserMetricsAction("Options_MetricsReportingCheckbox_Disable"));
bool is_enabled = OptionsUtil::ResolveMetricsReportingEnabled(enabled);
enable_metrics_recording_.SetValue(is_enabled);
-
- bool user_changed = (enabled == is_enabled);
- SetupMetricsReportingCheckbox(user_changed);
+ SetupMetricsReportingCheckbox();
#endif
}
@@ -480,14 +476,13 @@ void AdvancedOptionsHandler::SetupCloudPrintProxySection() {
}
#endif
-void AdvancedOptionsHandler::SetupMetricsReportingCheckbox(bool user_changed) {
+void AdvancedOptionsHandler::SetupMetricsReportingCheckbox() {
#if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS)
FundamentalValue checked(enable_metrics_recording_.GetValue());
FundamentalValue disabled(enable_metrics_recording_.IsManaged());
- FundamentalValue user_has_changed(user_changed);
dom_ui_->CallJavascriptFunction(
L"options.AdvancedOptions.SetMetricsReportingCheckboxState", checked,
- disabled, user_has_changed);
+ disabled);
#endif
}
diff --git a/chrome/browser/dom_ui/options/advanced_options_handler.h b/chrome/browser/dom_ui/options/advanced_options_handler.h
index f58f94b..d75d358 100644
--- a/chrome/browser/dom_ui/options/advanced_options_handler.h
+++ b/chrome/browser/dom_ui/options/advanced_options_handler.h
@@ -115,7 +115,7 @@ class AdvancedOptionsHandler
#endif
// Setup the checked state for the metrics reporting checkbox.
- void SetupMetricsReportingCheckbox(bool user_changed);
+ void SetupMetricsReportingCheckbox();
// Setup the visibility for the metrics reporting setting.
void SetupMetricsReportingSettingVisibility();
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc
index 704f545..21fe182 100644
--- a/chrome/browser/gtk/options/advanced_contents_gtk.cc
+++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc
@@ -614,10 +614,6 @@ class PrivacySection : public OptionsPageBase {
// permission match the |reporting_enabled_checkbox_|.
void ResolveMetricsReportingEnabled();
- // Inform the user that the browser must be restarted for changes to take
- // effect.
- void ShowRestartMessageBox() const;
-
// The callback functions for the options widgets.
static void OnContentSettingsClicked(GtkButton* button,
PrivacySection* privacy_section);
@@ -871,8 +867,6 @@ void PrivacySection::OnLoggingChange(GtkWidget* widget,
reinterpret_cast<gpointer>(OnLoggingChange),
privacy_section);
privacy_section->ResolveMetricsReportingEnabled();
- if (enabled == gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
- privacy_section->ShowRestartMessageBox();
g_signal_handlers_unblock_by_func(widget,
reinterpret_cast<gpointer>(OnLoggingChange),
privacy_section);
@@ -939,22 +933,6 @@ void PrivacySection::ResolveMetricsReportingEnabled() {
#endif
}
-void PrivacySection::ShowRestartMessageBox() const {
- GtkWidget* dialog = gtk_message_dialog_new(
- GTK_WINDOW(gtk_widget_get_toplevel(page_)),
- static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL),
- GTK_MESSAGE_INFO,
- GTK_BUTTONS_OK,
- "%s",
- l10n_util::GetStringUTF8(IDS_OPTIONS_RESTART_REQUIRED).c_str());
- gtk_util::ApplyMessageDialogQuirks(dialog);
- gtk_window_set_title(GTK_WINDOW(dialog),
- l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str());
- g_signal_connect_swapped(dialog, "response", G_CALLBACK(gtk_widget_destroy),
- dialog);
- gtk_util::ShowDialog(dialog);
-}
-
///////////////////////////////////////////////////////////////////////////////
// SecuritySection
diff --git a/chrome/browser/resources/options/advanced_options.js b/chrome/browser/resources/options/advanced_options.js
index f8b1da1..e298ef1 100644
--- a/chrome/browser/resources/options/advanced_options.js
+++ b/chrome/browser/resources/options/advanced_options.js
@@ -140,16 +140,6 @@ var OptionsPage = options.OptionsPage;
chrome.send('showCloudPrintManagePage');
};
}
- },
-
- /**
- * Show a 'restart required' alert.
- * @private
- */
- showRestartRequiredAlert_: function() {
- AlertOverlay.show(undefined,
- localStrings.getString('optionsRestartRequired'),
- undefined, '', undefined);
}
};
@@ -159,14 +149,11 @@ var OptionsPage = options.OptionsPage;
// Set the checked state of the metrics reporting checkbox.
AdvancedOptions.SetMetricsReportingCheckboxState = function(
- checked, disabled, user_changed) {
+ checked, disabled) {
$('metricsReportingEnabled').checked = checked;
$('metricsReportingEnabled').disabled = disabled;
if (disabled)
$('metricsReportingEnabledText').className = 'disable-services-span';
-
- if (user_changed)
- AdvancedOptions.getInstance().showRestartRequiredAlert_();
}
AdvancedOptions.SetMetricsReportingSettingVisibility = function(visible) {
diff --git a/chrome/browser/ui/views/options/advanced_contents_view.cc b/chrome/browser/ui/views/options/advanced_contents_view.cc
index 7322f3a..e6588aa 100644
--- a/chrome/browser/ui/views/options/advanced_contents_view.cc
+++ b/chrome/browser/ui/views/options/advanced_contents_view.cc
@@ -46,7 +46,6 @@
#include "chrome/browser/ui/views/list_background.h"
#include "chrome/browser/ui/views/options/content_settings_window_view.h"
#include "chrome/browser/ui/views/options/fonts_languages_window_view.h"
-#include "chrome/browser/ui/views/restart_message_box.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -524,8 +523,6 @@ void PrivacySection::ButtonPressed(
"Options_MetricsReportingCheckbox_Disable"),
profile()->GetPrefs());
ResolveMetricsReportingEnabled();
- if (enabled == reporting_enabled_checkbox_->checked())
- RestartMessageBox::ShowMessageBox(GetWindow()->GetNativeWindow());
enable_metrics_recording_.SetValue(enabled);
} else if (sender == content_settings_button_) {
UserMetricsRecordAction(UserMetricsAction("Options_ContentSettings"), NULL);