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

Unified Diff: chrome/browser/profiles/profiles_state.cc

Issue 267253004: Fetch a new GAIA picture every time chrome://settings/manageProfile comes up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move the chrome messages to a common place Created 6 years, 7 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/profiles/profiles_state.cc
diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
index 71c08c05ac8c8ef5b8bd97e55eff2fb68a9e61a3..3fc99154509fe31abda972aa134fc1d73d552c9d 100644
--- a/chrome/browser/profiles/profiles_state.cc
+++ b/chrome/browser/profiles/profiles_state.cc
@@ -9,6 +9,8 @@
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/profiles/gaia_info_update_service.h"
+#include "chrome/browser/profiles/gaia_info_update_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -17,6 +19,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/pref_names.h"
#include "components/signin/core/browser/profile_oauth2_token_service.h"
+#include "components/signin/core/common/profile_management_switches.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -109,4 +112,14 @@ bool IsRegularOrGuestSession(Browser* browser) {
return profile->IsGuestSession() || !profile->IsOffTheRecord();
}
+void UpdateGaiaProfilePhotoIfNeeded(Profile* profile) {
+ // If the --google-profile-info flag isn't used, then the
+ // GAIAInfoUpdateService isn't initialized, and we can't download the picture.
+ if (!switches::IsGoogleProfileInfo())
+ return;
+
+ DCHECK(profile);
+ GAIAInfoUpdateServiceFactory::GetInstance()->GetForProfile(profile)->Update();
+}
+
} // namespace profiles
« no previous file with comments | « chrome/browser/profiles/profiles_state.h ('k') | chrome/browser/resources/options/manage_profile_overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698