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

Issue 2409443002: Make GlobalErrorService's ownership model slightly less insane. (Closed)

Created:
4 years, 2 months ago by Avi (use Gerrit)
Modified:
4 years ago
Reviewers:
Nico
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, grt+watch_chromium.org, sync-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make GlobalErrorService's ownership model slightly less insane. GlobalErrorService ownership was crazy; sometimes the error objects contained were owned, and sometimes they weren't. This separates the two cases into clear statements of ownership, and deprecates the case where the error objects are unowned. BUG=555865, 673578 Committed: https://crrev.com/2451b25ae9188cfe5e0177c9c306ced7c3a173ed Cr-Commit-Position: refs/heads/master@{#438192}

Patch Set 1 #

Patch Set 2 : slightly cleaner #

Patch Set 3 : windows, ownership #

Total comments: 10

Patch Set 4 : nits #

Patch Set 5 : less #

Total comments: 2

Patch Set 6 : deprecation notice #

Total comments: 4

Patch Set 7 : commentary #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -76 lines) Patch
M chrome/browser/extensions/extension_disabled_ui.cc View 1 2 3 4 5 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/external_install_error.cc View 4 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/extensions/warning_badge_service.cc View 1 2 3 4 5 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/recovery/recovery_install_global_error.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/srt_fetcher_win.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/safe_browsing/srt_global_error_win.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/sync/sync_global_error.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_action_button_interactive_uitest.mm View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/global_error/global_error_service.h View 1 2 3 4 5 6 5 chunks +24 lines, -11 lines 0 comments Download
M chrome/browser/ui/global_error/global_error_service.cc View 1 2 3 4 5 5 chunks +28 lines, -21 lines 0 comments Download
M chrome/browser/ui/global_error/global_error_service_browsertest.cc View 1 2 3 4 5 6 6 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/ui/global_error/global_error_service_unittest.cc View 1 2 3 4 5 5 chunks +18 lines, -14 lines 0 comments Download
M chrome/browser/ui/toolbar/app_menu_model_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 43 (30 generated)
Avi (use Gerrit)
At least this change makes it clear that the ownership is crazy... Note that before, ...
4 years, 2 months ago (2016-10-08 22:39:17 UTC) #6
Avi (use Gerrit)
ok, this now passes all trybots. ptal.
4 years, 2 months ago (2016-10-09 18:57:44 UTC) #13
Nico
What a mess. It does look like it should be doable to make all calls ...
4 years, 2 months ago (2016-10-10 14:03:37 UTC) #14
Avi (use Gerrit)
https://codereview.chromium.org/2409443002/diff/40001/chrome/browser/extensions/extension_disabled_ui.cc File chrome/browser/extensions/extension_disabled_ui.cc (right): https://codereview.chromium.org/2409443002/diff/40001/chrome/browser/extensions/extension_disabled_ui.cc#newcode434 chrome/browser/extensions/extension_disabled_ui.cc:434: ->RemoveOwnedGlobalError(this).release(); On 2016/10/10 14:03:37, Nico wrote: > Hm, I ...
4 years, 2 months ago (2016-10-10 16:52:36 UTC) #15
Avi (use Gerrit)
Stuff keeps breaking the more clever I get. This is about as good as it ...
4 years, 2 months ago (2016-10-17 00:19:28 UTC) #24
Avi (use Gerrit)
Nico— I want to try to get back to this. I tried to do what ...
4 years ago (2016-12-12 18:41:14 UTC) #25
Nico
Alright; thanks for trying. One small request: https://codereview.chromium.org/2409443002/diff/80001/chrome/browser/ui/global_error/global_error_service.h File chrome/browser/ui/global_error/global_error_service.h (right): https://codereview.chromium.org/2409443002/diff/80001/chrome/browser/ui/global_error/global_error_service.h#newcode41 chrome/browser/ui/global_error/global_error_service.h:41: void AddUnownedGlobalError(GlobalError* ...
4 years ago (2016-12-12 22:32:51 UTC) #26
Avi (use Gerrit)
https://codereview.chromium.org/2409443002/diff/80001/chrome/browser/ui/global_error/global_error_service.h File chrome/browser/ui/global_error/global_error_service.h (right): https://codereview.chromium.org/2409443002/diff/80001/chrome/browser/ui/global_error/global_error_service.h#newcode41 chrome/browser/ui/global_error/global_error_service.h:41: void AddUnownedGlobalError(GlobalError* error); On 2016/12/12 22:32:50, Nico wrote: > ...
4 years ago (2016-12-13 03:06:19 UTC) #32
Nico
lgtm; maybe you can make the cl description a bit more detailed https://codereview.chromium.org/2409443002/diff/100001/chrome/browser/safe_browsing/srt_global_error_win.cc File chrome/browser/safe_browsing/srt_global_error_win.cc ...
4 years ago (2016-12-13 15:54:14 UTC) #33
Avi (use Gerrit)
https://codereview.chromium.org/2409443002/diff/100001/chrome/browser/safe_browsing/srt_global_error_win.cc File chrome/browser/safe_browsing/srt_global_error_win.cc (right): https://codereview.chromium.org/2409443002/diff/100001/chrome/browser/safe_browsing/srt_global_error_win.cc#newcode266 chrome/browser/safe_browsing/srt_global_error_win.cc:266: global_error_service_ = nullptr; On 2016/12/13 15:54:14, Nico wrote: > ...
4 years ago (2016-12-13 16:06:00 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2409443002/120001
4 years ago (2016-12-13 16:07:20 UTC) #38
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years ago (2016-12-13 16:55:50 UTC) #41
commit-bot: I haz the power
4 years ago (2016-12-13 17:00:21 UTC) #43
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/2451b25ae9188cfe5e0177c9c306ced7c3a173ed
Cr-Commit-Position: refs/heads/master@{#438192}

Powered by Google App Engine
This is Rietveld 408576698