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

Issue 851553003: Remove bad use of CancelableCallback from BrowingDataAppCacheHelper (Closed)

Created:
5 years, 11 months ago by dmichael (off chromium)
Modified:
5 years, 11 months ago
Reviewers:
michaeln
CC:
chromium-reviews, markusheintz_
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove bad use of CancelableCallback from BrowingDataAppCacheHelper BrowsingDataAppCacheHelper no longer needs to be able to cancel its callback, so remove the "CancelableCallback" member. The current code is also not correct usage of CancelableCallback, because the callback can be deleted on a different thread than where it was created. This was making a DCHECK fail when trying to fix a problem in CancelableCallback (see https://code.google.com/p/chromium/issues/detail?id=433583#c1). BUG=433583 R=michaeln@chromium.org Committed: https://crrev.com/91d2f864f83131a7390ab78b0e19ffedf7c7e514 Cr-Commit-Position: refs/heads/master@{#311369}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Make the callback take a ref to |this| #

Total comments: 1

Patch Set 3 : inline Bind #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -7 lines) Patch
M chrome/browser/browsing_data/browsing_data_appcache_helper.h View 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_appcache_helper.cc View 1 2 2 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
dmichael (off chromium)
5 years, 11 months ago (2015-01-12 21:30:03 UTC) #1
michaeln
https://codereview.chromium.org/851553003/diff/1/chrome/browser/browsing_data/browsing_data_appcache_helper.cc File chrome/browser/browsing_data/browsing_data_appcache_helper.cc (right): https://codereview.chromium.org/851553003/diff/1/chrome/browser/browsing_data/browsing_data_appcache_helper.cc#newcode41 chrome/browser/browsing_data/browsing_data_appcache_helper.cc:41: base::Unretained(this)); This assumes BrowsingDataAppCacheHelper can't be deleted prior to ...
5 years, 11 months ago (2015-01-12 22:46:58 UTC) #2
dmichael (off chromium)
https://codereview.chromium.org/851553003/diff/1/chrome/browser/browsing_data/browsing_data_appcache_helper.cc File chrome/browser/browsing_data/browsing_data_appcache_helper.cc (right): https://codereview.chromium.org/851553003/diff/1/chrome/browser/browsing_data/browsing_data_appcache_helper.cc#newcode41 chrome/browser/browsing_data/browsing_data_appcache_helper.cc:41: base::Unretained(this)); On 2015/01/12 22:46:58, michaeln wrote: > This assumes ...
5 years, 11 months ago (2015-01-13 00:02:02 UTC) #3
michaeln
> I was admittedly going with what I thought was the least behavior change without ...
5 years, 11 months ago (2015-01-13 01:24:09 UTC) #4
dmichael (off chromium)
Done, thanks for checking. Note that base::Bind/base::Callback knows enough to take a ref on a ...
5 years, 11 months ago (2015-01-13 17:06:32 UTC) #5
michaeln
lgtm https://codereview.chromium.org/851553003/diff/20001/chrome/browser/browsing_data/browsing_data_appcache_helper.cc File chrome/browser/browsing_data/browsing_data_appcache_helper.cc (right): https://codereview.chromium.org/851553003/diff/20001/chrome/browser/browsing_data/browsing_data_appcache_helper.cc#newcode40 chrome/browser/browsing_data/browsing_data_appcache_helper.cc:40: base::Bind(&BrowsingDataAppCacheHelper::OnFetchComplete, this); nit: its real common to put ...
5 years, 11 months ago (2015-01-13 21:46:27 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/851553003/40001
5 years, 11 months ago (2015-01-13 23:26:08 UTC) #8
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 11 months ago (2015-01-14 00:29:49 UTC) #9
commit-bot: I haz the power
5 years, 11 months ago (2015-01-14 00:30:33 UTC) #10
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/91d2f864f83131a7390ab78b0e19ffedf7c7e514
Cr-Commit-Position: refs/heads/master@{#311369}

Powered by Google App Engine
This is Rietveld 408576698