Index: chrome/browser/ui/views/frame/browser_view_layout.cc |
diff --git a/chrome/browser/ui/views/frame/browser_view_layout.cc b/chrome/browser/ui/views/frame/browser_view_layout.cc |
index 08d7769837f299ba8524c2c974d358f89bbd2f2e..0034f4bd3c851862695ee17f57b5394b1984916d 100644 |
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc |
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/ui/views/frame/browser_view_layout.h" |
+#include "chrome/browser/ui/browser_finder.h" |
#include "chrome/browser/ui/find_bar/find_bar.h" |
#include "chrome/browser/ui/find_bar/find_bar_controller.h" |
#include "chrome/browser/ui/view_ids.h" |
@@ -319,11 +320,15 @@ int BrowserViewLayout::LayoutTabStripRegion() { |
// The metro window switcher sits at the far right edge of the tabstrip |
// a |kWindowSwitcherOffsetX| pixels from the right edge. |
- // Only visible if there is an incognito window because switching between |
- // regular and incognito windows is the only use case that works right now. |
+ // Only visible if there is both an incognito window AND a regular window |
+ // because switching between regular and incognito windows is the only use |
+ // case that works right now. |
Peter Kasting
2012/08/24 22:19:32
Nit: Is there some sort of applicable "TODO: Expan
|
views::Button* switcher_button = browser_view_->window_switcher_button_; |
if (switcher_button) { |
- if (browser_view_->browser()->profile()->HasOffTheRecordProfile()) { |
+ if (browser_view_->browser()->profile()->HasOffTheRecordProfile() && |
Peter Kasting
2012/08/24 22:19:32
Nit: Switch all "browser_view_->browser()" calls t
|
+ browser::FindBrowserWithProfile( |
+ browser_view_->browser()->profile()->GetOriginalProfile(), |
+ browser_view_->browser()->host_desktop_type()) != NULL) { |
switcher_button->SetVisible(true); |
int width = browser_view_->width(); |
gfx::Size ps = switcher_button->GetPreferredSize(); |