| Index: chrome/browser/gtk/options/content_page_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/gtk/options/content_page_gtk.cc (revision 52180)
|
| +++ chrome/browser/gtk/options/content_page_gtk.cc (working copy)
|
| @@ -78,6 +78,7 @@
|
| 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 @@
|
| 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 @@
|
| }
|
| gtk_widget_destroy(widget);
|
| }
|
| +
|
| +void ContentPageGtk::OnPrivacyDashboardLinkClicked(GtkWidget* widget) {
|
| + BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate();
|
| +}
|
|
|