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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10918215: Refresh Guest session UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698