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

Issue 556173002: Ensure incognito TestingProfiles are incognito for their whole lifetime. (Closed)

Created:
6 years, 3 months ago by tapted
Modified:
6 years, 3 months ago
Reviewers:
sky
CC:
chromium-reviews, skanuj+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, yoshiki+watch_chromium.org, rginda+watch_chromium.org, markusheintz_, mkwst+watchlist_chromium.org, melevin+watch_chromium.org, benquan, dominich, rlp+watch_chromium.org, rouslan+autofillwatch_chromium.org, samarth+watch_chromium.org, jfweitz+watch_chromium.org, kmadhusu+watch_chromium.org, gcasto+watchlist_chromium.org, Jered, tfarina, donnd+watch_chromium.org, David Black, Dane Wallinga, dyu1, estade+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Ensure incognito TestingProfiles are incognito for their whole lifetime. Otherwise keyed services see different profiles in unit_tests at different times since the incognito->GetOriginalProfile() changes. This is causing release code to pick up unnecessary workarounds to keep unit_tests green in try runs. The fix is achieved by adding `TestingProfile::Builder::BuildIncognito`, which differs from `Build` by requiring an |original_profile| argument, which will own the incognito profile (so no need to return scoped_ptr). This simplifies a lot of call sites, since they no longer need to do a scoped_ptr dance of their own. BUG=277296 Committed: https://crrev.com/1ab9b709cb4d691f667c843040b65b46a9c82ebd Cr-Commit-Position: refs/heads/master@{#294931}

Patch Set 1 #

Patch Set 2 : fix views test, fix SupervisedUserSettingsService, cl-format #

Patch Set 3 : self review, sort out incognito prefs #

Patch Set 4 : Ditch separate bool, cleanups #

Patch Set 5 : Should all be green now except CrOS #

Patch Set 6 : Fix CrOS #

Total comments: 13

Patch Set 7 : respond to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -142 lines) Patch
M chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc View 1 2 3 4 5 2 chunks +1 line, -5 lines 0 comments Download
M chrome/browser/chromeos/power/power_prefs_unittest.cc View 1 2 1 chunk +2 lines, -9 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/password_manager/password_manager_internals_service_unittest.cc View 3 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_manager_unittest.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc View 1 2 3 chunks +8 lines, -6 lines 0 comments Download
M chrome/browser/search/hotword_service_unittest.cc View 3 chunks +5 lines, -9 lines 0 comments Download
M chrome/browser/ui/autofill/account_chooser_model_unittest.cc View 1 1 chunk +3 lines, -8 lines 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc View 1 1 chunk +2 lines, -8 lines 0 comments Download
M chrome/browser/ui/browser_command_controller_unittest.cc View 1 2 2 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper_unittest.cc View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc View 1 1 chunk +2 lines, -5 lines 0 comments Download
M chrome/test/base/testing_profile.h View 1 2 3 4 5 6 8 chunks +16 lines, -9 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 5 6 17 chunks +66 lines, -49 lines 0 comments Download
M chrome/test/base/testing_profile_manager.cc View 2 chunks +3 lines, -7 lines 0 comments Download

Messages

Total messages: 16 (9 generated)
tapted
Hi sky - please review - mainly for chrome/test/base . The other changes are mostly ...
6 years, 3 months ago (2014-09-12 07:54:09 UTC) #6
sky
https://codereview.chromium.org/556173002/diff/180001/chrome/test/base/testing_profile.cc File chrome/test/base/testing_profile.cc (right): https://codereview.chromium.org/556173002/diff/180001/chrome/test/base/testing_profile.cc#newcode635 chrome/test/base/testing_profile.cc:635: void TestingProfile::SetOffTheRecordProfile(scoped_ptr<Profile> profile) { Can this be changed to ...
6 years, 3 months ago (2014-09-12 15:33:30 UTC) #7
tapted
https://codereview.chromium.org/556173002/diff/180001/chrome/test/base/testing_profile.cc File chrome/test/base/testing_profile.cc (right): https://codereview.chromium.org/556173002/diff/180001/chrome/test/base/testing_profile.cc#newcode635 chrome/test/base/testing_profile.cc:635: void TestingProfile::SetOffTheRecordProfile(scoped_ptr<Profile> profile) { On 2014/09/12 15:33:29, sky wrote: ...
6 years, 3 months ago (2014-09-15 05:05:17 UTC) #11
sky
LGTM
6 years, 3 months ago (2014-09-15 15:44:06 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/556173002/260001
6 years, 3 months ago (2014-09-15 22:39:46 UTC) #14
commit-bot: I haz the power
Committed patchset #7 (id:260001) as 780bf4b4051c00381a034ca509696d5e68f69c19
6 years, 3 months ago (2014-09-15 23:50:38 UTC) #15
commit-bot: I haz the power
6 years, 3 months ago (2014-09-15 23:53:33 UTC) #16
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/1ab9b709cb4d691f667c843040b65b46a9c82ebd
Cr-Commit-Position: refs/heads/master@{#294931}

Powered by Google App Engine
This is Rietveld 408576698