| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 return browser_->profile()->IsOffTheRecord(); | 461 return browser_->profile()->IsOffTheRecord(); |
| 462 } | 462 } |
| 463 | 463 |
| 464 bool BrowserView::IsGuestSession() const { | 464 bool BrowserView::IsGuestSession() const { |
| 465 return browser_->profile()->IsGuestSession(); | 465 return browser_->profile()->IsGuestSession(); |
| 466 } | 466 } |
| 467 | 467 |
| 468 bool BrowserView::ShouldShowAvatar() const { | 468 bool BrowserView::ShouldShowAvatar() const { |
| 469 if (!IsBrowserTypeNormal()) | 469 if (!IsBrowserTypeNormal()) |
| 470 return false; | 470 return false; |
| 471 if (IsOffTheRecord()) | 471 if (IsOffTheRecord() && !IsGuestSession()) |
| 472 return true; | 472 return true; |
| 473 if (ManagedMode::IsInManagedMode()) | 473 if (ManagedMode::IsInManagedMode()) |
| 474 return true; | 474 return true; |
| 475 | 475 |
| 476 ProfileInfoCache& cache = | 476 ProfileInfoCache& cache = |
| 477 g_browser_process->profile_manager()->GetProfileInfoCache(); | 477 g_browser_process->profile_manager()->GetProfileInfoCache(); |
| 478 if (cache.GetIndexOfProfileWithPath(browser_->profile()->GetPath()) == | 478 if (cache.GetIndexOfProfileWithPath(browser_->profile()->GetPath()) == |
| 479 std::string::npos) { | 479 std::string::npos) { |
| 480 return false; | 480 return false; |
| 481 } | 481 } |
| (...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2639 | 2639 |
| 2640 Browser* modal_browser = | 2640 Browser* modal_browser = |
| 2641 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2641 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2642 if (modal_browser && (browser_ != modal_browser)) { | 2642 if (modal_browser && (browser_ != modal_browser)) { |
| 2643 modal_browser->window()->FlashFrame(true); | 2643 modal_browser->window()->FlashFrame(true); |
| 2644 modal_browser->window()->Activate(); | 2644 modal_browser->window()->Activate(); |
| 2645 } | 2645 } |
| 2646 | 2646 |
| 2647 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2647 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2648 } | 2648 } |
| OLD | NEW |