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

Unified Diff: chrome/browser/ui/webui/settings/people_handler.cc

Issue 1723643002: Refactor ProfileInfoCache in c/b/ui/webui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a signed/unsigned integer conversion, one removed #include 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/webui/settings/people_handler.cc
diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
index 009cb31ad64336d92e0dd1c619f6d69d3e6d55d5..09539ce5c75759d98608ba6746eb07178fa4e2b1 100644
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -19,8 +19,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_attributes_entry.h"
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
-#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/signin/chrome_signin_helper.h"
@@ -183,10 +183,9 @@ void GetAccountNameAndIcon(const Profile& profile,
chromeos::options::UserImageSource::GetUserImage(account_id);
*icon_url = webui::GetPngDataUrl(image->front(), image->size());
#else // !defined(OS_CHROMEOS)
- ProfileInfoCache& cache =
- g_browser_process->profile_manager()->GetProfileInfoCache();
- ProfileAttributesEntry* entry = nullptr;
- if (cache.GetProfileAttributesWithPath(profile.GetPath(), &entry)) {
+ ProfileAttributesEntry* entry;
+ if (g_browser_process->profile_manager()->GetProfileAttributesStorage().
+ GetProfileAttributesWithPath(profile.GetPath(), &entry)) {
*name = base::UTF16ToUTF8(entry->GetName());
if (entry->IsUsingGAIAPicture() && entry->GetGAIAPicture()) {
@@ -221,7 +220,8 @@ PeopleHandler::PeopleHandler(Profile* profile)
if (sync_service)
sync_service_observer_.Add(sync_service);
- g_browser_process->profile_manager()->GetProfileInfoCache().AddObserver(this);
+ g_browser_process->profile_manager()->
+ GetProfileAttributesStorage().AddObserver(this);
#if defined(OS_CHROMEOS)
registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
@@ -231,7 +231,7 @@ PeopleHandler::PeopleHandler(Profile* profile)
PeopleHandler::~PeopleHandler() {
g_browser_process->profile_manager()->
- GetProfileInfoCache().RemoveObserver(this);
+ GetProfileAttributesStorage().RemoveObserver(this);
// Early exit if running unit tests (no actual WebUI is attached).
if (!web_ui())
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.h ('k') | chrome/browser/ui/webui/settings/settings_manage_profile_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698