summaryrefslogtreecommitdiffstats
path: root/ios/public
diff options
context:
space:
mode:
authorbzanotti <bzanotti@chromium.org>2015-11-30 02:14:31 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-30 10:15:29 +0000
commit3a6437f345fb0a3c6abfb159c02c3f33a1d2ec04 (patch)
tree9ac9e719caeb69115dbcffb0944ca08a9e1f343c /ios/public
parentddc561f5285ca40c4b02be2a2520078f95c891a7 (diff)
downloadchromium_src-3a6437f345fb0a3c6abfb159c02c3f33a1d2ec04.zip
chromium_src-3a6437f345fb0a3c6abfb159c02c3f33a1d2ec04.tar.gz
chromium_src-3a6437f345fb0a3c6abfb159c02c3f33a1d2ec04.tar.bz2
Add WillBeDestroyed method to ChromeIdentityService observer.
BUG=562684 Review URL: https://codereview.chromium.org/1482153004 Cr-Commit-Position: refs/heads/master@{#362114}
Diffstat (limited to 'ios/public')
-rw-r--r--ios/public/provider/chrome/browser/signin/chrome_identity_service.h3
-rw-r--r--ios/public/provider/chrome/browser/signin/chrome_identity_service.mm5
2 files changed, 7 insertions, 1 deletions
diff --git a/ios/public/provider/chrome/browser/signin/chrome_identity_service.h b/ios/public/provider/chrome/browser/signin/chrome_identity_service.h
index 1f13ced..cb45e1b 100644
--- a/ios/public/provider/chrome/browser/signin/chrome_identity_service.h
+++ b/ios/public/provider/chrome/browser/signin/chrome_identity_service.h
@@ -61,6 +61,9 @@ class ChromeIdentityService {
// Called when profile information or the profile image is updated.
virtual void OnProfileUpdate(ChromeIdentity* identity) {}
+ // Called when the ChromeIdentityService will be destroyed.
+ virtual void OnChromeIdentityServiceWillBeDestroyed() {}
+
private:
DISALLOW_COPY_AND_ASSIGN(Observer);
};
diff --git a/ios/public/provider/chrome/browser/signin/chrome_identity_service.mm b/ios/public/provider/chrome/browser/signin/chrome_identity_service.mm
index dce36f4..55a228c 100644
--- a/ios/public/provider/chrome/browser/signin/chrome_identity_service.mm
+++ b/ios/public/provider/chrome/browser/signin/chrome_identity_service.mm
@@ -8,7 +8,10 @@ namespace ios {
ChromeIdentityService::ChromeIdentityService() {}
-ChromeIdentityService::~ChromeIdentityService() {}
+ChromeIdentityService::~ChromeIdentityService() {
+ FOR_EACH_OBSERVER(Observer, observer_list_,
+ OnChromeIdentityServiceWillBeDestroyed());
+}
bool ChromeIdentityService::IsValidIdentity(ChromeIdentity* identity) const {
return false;