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

Issue 13474015: drive: Fix lifetime model of FileBrowserEventRouter (Closed)

Created:
7 years, 8 months ago by satorux1
Modified:
7 years, 8 months ago
Reviewers:
hashimoto
CC:
chromium-reviews, nkostylev+watch_chromium.org, Aaron Boodman, rginda+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

drive: Fix lifetime model of FileBrowserEventRouter Previously, FileBrowserEventRouter was a ref counted class, but the weak pointer was also used, which doesn't make much sense. Fix the weird lifetime model by making this a non refcounted class. Besides, in certain cases, FileBrowserEventRouter could outlive DBusThreadManager and PrefService, which caused crash at shutdown. BUG=227477 TEST=none

Patch Set 1 #

Total comments: 6

Patch Set 2 : address comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -31 lines) Patch
M chrome/browser/chromeos/extensions/file_browser_event_router.h View 1 6 chunks +7 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_browser_event_router.cc View 1 4 chunks +7 lines, -9 lines 1 comment Download
M chrome/browser/chromeos/extensions/file_browser_event_router_browsertest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_browser_private_api.h View 5 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/extensions/file_browser_private_api.cc View 3 chunks +4 lines, -4 lines 1 comment Download

Messages

Total messages: 8 (0 generated)
satorux1
7 years, 8 months ago (2013-04-08 04:42:24 UTC) #1
hashimoto
https://codereview.chromium.org/13474015/diff/1/chrome/browser/chromeos/extensions/file_browser_event_router.cc File chrome/browser/chromeos/extensions/file_browser_event_router.cc (right): https://codereview.chromium.org/13474015/diff/1/chrome/browser/chromeos/extensions/file_browser_event_router.cc#newcode240 chrome/browser/chromeos/extensions/file_browser_event_router.cc:240: weak_factory_(this) { nit: ALLOW_THIS_IN_INITIALIZER_LIST? https://codereview.chromium.org/13474015/diff/1/chrome/browser/chromeos/extensions/file_browser_event_router.h File chrome/browser/chromeos/extensions/file_browser_event_router.h (right): https://codereview.chromium.org/13474015/diff/1/chrome/browser/chromeos/extensions/file_browser_event_router.h#newcode43 ...
7 years, 8 months ago (2013-04-08 04:49:38 UTC) #2
satorux1
https://codereview.chromium.org/13474015/diff/1/chrome/browser/chromeos/extensions/file_browser_event_router.cc File chrome/browser/chromeos/extensions/file_browser_event_router.cc (right): https://codereview.chromium.org/13474015/diff/1/chrome/browser/chromeos/extensions/file_browser_event_router.cc#newcode240 chrome/browser/chromeos/extensions/file_browser_event_router.cc:240: weak_factory_(this) { On 2013/04/08 04:49:38, hashimoto wrote: > nit: ...
7 years, 8 months ago (2013-04-08 05:03:37 UTC) #3
hashimoto
lgtm
7 years, 8 months ago (2013-04-08 05:04:50 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/satorux@chromium.org/13474015/5001
7 years, 8 months ago (2013-04-08 06:22:01 UTC) #5
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-08 06:26:42 UTC) #6
satorux1
https://codereview.chromium.org/13474015/diff/5001/chrome/browser/chromeos/extensions/file_browser_event_router.cc File chrome/browser/chromeos/extensions/file_browser_event_router.cc (right): https://codereview.chromium.org/13474015/diff/5001/chrome/browser/chromeos/extensions/file_browser_event_router.cc#newcode355 chrome/browser/chromeos/extensions/file_browser_event_router.cc:355: weak_factory_.GetWeakPtr(), true)); Hmm, this is also broken, as weak_factory_.GetWeakPtr() ...
7 years, 8 months ago (2013-04-08 06:34:36 UTC) #7
satorux1
7 years, 8 months ago (2013-04-08 08:28:58 UTC) #8
closing as this is not gonna work...

Powered by Google App Engine
This is Rietveld 408576698