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

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: Address review comments 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') | no next file with comments »
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..c77d3f3cfec589f2ab0d46102e7205c2e24a0b2a 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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->OpenImportSettingsDialog();
+ } else {
+ Browser::OpenImportSettingsDialogWindow(defaultProfile);
+ }
+ }
break;
}
case IDC_SHOW_BOOKMARK_MANAGER:
@@ -918,7 +936,8 @@ 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"),
« no previous file with comments | « no previous file | chrome/browser/sync/sync_ui_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698