Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Issue 10896031: contacts: Add ContactManagerInterface::GetWeakPtr(). (Closed)

Created:
8 years, 3 months ago by Daniel Erat
Modified:
8 years, 3 months ago
Reviewers:
satorux1
CC:
chromium-reviews, derat+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

contacts: Add ContactManagerInterface::GetWeakPtr(). The ContactManager singleton is destroyed in PostMainMessageLoopRun(), which appears to run before the (not-yet-checked-in) ContactProvider class is destroyed in response to the user profile being destroyed. This change lets ContactProvider hold a weak pointer to ContactManager so it can avoid accessing it during shutdown. I'm also renaming a couple of references to "partial updates" to "incremental updates" for consistency. BUG=128805, 141877 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154327

Patch Set 1 #

Patch Set 2 : update a comment #

Total comments: 6

Patch Set 3 : merge #

Patch Set 4 : apply review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -8 lines) Patch
M chrome/browser/chromeos/contacts/contact_database.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/contacts/contact_database_unittest.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/contacts/contact_manager.h View 1 4 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/contacts/contact_manager.cc View 1 2 3 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/chromeos/contacts/contact_manager_stub.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/contacts/contact_manager_stub.cc View 1 2 3 2 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/chromeos/contacts/google_contact_store.cc View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Daniel Erat
8 years, 3 months ago (2012-08-29 04:42:44 UTC) #1
satorux1
sorry for the belated response. I have a question: http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager.h File chrome/browser/chromeos/contacts/contact_manager.h (right): http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager.h#newcode39 chrome/browser/chromeos/contacts/contact_manager.h:39: ...
8 years, 3 months ago (2012-08-30 16:43:28 UTC) #2
Daniel Erat
http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager.h File chrome/browser/chromeos/contacts/contact_manager.h (right): http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager.h#newcode39 chrome/browser/chromeos/contacts/contact_manager.h:39: virtual base::WeakPtr<ContactManagerInterface> GetWeakPtr() = 0; On 2012/08/30 16:43:29, satorux1 ...
8 years, 3 months ago (2012-08-30 16:56:16 UTC) #3
satorux1
LGTM with nits http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager.cc File chrome/browser/chromeos/contacts/contact_manager.cc (right): http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager.cc#newcode41 chrome/browser/chromeos/contacts/contact_manager.cc:41: weak_ptr_factory_(this) { ALLOW_THIS_IN_INITIALIZER_LIST ? http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager_stub.cc File ...
8 years, 3 months ago (2012-08-30 17:19:26 UTC) #4
Daniel Erat
http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager.cc File chrome/browser/chromeos/contacts/contact_manager.cc (right): http://codereview.chromium.org/10896031/diff/2001/chrome/browser/chromeos/contacts/contact_manager.cc#newcode41 chrome/browser/chromeos/contacts/contact_manager.cc:41: weak_ptr_factory_(this) { On 2012/08/30 17:19:26, satorux1 wrote: > ALLOW_THIS_IN_INITIALIZER_LIST ...
8 years, 3 months ago (2012-08-30 20:59:45 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/10896031/14001
8 years, 3 months ago (2012-08-30 21:53:14 UTC) #6
commit-bot: I haz the power
8 years, 3 months ago (2012-08-31 00:28:48 UTC) #7
Change committed as 154327

Powered by Google App Engine
This is Rietveld 408576698