Chromium Code Reviews| Index: chrome/browser/chromeos/contacts/contact_manager_stub.cc |
| diff --git a/chrome/browser/chromeos/contacts/contact_manager_stub.cc b/chrome/browser/chromeos/contacts/contact_manager_stub.cc |
| index fd5a86bfb153816321bfae5d3c33ec6d3fd20e70..0ce8248a0ccc54bd2c99c4730715036f4de1fd3a 100644 |
| --- a/chrome/browser/chromeos/contacts/contact_manager_stub.cc |
| +++ b/chrome/browser/chromeos/contacts/contact_manager_stub.cc |
| @@ -16,7 +16,10 @@ using content::BrowserThread; |
| namespace contacts { |
| -ContactManagerStub::ContactManagerStub(Profile* profile) : profile_(profile) {} |
| +ContactManagerStub::ContactManagerStub(Profile* profile) |
| + : profile_(profile), |
| + weak_ptr_factory_(this) { |
|
satorux1
2012/08/30 17:19:26
ALLOW_THIS_IN_INITIALIZER_LIST ?
Daniel Erat
2012/08/30 20:59:45
Done.
|
| +} |
| ContactManagerStub::~ContactManagerStub() {} |
| @@ -30,6 +33,11 @@ void ContactManagerStub::SetContacts(const ContactPointers& contacts) { |
| test::CopyContacts(contacts, &contacts_); |
| } |
| +base::WeakPtr<ContactManagerInterface> ContactManagerStub::GetWeakPtr() { |
| + CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| + return weak_ptr_factory_.GetWeakPtr(); |
| +} |
| + |
| void ContactManagerStub::AddObserver(ContactManagerObserver* observer, |
| Profile* profile) { |
| CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |