Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7525)

Unified Diff: chrome/browser/views/options/content_page_view.cc

Issue 2934010: Add link to privacy dashboard from sync options panel behind command line fla... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/options/content_page_view.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/views/options/content_page_view.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698