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

Issue 2695403002: Avoid re-entrancy in DriveIntegrationService testing factory (Closed)

Created:
3 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
3 years, 10 months ago
Reviewers:
mtomasz
CC:
chromium-reviews, davemoore+watch_chromium.org, fukino+watch_chromium.org, oka+watch_chromium.org, oshima+watch_chromium.org, rginda+watch_chromium.org, yamaguchi+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of a KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory if they try to access a Profile, as Profile access on Chrome OS lazily invokes this factory. With minimal modifications, we avoid the need to wait for any async work in FakeDriveService and thus avoid the need to run the MessageLoop within the test service factory. There's also some minor cleanup here: NULL -> nullptr, and switched to field initializers where appropriate. BUG=692682 Review-Url: https://codereview.chromium.org/2695403002 Cr-Commit-Position: refs/heads/master@{#451220} Committed: https://chromium.googlesource.com/chromium/src/+/fa44a170953dea4680dc68f1eb0e145b97307958

Patch Set 1 : . #

Patch Set 2 : . #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -233 lines) Patch
M chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc View 1 12 chunks +87 lines, -199 lines 1 comment Download
M chrome/browser/extensions/api/file_system/file_system_apitest_chromeos.cc View 1 4 chunks +28 lines, -34 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 33 (24 generated)
Ken Rockot(use gerrit already)
PTAL, thanks!
3 years, 10 months ago (2017-02-16 06:57:01 UTC) #10
mtomasz
lgtm, but the tests seem to regressed
3 years, 10 months ago (2017-02-16 08:48:59 UTC) #11
Ken Rockot(use gerrit already)
Thanks for the review. Since I've completely changed the approach here to something I feel ...
3 years, 10 months ago (2017-02-16 17:30:08 UTC) #19
mtomasz
https://codereview.chromium.org/2695403002/diff/80001/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc File chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc (left): https://codereview.chromium.org/2695403002/diff/80001/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc#oldcode214 chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc:214: if (error != google_apis::HTTP_CREATED) We're losing all these error ...
3 years, 10 months ago (2017-02-17 02:53:53 UTC) #25
Ken Rockot(use gerrit already)
On Feb 16, 2017 6:53 PM, <mtomasz@chromium.org> wrote: https://codereview.chromium.org/2695403002/diff/80001/ chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc File chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc (left): https://codereview.chromium.org/2695403002/diff/80001/ chrome/browser/chromeos/file_manager/external_filesystem_ ...
3 years, 10 months ago (2017-02-17 02:56:25 UTC) #26
mtomasz
sgtm. lgtm, thanks for fixing!
3 years, 10 months ago (2017-02-17 03:00:43 UTC) #27
mtomasz
sgtm. lgtm, thanks for fixing!
3 years, 10 months ago (2017-02-17 03:00:43 UTC) #28
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/2695403002/80001
3 years, 10 months ago (2017-02-17 03:07:39 UTC) #30
commit-bot: I haz the power
3 years, 10 months ago (2017-02-17 04:49:45 UTC) #33
Message was sent while issue was closed.
Committed patchset #2 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/fa44a170953dea4680dc68f1eb0e...

Powered by Google App Engine
This is Rietveld 408576698