Chromium Code Reviews| Index: chrome/browser/cocoa/preferences_window_controller.mm |
| =================================================================== |
| --- chrome/browser/cocoa/preferences_window_controller.mm (revision 52138) |
| +++ chrome/browser/cocoa/preferences_window_controller.mm (working copy) |
| @@ -47,6 +47,7 @@ |
| #include "chrome/browser/sync/profile_sync_service.h" |
| #include "chrome/browser/sync/sync_ui_util.h" |
| #include "chrome/browser/tab_contents/tab_contents.h" |
| +#include "chrome/common/chrome_switches.h" |
| #include "chrome/common/notification_details.h" |
| #include "chrome/common/notification_observer.h" |
| #include "chrome/common/notification_type.h" |
| @@ -1274,6 +1275,15 @@ |
| } |
| } |
| +// Called when the user clicks on the link to the privacy dashboard. |
| +- (IBAction)showPrivacyDashboard:(id)sender { |
| + Browser* browser = BrowserList::GetLastActive(); |
| + |
| + if (!browser || !browser->GetSelectedTabContents()) |
| + browser = Browser::Create(profile_); |
| + browser->OpenPrivacyDashboardTabAndActivate(); |
| +} |
| + |
| // Called when the user clicks the "Customize Sync" button in the |
| // "Personal Stuff" pane. Spawns a dialog-modal sheet that cleans |
| // itself up on close. |
| @@ -1750,6 +1760,10 @@ |
| [syncStatus_ setBackgroundColor:syncStatusNoErrorBackgroundColor_]; |
| [syncLinkCell setBackgroundColor:syncLinkNoErrorBackgroundColor_]; |
| } |
| + |
|
akalin
2010/07/13 23:06:12
Add comment re. this leaving a space if there's no
|
| + if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kShowPrivacyDashboardLink)) |
| + [privacyDashboardLink_ setHidden:YES]; |
| } |
| // Show the preferences window. |