summaryrefslogtreecommitdiff
path: root/chromium/components/signin/internal/identity_manager/account_tracker_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/signin/internal/identity_manager/account_tracker_service.h')
-rw-r--r--chromium/components/signin/internal/identity_manager/account_tracker_service.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/chromium/components/signin/internal/identity_manager/account_tracker_service.h b/chromium/components/signin/internal/identity_manager/account_tracker_service.h
index 5ba22774038..e6f29106fd4 100644
--- a/chromium/components/signin/internal/identity_manager/account_tracker_service.h
+++ b/chromium/components/signin/internal/identity_manager/account_tracker_service.h
@@ -18,6 +18,7 @@
#include "base/sequence_checker.h"
#include "base/timer/timer.h"
#include "build/build_config.h"
+#include "components/prefs/scoped_user_pref_update.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "google_apis/gaia/core_account_id.h"
#include "google_apis/gaia/gaia_auth_util.h"
@@ -50,6 +51,7 @@ void SimulateSuccessfulFetchOfAccountInfo(IdentityManager*,
const std::string&);
void SimulateAccountImageFetch(signin::IdentityManager*,
const CoreAccountId&,
+ const std::string& image_url_with_size,
const gfx::Image&);
} // namespace signin
@@ -150,6 +152,10 @@ class AccountTrackerService {
// valid GaiaId gets removed from |accounts_| (i.e. stops being tracked).
void SetOnAccountRemovedCallback(AccountInfoCallback callback);
+ // Flushes the account changes to disk. The flush happens asynchronously and
+ // this function does not block on disk IO.
+ void CommitPendingAccountChanges();
+
protected:
// Available to be called in tests.
void SetAccountInfoFromUserInfo(const CoreAccountId& account_id,
@@ -158,6 +164,7 @@ class AccountTrackerService {
// Updates the account image. Does nothing if |account_id| does not exist in
// |accounts_|.
void SetAccountImage(const CoreAccountId& account_id,
+ const std::string& image_url_with_size,
const gfx::Image& image);
private:
@@ -174,6 +181,7 @@ class AccountTrackerService {
const std::string&);
friend void signin::SimulateAccountImageFetch(signin::IdentityManager*,
const CoreAccountId&,
+ const std::string&,
const gfx::Image&);
void NotifyAccountUpdated(const AccountInfo& account_info);
@@ -192,7 +200,11 @@ class AccountTrackerService {
void OnAccountImageLoaded(const CoreAccountId& account_id, gfx::Image image);
void LoadAccountImagesFromDisk();
void SaveAccountImageToDisk(const CoreAccountId& account_id,
- const gfx::Image& image);
+ const gfx::Image& image,
+ const std::string& image_url_with_size);
+ void OnAccountImageUpdated(const CoreAccountId& account_id,
+ const std::string& image_url_with_size,
+ bool success);
void RemoveAccountImageFromDisk(const CoreAccountId& account_id);
// Migrate accounts to be keyed by gaia id instead of normalized email.