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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 1701563002: Refactor ProfileInfoCache in c/b/ui/views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index da53824b76db5e51ccc0f51a4a3e402f98fd8696..5546a034db4c8283d1cbc8dc2942894231cf0ca8 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -32,8 +32,9 @@
#include "chrome/browser/native_window_notification_source.h"
#include "chrome/browser/profiles/avatar_menu.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_attributes_entry.h"
+#include "chrome/browser/profiles/profile_attributes_storage.h"
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
-#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/profiles/profiles_state.h"
@@ -641,10 +642,9 @@ bool BrowserView::ShouldShowAvatar() const {
// Tests may not have a profile manager.
if (!g_browser_process->profile_manager())
return false;
- ProfileInfoCache& cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
- if (cache.GetIndexOfProfileWithPath(browser_->profile()->GetPath()) ==
- std::string::npos) {
+ ProfileAttributesEntry* entry;
+ if (!g_browser_process->profile_manager()->GetProfileAttributesStorage().
+ GetProfileAttributesWithPath(browser_->profile()->GetPath(), &entry)) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698