diff options
author | pkasting@google.com <pkasting@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 22:40:08 +0000 |
---|---|---|
committer | pkasting@google.com <pkasting@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 22:40:08 +0000 |
commit | fc9656edd36841cfb69c10539209b59872042513 (patch) | |
tree | b8e118ad4833ba1de3a67ec4f99d0f427ec2fbb0 | |
parent | cb5d17f2f5c9d4a9777439f58e4a7f6eb049e26f (diff) | |
download | chromium_src-fc9656edd36841cfb69c10539209b59872042513.zip chromium_src-fc9656edd36841cfb69c10539209b59872042513.tar.gz chromium_src-fc9656edd36841cfb69c10539209b59872042513.tar.bz2 |
Simple change to make the "New [incognito] window" commands work like you'd expect.
The old behavior disabled "New incognito window" when in incognito windows, created a new incognito tab instead of a new window when you already had an incognito window open, and gave you no way to get a non-incognito window from an incognito one.
Now, both commands are always enabled, and both do exactly what they say they'll do no matter what type of window you're currently in.
BUG=1190035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/browser.cc | 3 | ||||
-rw-r--r-- | chrome/browser/browser_commands.cc | 8 |
2 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 72f5afd..be59357 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -863,9 +863,6 @@ void Browser::UpdateNavigationCommands() { controller_.UpdateCommandEnabled(IDC_PRINT, web_contents != NULL); controller_.UpdateCommandEnabled(IDC_DUPLICATE, CanDuplicateContentsAt(selected_index())); - - controller_.UpdateCommandEnabled(IDC_GOOFFTHERECORD, - profile_->GetOffTheRecordProfile() != profile_); } // Notification that the starredness of a tab changed. diff --git a/chrome/browser/browser_commands.cc b/chrome/browser/browser_commands.cc index 974a4f3..2489b9d 100644 --- a/chrome/browser/browser_commands.cc +++ b/chrome/browser/browser_commands.cc @@ -144,7 +144,7 @@ void Browser::InitCommandState() { controller_.UpdateCommandEnabled(IDC_PRINT, true); controller_.UpdateCommandEnabled(IDC_COPY_URL, true); controller_.UpdateCommandEnabled(IDC_DUPLICATE, true); - controller_.UpdateCommandEnabled(IDC_GOOFFTHERECORD, false); + controller_.UpdateCommandEnabled(IDC_GOOFFTHERECORD, true); controller_.UpdateCommandEnabled(IDC_VIEW_PASSWORDS, true); controller_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true); controller_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, true); @@ -357,7 +357,8 @@ void Browser::ExecuteCommand(int id) { case IDC_NEWWINDOW: UserMetrics::RecordAction(L"NewWindow", profile_); - Browser::OpenNewBrowserWindow(profile_, SW_SHOWNORMAL); + Browser::OpenNewBrowserWindow(profile_->GetOriginalProfile(), + SW_SHOWNORMAL); break; case IDC_CLOSEWINDOW: @@ -523,7 +524,8 @@ void Browser::ExecuteCommand(int id) { } case IDC_GOOFFTHERECORD: { - Browser::OpenURLOffTheRecord(profile_, NewTabUIURL()); + Browser::OpenNewBrowserWindow(profile_->GetOffTheRecordProfile(), + SW_SHOWNORMAL); break; } |