| Index: chrome/browser/profiles/profiles_state.cc
|
| diff --git a/chrome/browser/profiles/profiles_state.cc b/chrome/browser/profiles/profiles_state.cc
|
| index 282ffd3f3544b25312ce4518a7be51cf4b0faacf..e9b5d224e680ced95e3f94db5a3c4fe63e95b2eb 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"
|
|
|
| @@ -113,4 +116,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
|
|
|