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

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 c44d589408f9452d3fc4ea6f093d5ca054ef080c..2d42fafb877f7ff40e7295e198575b0c76b6cf9e 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"
@@ -38,18 +37,16 @@ BrowserNonClientFrameView::BrowserNonClientFrameView(BrowserFrame* frame,
avatar_button_(nullptr) {
achuithb 2016/02/19 11:55:22 nit: initialize this in header
lwchkg 2016/02/19 15:00:10 Normally your suggestion is the better solution. B
achuithb 2016/02/19 15:06:18 Personally I'm fine with this provided you leave a
lwchkg 2016/02/19 16:46:04 Appears that someone has patched away the #if bloc
// 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);
}
}
@@ -259,9 +256,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

Powered by Google App Engine
This is Rietveld 408576698