summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/options/content_page_gtk.cc
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 01:29:54 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-14 01:29:54 +0000
commit6b9881e78ae0f1eaf6729058ce0e206bfddbbfc1 (patch)
treeacdd6b16c9dbe2dd8b5780b75a21ec23c650798b /chrome/browser/gtk/options/content_page_gtk.cc
parent72a4ccb9eb467966d6dea8336caa2f386f74300a (diff)
downloadchromium_src-6b9881e78ae0f1eaf6729058ce0e206bfddbbfc1.zip
chromium_src-6b9881e78ae0f1eaf6729058ce0e206bfddbbfc1.tar.gz
chromium_src-6b9881e78ae0f1eaf6729058ce0e206bfddbbfc1.tar.bz2
Privacy dashboard link on linux.
BUG=48844 TEST=run with --show-privacy-dashboard-link Review URL: http://codereview.chromium.org/2943010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/options/content_page_gtk.cc')
-rw-r--r--chrome/browser/gtk/options/content_page_gtk.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/browser/gtk/options/content_page_gtk.cc b/chrome/browser/gtk/options/content_page_gtk.cc
index 6307f15..01672d0 100644
--- a/chrome/browser/gtk/options/content_page_gtk.cc
+++ b/chrome/browser/gtk/options/content_page_gtk.cc
@@ -78,6 +78,7 @@ ContentPageGtk::ContentPageGtk(Profile* profile)
sync_start_stop_button_(NULL),
#endif
sync_customize_button_(NULL),
+ privacy_dashboard_link_(NULL),
initializing_(true),
sync_service_(NULL) {
if (profile->GetProfileSyncService()) {
@@ -393,6 +394,26 @@ GtkWidget* ContentPageGtk::InitSyncGroup() {
gtk_box_pack_start(GTK_BOX(button_hbox), sync_customize_button_, FALSE,
FALSE, 0);
+ // Add the privacy dashboard link. Only show it if the command line
+ // switch has been provided.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kShowPrivacyDashboardLink)) {
+ GtkWidget* dashboard_link_hbox =
+ gtk_hbox_new(FALSE, gtk_util::kLabelSpacing);
+ GtkWidget* dashboard_link_background = gtk_event_box_new();
+ std::string dashboard_link_label =
+ l10n_util::GetStringUTF8(IDS_SYNC_PRIVACY_DASHBOARD_LINK_LABEL);
+ privacy_dashboard_link_ =
+ gtk_chrome_link_button_new(dashboard_link_label.c_str());
+ g_signal_connect(privacy_dashboard_link_, "clicked",
+ G_CALLBACK(OnPrivacyDashboardLinkClickedThunk), this);
+ gtk_box_pack_start(GTK_BOX(vbox), dashboard_link_hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(dashboard_link_hbox),
+ dashboard_link_background, FALSE, FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(dashboard_link_background),
+ privacy_dashboard_link_);
+ }
+
return vbox;
}
@@ -618,3 +639,7 @@ void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response) {
}
gtk_widget_destroy(widget);
}
+
+void ContentPageGtk::OnPrivacyDashboardLinkClicked(GtkWidget* widget) {
+ BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate();
+}