• Marijn Kruisselbrink's avatar
    Revert "Fix session restore after launching with PWA." · b95f99b5
    Marijn Kruisselbrink authored
    This reverts commit f7713274.
    
    Reason for revert: The added browser tests appear to be (flakily) crashing on various builders:
    
    For example https://ci.chromium.org/p/chromium/builders/ci/Linux%20Tests/95504 with https://chromium-swarm.appspot.com/task?id=4fef1ab263264c10
    
    [1303/1306] StartupBrowserWithWebAppTest.PRE_PRE_LastUsedProfilesWithWebApp (1571 ms)
    [ RUN      ] StartupBrowserWithWebAppTest.PRE_LastUsedProfilesWithWebApp
    [11419:11462:1117/050706.931735:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    [11419:11462:1117/050706.931814:WARNING:property.cc(144)] DaemonVersion: GetAndBlock: failed.
    [11419:11462:1117/050706.932083:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    [11419:11462:1117/050706.932300:ERROR:object_proxy.cc(621)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
    BrowserTestBase received signal: Segmentation fault. Backtrace:
    #0 0x558aecd46cd9 base::debug::CollectStackTrace()
    #1 0x558aeccb6753 base::debug::StackTrace::StackTrace()
    #2 0x558aed26b5f6 content::(anonymous namespace)::DumpStackTraceSignalHandler()
    #3 0x7f26cd1224c0 (/lib/x86_64-linux-gnu/libc-2.23.so+0x354bf)
    #4 0x558ae929f9a0 StartupBrowserWithWebAppTest_PRE_LastUsedProfilesWithWebApp_Test::RunTestOnMainThread()
    #5 0x558aed26a407 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
    #6 0x558aecde10ef ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
    #7 0x558aecddfed5 ChromeBrowserMainParts::PreMainMessageLoopRun()
    #8 0x558aeb16da36 content::BrowserMainLoop::PreMainMessageLoopRun()
    #9 0x558aeb5c3b13 content::StartupTaskRunner::RunAllTasksNow()
    #10 0x558aeb16ca17 content::BrowserMainLoop::CreateStartupTasks()
    #11 0x558aeb16f638 content::BrowserMainRunnerImpl::Initialize()
    #12 0x558aeb16af68 content::BrowserMain()
    #13 0x558aebc439c3 content::ContentMainRunnerImpl::RunServiceManager()
    #14 0x558aebc435b6 content::ContentMainRunnerImpl::Run()
    #15 0x558aebc40a64 content::RunContentProcess()
    #16 0x558aebc413ec content::ContentMain()
    #17 0x558aed269f34 content::BrowserTestBase::SetUp()
    #18 0x558aecca3c51 InProcessBrowserTest::SetUp()
    #19 0x558aea228198 testing::Test::Run()
    #20 0x558aea22902f testing::TestInfo::Run()
    #21 0x558aea229a07 testing::TestSuite::Run()
    #22 0x558aea237207 testing::internal::UnitTestImpl::RunAllTests()
    #23 0x558aea236b6f testing::UnitTest::Run()
    #24 0x558aecd97f74 base::TestSuite::Run()
    #25 0x558aecc8d252 ChromeTestSuiteRunner::RunTestSuite()
    #26 0x558aed299357 content::LaunchTests()
    #27 0x558aecc8d522 LaunchChromeTests()
    #28 0x558aecc8ac54 main
    #29 0x7f26cd10d840 __libc_start_main
    #30 0x558ae864e0aa _start
    [1304/1306] StartupBrowserWithWebAppTest.PRE_LastUsedProfilesWithWebApp (CRASHED)
    
    Similar crash also on https://ci.chromium.org/p/chromium/builders/ci/Win7%20Tests%20%281%29/110376 (https://chromium-swarm.appspot.com/task?id=4feff52dc4172910)
    
    Original change's description:
    > Fix session restore after launching with PWA.
    >
    > The underlying issue is that the kProfilesLastActive pref gets
    > cleared when Chrome is launched with a specific profile, which
    > prevents Chrome from iterating over the last active profiles
    > and calling session restore on each of them. This CL stops
    > clearing the pref when launched with --app-id, and avoids
    > restoring sessions for the last active profiles
    > if launched with --app-id. Also, ignore browser opens and
    > closes if the browser window is for a web app, in order to prevent
    > kProfilesLastActive pref from getting overwritten.
    >
    > Bug: 1022795
    > Change-Id: I350a54eaaf167dabb297b9bda9061fe965f0750e
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1984710
    > Reviewed-by: Greg Thompson <grt@chromium.org>
    > Reviewed-by: David Roger <droger@chromium.org>
    > Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#827876}
    
    TBR=droger@chromium.org,grt@chromium.org,davidbienvenu@chromium.org
    
    Change-Id: Ib48b40d1c39911d9c5b1072fda35703a70be1f5a
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Bug: 1022795
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2544744Reviewed-by: default avatarMarijn Kruisselbrink <mek@chromium.org>
    Commit-Queue: Marijn Kruisselbrink <mek@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#828247}
    b95f99b5
chrome_browser_main.cc 74.6 KB