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

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

Issue 33753002: Sooper experimental refactoring of the profile info cache. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 1 month 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 } 603 }
604 #else 604 #else
605 if (IsOffTheRecord()) // Desktop guest is incognito and needs avatar. 605 if (IsOffTheRecord()) // Desktop guest is incognito and needs avatar.
606 return true; 606 return true;
607 #endif 607 #endif
608 // Tests may not have a profile manager. 608 // Tests may not have a profile manager.
609 if (!g_browser_process->profile_manager()) 609 if (!g_browser_process->profile_manager())
610 return false; 610 return false;
611 ProfileInfoCache& cache = 611 ProfileInfoCache& cache =
612 g_browser_process->profile_manager()->GetProfileInfoCache(); 612 g_browser_process->profile_manager()->GetProfileInfoCache();
613 if (cache.GetIndexOfProfileWithPath(browser_->profile()->GetPath()) == 613
614 std::string::npos) { 614 ProfileInfoEntry entry;
615 if (!cache.GetInfoForProfile(browser_->profile()->GetPath(), &entry))
615 return false; 616 return false;
616 }
617 617
618 return AvatarMenu::ShouldShowAvatarMenu(); 618 return AvatarMenu::ShouldShowAvatarMenu();
619 } 619 }
620 620
621 bool BrowserView::GetAccelerator(int cmd_id, ui::Accelerator* accelerator) { 621 bool BrowserView::GetAccelerator(int cmd_id, ui::Accelerator* accelerator) {
622 // We retrieve the accelerator information for standard accelerators 622 // We retrieve the accelerator information for standard accelerators
623 // for cut, copy and paste. 623 // for cut, copy and paste.
624 if (chrome::GetStandardAcceleratorForCommandId(cmd_id, accelerator)) 624 if (chrome::GetStandardAcceleratorForCommandId(cmd_id, accelerator))
625 return true; 625 return true;
626 // Else, we retrieve the accelerator information from the accelerator table. 626 // Else, we retrieve the accelerator information from the accelerator table.
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2706 // The +1 in the next line creates a 1-px gap between icon and arrow tip. 2706 // The +1 in the next line creates a 1-px gap between icon and arrow tip.
2707 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() - 2707 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() -
2708 LocationBarView::kIconInternalPadding + 1); 2708 LocationBarView::kIconInternalPadding + 1);
2709 ConvertPointToTarget(location_icon_view, this, &icon_bottom); 2709 ConvertPointToTarget(location_icon_view, this, &icon_bottom);
2710 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2710 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2711 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2711 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2712 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2712 top_arrow_height = infobar_top.y() - icon_bottom.y();
2713 } 2713 }
2714 return top_arrow_height; 2714 return top_arrow_height;
2715 } 2715 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view.cc ('k') | chrome/browser/ui/views/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698