| Index: chrome/browser/chromeos/contacts/contact_manager_stub.h
|
| diff --git a/chrome/browser/chromeos/contacts/contact_manager_stub.h b/chrome/browser/chromeos/contacts/contact_manager_stub.h
|
| index 817d64db0f81efda4a21118244076caf58333230..340374073b20be56799c63013f88e5f22bb14bd9 100644
|
| --- a/chrome/browser/chromeos/contacts/contact_manager_stub.h
|
| +++ b/chrome/browser/chromeos/contacts/contact_manager_stub.h
|
| @@ -25,6 +25,7 @@ class ContactManagerStub : public ContactManagerInterface {
|
| void NotifyObserversAboutUpdatedContacts();
|
|
|
| // ContactManagerInterface overrides:
|
| + virtual base::WeakPtr<ContactManagerInterface> GetWeakPtr() OVERRIDE;
|
| virtual void AddObserver(ContactManagerObserver* observer, Profile* profile)
|
| OVERRIDE;
|
| virtual void RemoveObserver(ContactManagerObserver* observer,
|
| @@ -44,6 +45,10 @@ class ContactManagerStub : public ContactManagerInterface {
|
| // Contacts that will be returned by GetAllContacts() and GetContactById().
|
| ScopedVector<Contact> contacts_;
|
|
|
| + // Note: This should remain the last member so it'll be destroyed and
|
| + // invalidate its weak pointers before any other members are destroyed.
|
| + base::WeakPtrFactory<ContactManagerInterface> weak_ptr_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ContactManagerStub);
|
| };
|
|
|
|
|