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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 6293018: Fix DOMUI pref mode handling of Mac menu items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fix Created 9 years, 11 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 | « no previous file | chrome/browser/sync/sync_ui_util.h » ('j') | chrome/browser/sync/sync_ui_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 058ed166f5b564cf2c596ba49f4b0b17d609f76d..7fcb9fd62a73b2379a7b27ee6658f784c9018b43 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -848,15 +848,33 @@ void RecordLastRunAppBundlePath() {
break;
case IDC_CLEAR_BROWSING_DATA: {
// There may not be a browser open, so use the default profile.
- [ClearBrowsingDataController
- showClearBrowsingDialogForProfile:defaultProfile];
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableTabbedOptions)) {
+ [ClearBrowsingDataController
+ showClearBrowsingDialogForProfile:defaultProfile];
+ } else {
+ if (Browser* browser = ActivateBrowser(defaultProfile)) {
+ browser->OpenClearBrowsingDataDialog();
+ } else {
+ Browser::OpenClearBrowingDataDialogWindow(defaultProfile);
+ }
+ }
break;
}
case IDC_IMPORT_SETTINGS: {
- UserMetrics::RecordAction(UserMetricsAction("Import_ShowDlg"),
- defaultProfile);
- [ImportSettingsDialogController
- showImportSettingsDialogForProfile:defaultProfile];
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableTabbedOptions)) {
+ UserMetrics::RecordAction(UserMetricsAction("Import_ShowDlg"),
+ defaultProfile);
+ [ImportSettingsDialogController
+ showImportSettingsDialogForProfile:defaultProfile];
+ } else {
+ if (Browser* browser = ActivateBrowser(defaultProfile)) {
+ browser->OpenClearBrowsingDataDialog();
csilv 2011/01/25 00:33:50 Should be calling OpenImportSettingsDialog();
stuartmorgan 2011/01/25 01:08:43 Whoops! Apparently I wasn't looking carefully at t
+ } else {
+ Browser::OpenClearBrowingDataDialogWindow(defaultProfile);
csilv 2011/01/25 00:33:50 Should be calling OpenImportSettingsDialogWindow()
stuartmorgan 2011/01/25 01:08:43 Done.
+ }
+ }
break;
}
case IDC_SHOW_BOOKMARK_MANAGER:
@@ -905,7 +923,7 @@ void RecordLastRunAppBundlePath() {
[controller runModalDialog];
break;
}
- case IDC_SYNC_BOOKMARKS:
+ case IDC_SYNC_BOOKMARKS: {
csilv 2011/01/25 00:33:50 Any particular reason for adding the brackets to t
stuartmorgan 2011/01/25 01:08:43 It's cruft from an earlier iteration of the change
// The profile may be NULL during shutdown -- see
// http://code.google.com/p/chromium/issues/detail?id=43048 .
//
@@ -918,8 +936,10 @@ void RecordLastRunAppBundlePath() {
// TODO(akalin): Add a constant to denote starting sync from the
// main menu and use that instead of START_FROM_WRENCH.
sync_ui_util::OpenSyncMyBookmarksDialog(
- defaultProfile, ProfileSyncService::START_FROM_WRENCH);
+ defaultProfile, ActivateBrowser(defaultProfile),
+ ProfileSyncService::START_FROM_WRENCH);
break;
+ }
case IDC_TASK_MANAGER:
UserMetrics::RecordAction(UserMetricsAction("TaskManager"),
defaultProfile);
« no previous file with comments | « no previous file | chrome/browser/sync/sync_ui_util.h » ('j') | chrome/browser/sync/sync_ui_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698