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

Issue 2348723002: [Extensions] Remove UIThreadExtensionFunction::DelegateForTests (Closed)

Created:
4 years, 3 months ago by Devlin
Modified:
4 years, 3 months ago
Reviewers:
lazyboy
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Remove UIThreadExtensionFunction::DelegateForTests The ExtensionFunction test delegate basically just served as a way of getting the results from the function, but we already have that by simply setting the response callback in the function. Remove the DelegateForTests class and update uses of it to use the callback. Also add a response() field on ExtensionFunction for use in determining if the function succeeded or failed. Previously, code would rely on whether or not results_ were set, but this was wrong for a few reasons: - The absence of results doesn't always indicate failure - The presence of results doesn't always indicate success - In practice, we always send back an empty list value (even if results weren't previously set). Update code to use the response() value instead. BUG=648276 TBR=benwells@chromium.org (apps browsertest change) Committed: https://crrev.com/187edaa9952ac1c26f40b034cdf99cf3aae7e91f Cr-Commit-Position: refs/heads/master@{#419560}

Patch Set 1 : fix #

Patch Set 2 : polish #

Total comments: 4

Patch Set 3 : lazyboy's #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -204 lines) Patch
M chrome/browser/apps/app_browsertest_util.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc View 1 2 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/extensions/api/identity/identity_apitest.cc View 1 2 4 chunks +6 lines, -50 lines 0 comments Download
M chrome/browser/extensions/extension_function_test_utils.cc View 1 2 3 chunks +7 lines, -44 lines 0 comments Download
M extensions/browser/api/bluetooth/bluetooth_apitest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M extensions/browser/api/cast_channel/cast_channel_apitest.cc View 3 chunks +16 lines, -30 lines 0 comments Download
M extensions/browser/api_test_utils.h View 1 2 chunks +29 lines, -2 lines 0 comments Download
M extensions/browser/api_test_utils.cc View 1 2 5 chunks +35 lines, -45 lines 0 comments Download
M extensions/browser/extension_function.h View 1 2 4 chunks +5 lines, -16 lines 0 comments Download
M extensions/browser/extension_function.cc View 1 2 3 chunks +6 lines, -10 lines 0 comments Download

Messages

Total messages: 48 (39 generated)
Devlin
lazyboy@, can you take a look?
4 years, 3 months ago (2016-09-19 16:13:08 UTC) #26
lazyboy
lgtm with couple of nits. I think you need to reverse the words "presence" and ...
4 years, 3 months ago (2016-09-19 18:08:56 UTC) #27
Devlin
https://codereview.chromium.org/2348723002/diff/120001/extensions/browser/extension_function.cc File extensions/browser/extension_function.cc (right): https://codereview.chromium.org/2348723002/diff/120001/extensions/browser/extension_function.cc#newcode457 extensions/browser/extension_function.cc:457: response_ = base::MakeUnique<ResponseType>(response); On 2016/09/19 18:08:56, lazyboy wrote: > ...
4 years, 3 months ago (2016-09-19 20:14:20 UTC) #32
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/2348723002/140001
4 years, 3 months ago (2016-09-19 20:15:01 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/262280)
4 years, 3 months ago (2016-09-19 20:23:59 UTC) #37
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/2348723002/140001
4 years, 3 months ago (2016-09-19 20:48:01 UTC) #40
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/2348723002/140001
4 years, 3 months ago (2016-09-19 21:04:40 UTC) #44
commit-bot: I haz the power
Committed patchset #3 (id:140001)
4 years, 3 months ago (2016-09-19 21:34:23 UTC) #46
commit-bot: I haz the power
4 years, 3 months ago (2016-09-19 21:36:41 UTC) #48
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/187edaa9952ac1c26f40b034cdf99cf3aae7e91f
Cr-Commit-Position: refs/heads/master@{#419560}

Powered by Google App Engine
This is Rietveld 408576698