Index: chrome/browser/views/options/content_page_view.cc |
=================================================================== |
--- chrome/browser/views/options/content_page_view.cc (revision 52010) |
+++ chrome/browser/views/options/content_page_view.cc (working copy) |
@@ -73,6 +73,7 @@ |
sync_status_label_(NULL), |
sync_start_stop_button_(NULL), |
sync_customize_button_(NULL), |
+ privacy_dashboard_link_(NULL), |
sync_service_(NULL), |
OptionsPageView(profile) { |
if (profile->GetProfileSyncService()) { |
@@ -168,9 +169,16 @@ |
BrowserList::GetLastActive()->OpenThemeGalleryTabAndActivate(); |
return; |
} |
- DCHECK_EQ(source, sync_action_link_); |
- DCHECK(sync_service_); |
- sync_service_->ShowLoginDialog(); |
+ if (source == sync_action_link_) { |
+ DCHECK(sync_service_); |
+ sync_service_->ShowLoginDialog(); |
+ return; |
+ } |
+ if (source == privacy_dashboard_link_) { |
+ BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); |
+ return; |
+ } |
+ NOTREACHED() << "Invalid link source."; |
} |
//////////////////////////////////////////////////////////////////////////////// |
@@ -431,6 +439,15 @@ |
sync_action_link_->set_collapse_when_hidden(true); |
sync_action_link_->SetController(this); |
+ privacy_dashboard_link_ = new views::Link(); |
+ privacy_dashboard_link_->set_collapse_when_hidden(true); |
+ privacy_dashboard_link_->SetController(this); |
+ privacy_dashboard_link_->SetText( |
+ l10n_util::GetString(IDS_SYNC_PRIVACY_DASHBOARD_LINK_LABEL)); |
+ privacy_dashboard_link_->SetVisible( |
+ CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kShowPrivacyDashboardLink)); |
+ |
sync_start_stop_button_ = new views::NativeButton(this, std::wstring()); |
sync_customize_button_ = new views::NativeButton(this, std::wstring()); |
@@ -458,6 +475,9 @@ |
layout->StartRow(0, single_column_view_set_id); |
layout->AddView(sync_start_stop_button_); |
layout->AddView(sync_customize_button_); |
+ layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
+ layout->StartRow(0, single_column_view_set_id); |
+ layout->AddView(privacy_dashboard_link_, 3, 1); |
sync_group_ = new OptionsGroupView(contents, |
l10n_util::GetString(IDS_SYNC_OPTIONS_GROUP_NAME), std::wstring(), true); |