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

Unified Diff: chrome/browser/ui/views/frame/browser_non_client_frame_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_non_client_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
index 9d3082a9a9871e00a022e492bf8a926736fe6fda..d9ca861cf5d7231efd800f95b16bb33d01c02abe 100644
--- a/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
+++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/profiles/avatar_menu.h"
#include "chrome/browser/profiles/profile.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/profiles_state.h"
#include "chrome/browser/themes/theme_properties.h"
@@ -31,22 +30,19 @@
BrowserNonClientFrameView::BrowserNonClientFrameView(BrowserFrame* frame,
BrowserView* browser_view)
: frame_(frame),
- browser_view_(browser_view),
- avatar_button_(nullptr) {
+ browser_view_(browser_view) {
// The profile manager may by null in tests.
if (g_browser_process->profile_manager()) {
- ProfileInfoCache& cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
- cache.AddObserver(this);
+ g_browser_process->profile_manager()->
+ GetProfileAttributesStorage().AddObserver(this);
}
}
BrowserNonClientFrameView::~BrowserNonClientFrameView() {
// The profile manager may by null in tests.
if (g_browser_process->profile_manager()) {
- ProfileInfoCache& cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
- cache.RemoveObserver(this);
+ g_browser_process->profile_manager()->
+ GetProfileAttributesStorage().RemoveObserver(this);
}
}
@@ -233,9 +229,9 @@ void BrowserNonClientFrameView::UpdateTaskbarDecoration() {
// In tests, make sure that the browser process and profile manager are
// valid before using.
if (g_browser_process && g_browser_process->profile_manager()) {
- const ProfileInfoCache& cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
- show_decoration = show_decoration && cache.GetNumberOfProfiles() > 1;
+ const ProfileAttributesStorage& storage =
+ g_browser_process->profile_manager()->GetProfileAttributesStorage();
+ show_decoration = show_decoration && storage.GetNumberOfProfiles() > 1;
}
chrome::DrawTaskbarDecoration(frame_->GetNativeWindow(),
show_decoration
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698