New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 729596 link

Starred by 7 users

Embedded Service Manager needs to be brought up earlier

Project Member Reported by roc...@chromium.org, Jun 5 2017

Issue description

The browser process brings up the Service Manager ASAP - as soon as the IO thread is start - but this isn't actually soon enough for some parts of the system to be fully servicified.

We should instead bring up Mojo IPC and the Service Manager as early as possible.
 
Blocking: 714855
Cc: jamescook@chromium.org

Comment 3 by jam@chromium.org, Jul 10 2017

Blocking: 740134

Comment 4 by jam@chromium.org, Jul 10 2017

Blockedon: 740677

Comment 5 by sa...@chromium.org, Jul 11 2017

Blocking: -714855

Comment 6 by jam@chromium.org, Nov 10 2017

Cc: roc...@chromium.org dtrainor@chromium.org
Owner: yfried...@chromium.org
Status: Started (was: Assigned)
Finally started poking at this. It does actually happen relatively early or at least it does in the case of content (as opposed to chrome which does a lot of init override a bunch of BrowserMainParts) but it could be earlier 

From looking at this: one option may be to pull IO thread construction and some parts of content::ServiceManagerContext out of browser main loop and then perhaps short-circuit the threads creation of browser main loop? Otherwise it's probably a huge undertaking to unwind the chrome parts that run there (profile creation as well as keyed services). I guess I'm not sure what the intended threading model we're aiming for. I expect we'll have a "Chrome browser" service which does a lot of the current init but will it be given a DB/cache/process launcher thread/task-runner or will it own those as part of its service?

The reason I thought of this approach is inspried by a sample snippet from a trace:
https://screenshot.googleplex.com/yoB1JY3D3Nz

profile init and a whole gob of our code is run as part of this message loop/browser parts construct and it looks non-trivial to break that apart or move profile init elsewhere.

That said, even this approach is tricky because it seems like we have a hard dependency on initializing finch super early, even earlier than this because it has to init stuff which affects IO thread construction. There's some "fun" comments here: https://cs.chromium.org/chromium/src/chrome/browser/chrome_browser_main.cc?q=chrome_browser_main.cc&sq=package:chromium&dr&l=1159

Feedback/suggestions welcome if you have more concrete ideas

Comment 8 by hanxi@chromium.org, Jan 10 2018

Agree with Yaron, the InitializeMojo() is called right after the CreateThread(), and the IO thread is the last thread to be created in CreateThread(). If you see the screenshot of the trace event, you will find "service_manager::mojom::Service" event is only 3 milliseconds after  "IOThread::InitAsync" event: https://screenshot.googleplex.com/w65RV7dnW7n.

Is the goal of the bug is to move the initialization of the ServiceManager as early as possible, perhaps out of the browser process main loop, as long as creating ONE thread and give it a task_runner, and it doesn't need to be the IO thread? Do you have an example which parts of the system can't be fully servicified?

Comment 9 by hanxi@chromium.org, Jan 15 2018

Dig into this issue, the ServiceManager in the browser process is created on BrowerThread::IO thread, which needs the BrowserProcessImpl to be initialized first. Currently the BrowserProcessImpl is initialized in PreCreateThreads(), so it needs to be bring up earlier. Besides, we also need to move the initialization of the delegate of the BrowerThread::IO thread (IOThread or SystemNetworkContextManager which will replace IOThread) early. So we want to which component is waiting for the ServiceManager to be initialized to make it be servicified? Is there any example? This is important because if the required component need to be initialized before BrowserProcessImpl to be created, we may need another way to start an independent ServiceManager, like the way BackgroundSeriveManager does. "Independent" means it doesn't use the browser's BrowserThread::IO thread, but an arbitrary thread.

Ken: could you please provide more background?
Cc: ranj@chromium.org yfried...@chromium.org
Owner: hanxi@chromium.org
Sure, I can try to clarify a few things:

We do want the Service Manager to continue running on BrowserThread::IO. Service Manager doesn't actually want to know about "browser threads" though, so ServiceManagerContext could just create the thread itself (with an IO MessageLoop) and use it for Service Manager initialization.

Later in BrowserMainLoop you could extract the thread from ServiceManagerContext and assign BrowserThread::IO to be that thread. This may require some light refactoring of BrowserThread and ServiceManagerContext code.

The ultimate goal here is not just to bring up SM earlier, but to be able to bring up SM without anything else. From there we can work on individual services also having their own dependencies minimized.

An example use case of this is to be able to run e.g. the network and download services (neither of which are ready yet) without the rest of the browser, for lightweight downloads on Android.


Comment 12 by hanxi@chromium.org, Jan 17 2018

Thanks Ken for the background!

My initial thoughts are to extra the creation of the BrowserThread::IO from the startup tasks, and it could be created right after the BrowserThread::UI being created. Then initialize the ServiceManagerContext.

Anyway, I agree, we can do a refactoring to make it possible to reassign the thread that ServiceManagerContext uses, similar to the |background_thread_| in the BackgroundServiceManager. Since ServiceManagerContext needs to add service manifests to the BuiltinManifestProvider, we need to initialize ui::ResourceBundle first, i.e., calls the line 1027 to 1065 line before creating a ServiceManagerContext: https://cs.chromium.org/chromium/src/chrome/browser/chrome_browser_main.cc?rcl=988b5be8b4540f2868547e2e08e6046bd693f84f&l=1027.
Blocking: 809322
Project Member

Comment 14 by bugdroid1@chromium.org, Feb 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/066637cf13d873fa6ed71430e9e60de52ebc7d7d

commit 066637cf13d873fa6ed71430e9e60de52ebc7d7d
Author: Xi Han <hanxi@google.com>
Date: Fri Feb 16 16:41:47 2018

[Servicification] Create BrowserThread::IO earlier.

In this CL, we split the creation of the BrowserThread::IO thread and
initialization of its delegate:

1. The BrowserThread::IO is created in the
   BrowserMainLoop::PostMainMessageLoopStart() after the UI thread
   is created. Adjust the tracing events in the BrowserMainLoop.
2. Simplify the logic in BrowserMainLoop::CreateThreads() since only
   the launcher thread is created there. Initializes the
   delegate of the BrowserThread::IO there.
3. Update the logic in the BrowserThreadImpl when checking whether
   the BrowserThread::IO has initialized.
4. Update BrowserMainLoopTest and BrowserProcessImplTest.

 This is the first step of starting ServiceManager earlier.

Bug: 729596
Change-Id: I7a08fd7c7bf5548f8039c8c38152ecfde3bd20c4
Reviewed-on: https://chromium-review.googlesource.com/905424
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537318}
[modify] https://crrev.com/066637cf13d873fa6ed71430e9e60de52ebc7d7d/chrome/browser/browser_process_impl_unittest.cc
[modify] https://crrev.com/066637cf13d873fa6ed71430e9e60de52ebc7d7d/content/browser/browser_main_loop.cc
[modify] https://crrev.com/066637cf13d873fa6ed71430e9e60de52ebc7d7d/content/browser/browser_main_loop.h
[modify] https://crrev.com/066637cf13d873fa6ed71430e9e60de52ebc7d7d/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/066637cf13d873fa6ed71430e9e60de52ebc7d7d/content/browser/browser_thread_impl.cc
[modify] https://crrev.com/066637cf13d873fa6ed71430e9e60de52ebc7d7d/content/browser/browser_thread_impl.h
[modify] https://crrev.com/066637cf13d873fa6ed71430e9e60de52ebc7d7d/content/public/test/test_browser_thread.cc
[modify] https://crrev.com/066637cf13d873fa6ed71430e9e60de52ebc7d7d/content/public/test/test_browser_thread.h

Cc: steve...@chromium.org
Drive-by question: Do we have any design docs or whiteboard sketches of what we want browser startup to look like in the long term?

I ask because whenever I look at it I have a hard time figuring out the responsibilities between service manager, content and chrome. Diving through all the delegates is tricky.

Steven, I know you did the "foo parts" refactor many years ago -- do you have any drawings / docs from that era?

I have been planning to make an updated chart. I will prioritize that and link it here.

Comment 17 by hanxi@chromium.org, Feb 23 2018

Blockedon: 815225

Comment 18 by hanxi@chromium.org, Feb 23 2018

Blockedon: 815230

Comment 19 by hanxi@chromium.org, Feb 23 2018

I write a doc to demonstrate the new startup flow: https://docs.google.com/document/d/1yxHCwit3p6vnNs2wiEbu9h3lCPg8HLH5QeRjqr4wQgM/edit?usp=sharing.

Comment 20 by gab@chromium.org, Mar 20 2018

Blocking: 823797
Project Member

Comment 21 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d260e9cf660f062b203692601cf9b6ccb27f3d1e

commit d260e9cf660f062b203692601cf9b6ccb27f3d1e
Author: Gabriel Charette <gab@chromium.org>
Date: Tue Mar 20 18:10:45 2018

Refactor BrowserThreadImpl, BrowserProcessSubThread, and BrowserMainLoop

This brings back the invariant that BrowserThread::IO isn't available
before BrowserMainLoop::CreateThreads(). This was broken to fix issue
729596 to bring up the thread earlier for ServiceManager but it is
important that code that posts to BrowserThread::IO statically have an
happens-after relationship to BrowserMainLoop::CreateThreads(). Exposing
it statically earlier put that invariant at risk.

Thankfully fixing  issue 815225  resulted in finally reaching the long
sought goal of only having BrowserThread::UI/IO. Now that the IO thread
is also kicked off before it's named statically, BrowserThreadImpl no
longer needs to be a base::Thread, hence this refactoring.

Before this CL:
 * BrowserThreadImpl was a base::Thread
   (could be a fake thread if SetMessageLoop was used)
 * BrowserProcessSubThread was a BrowserThreadImpl
   (performed a bit more initialization)
 * BrowserProcessSubThread was only used in production (in
   BrowserMainLoop)
 * BrowserThreadImpl was used for fake threads (BrowserMainLoop for
   BrowserThread::UI) and for testing (TestBrowserThread(Impl)).
 * BrowserThreadImpl overrode Init/Run/CleanUp() from base::Thread to
   perform some sanity checks as well as drive IOThread's Delegate (ref.
   BrowserThread::SetIOThreadDelegate())
 * BrowserProcessSubThread re-overrode Init/Run/CleanUp() to perform
   per-thread //content initialization (tests missed out on that per
   TestBrowserThread bypassing BrowserProcessSubThread by directly
   subclassing BrowserThreadImpl).

With this CL:
 * BrowserThreadImpl is merely a scoped object that binds a provided
   SingleThreadTaskRunner to a BrowserThread::ID.
 * BrowserProcessSubThread is a base::Thread and performs all of the
   initialization and cleanup specific to //content (this means it now
   also manages BrowserThread::SetIOThreadDelegate())
 * BrowserProcessSubThread can be brought up early before being bound to
   a BrowserThread::ID (BrowserMainLoop handles that through
   BrowserProcessSubThread ::RegisterAsBrowserThread())

Unfortunate exceptions required for this CL:
 * IOThread::Init() (invoked through BrowserThreadDelegate) perfoms
   blocking operations this was previously performed before installed
   the ThreadRestrictions on BrowserThread::IO. But now that //content
   is initialized after bringing up the thread, a
   base::ScopedAllowBlocking is required in scope of IOThread::Init().
 * TestBrowserThread previously bypassing BrowserProcessSubThread by
   directly subclassing BrowserThreadImpl meant it wasn't subject to
   ThreadRestrictions (unfortunate becomes it denies allowance
   verification to product code running in unit tests). Adding it back
   causes DCHECKs, as such
   BrowserProcessSubThread::AllowBlockingForTesting was added to allow
   this CL to pass CQ.

Of note:
 * BrowserProcessSubThread is still written as though it supports many
   BrowserThread::IDs but in practice it's mostly always
   BrowserThread::IO (except in ThreadWatcherTest I think). This change
   was big enough that I didn't bother also breaking that
   generalization.
 * BrowserThreadImpl's constructor was made private to ensure only
   BrowserProcessSubThread and a few select callers get to drive it (to
   avoid previous missed initialization issues)
 * Atomics to manage BrowserThread::SetIOThreadDelegate were removed.
   Restriction was instead added that this only be called before
   initialization and after shutdown (this was already the case).

Follow-ups to this CL:
 * //ios duplicates this logic and will need to undergo the same change
   as a follow-up
 * Fixing ios will allow removal of base::Thread::SetMessageLoop hack :)
 * Removing BrowserThreadGlobals::lock_ to address  crbug.com/821034  will
   be much easier
 * BrowserThread post APIs should DCHECK rather than no-op if using a
   BrowserThread::ID before it's registered.

Bug:  815225 ,  821034 , 729596
Change-Id: If1038f23079df72203b1e95c7d26647f8824a726
Reviewed-on: https://chromium-review.googlesource.com/969104
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544440}
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/base/threading/thread.h
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/base/threading/thread_restrictions.h
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/chrome/browser/browser_process_impl_unittest.cc
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_main_loop.cc
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_main_loop.h
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_main_runner.cc
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_process_sub_thread.cc
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_process_sub_thread.h
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_thread_impl.cc
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_thread_impl.h
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/browser/browser_thread_unittest.cc
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/public/browser/browser_thread.h
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/public/browser/browser_thread_delegate.h
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/public/test/test_browser_thread.cc
[modify] https://crrev.com/d260e9cf660f062b203692601cf9b6ccb27f3d1e/content/public/test/test_browser_thread.h

Project Member

Comment 22 by bugdroid1@chromium.org, Mar 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fa239c8c41939589490f62c39321b8c2504b2219

commit fa239c8c41939589490f62c39321b8c2504b2219
Author: Matt Falkenhagen <falken@chromium.org>
Date: Mon Mar 26 04:21:19 2018

Revert "Refactor BrowserThreadImpl, BrowserProcessSubThread, and BrowserMainLoop"

This reverts commit d260e9cf660f062b203692601cf9b6ccb27f3d1e.

Reason for revert: In Windows Canary versions since 67.0.3377.0, where this commit landed, IO thread hang reports have spiked dramatically. It is now the #1 browser crash report on Windows Canary at 33% of reports. I'm speculatively reverting this to see if the crash rate heals.

Original change's description:
> Refactor BrowserThreadImpl, BrowserProcessSubThread, and BrowserMainLoop
>
> This brings back the invariant that BrowserThread::IO isn't available
> before BrowserMainLoop::CreateThreads(). This was broken to fix issue
> 729596 to bring up the thread earlier for ServiceManager but it is
> important that code that posts to BrowserThread::IO statically have an
> happens-after relationship to BrowserMainLoop::CreateThreads(). Exposing
> it statically earlier put that invariant at risk.
>
> Thankfully fixing  issue 815225  resulted in finally reaching the long
> sought goal of only having BrowserThread::UI/IO. Now that the IO thread
> is also kicked off before it's named statically, BrowserThreadImpl no
> longer needs to be a base::Thread, hence this refactoring.
>
> Before this CL:
>  * BrowserThreadImpl was a base::Thread
>    (could be a fake thread if SetMessageLoop was used)
>  * BrowserProcessSubThread was a BrowserThreadImpl
>    (performed a bit more initialization)
>  * BrowserProcessSubThread was only used in production (in
>    BrowserMainLoop)
>  * BrowserThreadImpl was used for fake threads (BrowserMainLoop for
>    BrowserThread::UI) and for testing (TestBrowserThread(Impl)).
>  * BrowserThreadImpl overrode Init/Run/CleanUp() from base::Thread to
>    perform some sanity checks as well as drive IOThread's Delegate (ref.
>    BrowserThread::SetIOThreadDelegate())
>  * BrowserProcessSubThread re-overrode Init/Run/CleanUp() to perform
>    per-thread //content initialization (tests missed out on that per
>    TestBrowserThread bypassing BrowserProcessSubThread by directly
>    subclassing BrowserThreadImpl).
>
> With this CL:
>  * BrowserThreadImpl is merely a scoped object that binds a provided
>    SingleThreadTaskRunner to a BrowserThread::ID.
>  * BrowserProcessSubThread is a base::Thread and performs all of the
>    initialization and cleanup specific to //content (this means it now
>    also manages BrowserThread::SetIOThreadDelegate())
>  * BrowserProcessSubThread can be brought up early before being bound to
>    a BrowserThread::ID (BrowserMainLoop handles that through
>    BrowserProcessSubThread ::RegisterAsBrowserThread())
>
> Unfortunate exceptions required for this CL:
>  * IOThread::Init() (invoked through BrowserThreadDelegate) perfoms
>    blocking operations this was previously performed before installed
>    the ThreadRestrictions on BrowserThread::IO. But now that //content
>    is initialized after bringing up the thread, a
>    base::ScopedAllowBlocking is required in scope of IOThread::Init().
>  * TestBrowserThread previously bypassing BrowserProcessSubThread by
>    directly subclassing BrowserThreadImpl meant it wasn't subject to
>    ThreadRestrictions (unfortunate becomes it denies allowance
>    verification to product code running in unit tests). Adding it back
>    causes DCHECKs, as such
>    BrowserProcessSubThread::AllowBlockingForTesting was added to allow
>    this CL to pass CQ.
>
> Of note:
>  * BrowserProcessSubThread is still written as though it supports many
>    BrowserThread::IDs but in practice it's mostly always
>    BrowserThread::IO (except in ThreadWatcherTest I think). This change
>    was big enough that I didn't bother also breaking that
>    generalization.
>  * BrowserThreadImpl's constructor was made private to ensure only
>    BrowserProcessSubThread and a few select callers get to drive it (to
>    avoid previous missed initialization issues)
>  * Atomics to manage BrowserThread::SetIOThreadDelegate were removed.
>    Restriction was instead added that this only be called before
>    initialization and after shutdown (this was already the case).
>
> Follow-ups to this CL:
>  * //ios duplicates this logic and will need to undergo the same change
>    as a follow-up
>  * Fixing ios will allow removal of base::Thread::SetMessageLoop hack :)
>  * Removing BrowserThreadGlobals::lock_ to address  crbug.com/821034  will
>    be much easier
>  * BrowserThread post APIs should DCHECK rather than no-op if using a
>    BrowserThread::ID before it's registered.
>
> Bug:  815225 ,  821034 , 729596
> Change-Id: If1038f23079df72203b1e95c7d26647f8824a726
> Reviewed-on: https://chromium-review.googlesource.com/969104
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#544440}

TBR=gab@chromium.org,jam@chromium.org
NOPRESUBMIT=true

# Not skipping CQ checks because original CL landed > 1 day ago.
# falken: Skipping presubmit to use deprecated ThreadResrictions::DisallowWaiting().

Bug:  815225 ,  821034 , 729596
Change-Id: I2be97c5d8183497c005ab397c871f625b034d850
Reviewed-on: https://chromium-review.googlesource.com/979752
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545725}
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/base/threading/thread.h
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/base/threading/thread_restrictions.h
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/chrome/browser/browser_process_impl_unittest.cc
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_main_loop.cc
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_main_loop.h
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_main_runner.cc
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_process_sub_thread.cc
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_process_sub_thread.h
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_thread_impl.cc
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_thread_impl.h
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/browser/browser_thread_unittest.cc
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/public/browser/browser_thread.h
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/public/browser/browser_thread_delegate.h
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/public/test/test_browser_thread.cc
[modify] https://crrev.com/fa239c8c41939589490f62c39321b8c2504b2219/content/public/test/test_browser_thread.h

Project Member

Comment 23 by bugdroid1@chromium.org, Mar 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8eb4dff9914d111cbce7cbc756b0c96030151762

commit 8eb4dff9914d111cbce7cbc756b0c96030151762
Author: Gabriel Charette <gab@chromium.org>
Date: Tue Mar 27 14:22:54 2018

Reland "Refactor BrowserThreadImpl, BrowserProcessSubThread, and BrowserMainLoop"

This is a reland of d260e9cf660f062b203692601cf9b6ccb27f3d1e

It was reverted because of crbug.com/824716, these weren't new crashes
but known crashes mislabeled as a fallout of this change.
http://cl/190471699 fixes the crash backend to not rely on
"content::BrowserThreadImpl::IOThreadRun" being in the signature.

Only diff in this CL is to use base::debug::Alias() in methods that we
don't want optimized (i.e. IOThreadRun) out as CHECK_GT was seen as
optimized out in some of the reported crashes (even though the same
pattern as before was used by this CL..?)

Original change's description:
> Refactor BrowserThreadImpl, BrowserProcessSubThread, and BrowserMainLoop
>
> This brings back the invariant that BrowserThread::IO isn't available
> before BrowserMainLoop::CreateThreads(). This was broken to fix issue
> 729596 to bring up the thread earlier for ServiceManager but it is
> important that code that posts to BrowserThread::IO statically have an
> happens-after relationship to BrowserMainLoop::CreateThreads(). Exposing
> it statically earlier put that invariant at risk.
>
> Thankfully fixing  issue 815225  resulted in finally reaching the long
> sought goal of only having BrowserThread::UI/IO. Now that the IO thread
> is also kicked off before it's named statically, BrowserThreadImpl no
> longer needs to be a base::Thread, hence this refactoring.
>
> Before this CL:
>  * BrowserThreadImpl was a base::Thread
>    (could be a fake thread if SetMessageLoop was used)
>  * BrowserProcessSubThread was a BrowserThreadImpl
>    (performed a bit more initialization)
>  * BrowserProcessSubThread was only used in production (in
>    BrowserMainLoop)
>  * BrowserThreadImpl was used for fake threads (BrowserMainLoop for
>    BrowserThread::UI) and for testing (TestBrowserThread(Impl)).
>  * BrowserThreadImpl overrode Init/Run/CleanUp() from base::Thread to
>    perform some sanity checks as well as drive IOThread's Delegate (ref.
>    BrowserThread::SetIOThreadDelegate())
>  * BrowserProcessSubThread re-overrode Init/Run/CleanUp() to perform
>    per-thread //content initialization (tests missed out on that per
>    TestBrowserThread bypassing BrowserProcessSubThread by directly
>    subclassing BrowserThreadImpl).
>
> With this CL:
>  * BrowserThreadImpl is merely a scoped object that binds a provided
>    SingleThreadTaskRunner to a BrowserThread::ID.
>  * BrowserProcessSubThread is a base::Thread and performs all of the
>    initialization and cleanup specific to //content (this means it now
>    also manages BrowserThread::SetIOThreadDelegate())
>  * BrowserProcessSubThread can be brought up early before being bound to
>    a BrowserThread::ID (BrowserMainLoop handles that through
>    BrowserProcessSubThread ::RegisterAsBrowserThread())
>
> Unfortunate exceptions required for this CL:
>  * IOThread::Init() (invoked through BrowserThreadDelegate) perfoms
>    blocking operations this was previously performed before installed
>    the ThreadRestrictions on BrowserThread::IO. But now that //content
>    is initialized after bringing up the thread, a
>    base::ScopedAllowBlocking is required in scope of IOThread::Init().
>  * TestBrowserThread previously bypassing BrowserProcessSubThread by
>    directly subclassing BrowserThreadImpl meant it wasn't subject to
>    ThreadRestrictions (unfortunate becomes it denies allowance
>    verification to product code running in unit tests). Adding it back
>    causes DCHECKs, as such
>    BrowserProcessSubThread::AllowBlockingForTesting was added to allow
>    this CL to pass CQ.
>
> Of note:
>  * BrowserProcessSubThread is still written as though it supports many
>    BrowserThread::IDs but in practice it's mostly always
>    BrowserThread::IO (except in ThreadWatcherTest I think). This change
>    was big enough that I didn't bother also breaking that
>    generalization.
>  * BrowserThreadImpl's constructor was made private to ensure only
>    BrowserProcessSubThread and a few select callers get to drive it (to
>    avoid previous missed initialization issues)
>  * Atomics to manage BrowserThread::SetIOThreadDelegate were removed.
>    Restriction was instead added that this only be called before
>    initialization and after shutdown (this was already the case).
>
> Follow-ups to this CL:
>  * //ios duplicates this logic and will need to undergo the same change
>    as a follow-up
>  * Fixing ios will allow removal of base::Thread::SetMessageLoop hack :)
>  * Removing BrowserThreadGlobals::lock_ to address  crbug.com/821034  will
>    be much easier
>  * BrowserThread post APIs should DCHECK rather than no-op if using a
>    BrowserThread::ID before it's registered.
>
> Bug:  815225 ,  821034 , 729596
> Change-Id: If1038f23079df72203b1e95c7d26647f8824a726
> Reviewed-on: https://chromium-review.googlesource.com/969104
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#544440}

TBR=jam@chromium.org

Bug:  815225 ,  821034 , 729596, 824716
Change-Id: I9a180975c69a008f8519d1d3d44663aa58a74a92
Reviewed-on: https://chromium-review.googlesource.com/980793
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546104}
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/base/threading/thread.h
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/base/threading/thread_restrictions.h
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/chrome/browser/browser_process_impl_unittest.cc
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_main_loop.cc
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_main_loop.h
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_main_runner.cc
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_process_sub_thread.cc
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_process_sub_thread.h
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_thread_impl.cc
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_thread_impl.h
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/browser/browser_thread_unittest.cc
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/public/browser/browser_thread.h
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/public/browser/browser_thread_delegate.h
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/public/test/test_browser_thread.cc
[modify] https://crrev.com/8eb4dff9914d111cbce7cbc756b0c96030151762/content/public/test/test_browser_thread.h

Project Member

Comment 24 by bugdroid1@chromium.org, Apr 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/baf7fa879967e836b1b19747de8e8991409ef662

commit baf7fa879967e836b1b19747de8e8991409ef662
Author: Xi Han <hanxi@google.com>
Date: Thu Apr 12 14:42:18 2018

Setup sandbox host in browser process early.

This is the precursor step before creating a thread to start the
ServiceManager before content_main_runner is running. It is because
no thread is expected to be when the zygote process is forked. In this
CL, we move the setup to ContentMainRunner::Initialize().

Bug:  740677 ,729596
Change-Id: I90e95cce8bc32be03c944aaa17f96c79d555e7cb
Reviewed-on: https://chromium-review.googlesource.com/999741
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550191}
[modify] https://crrev.com/baf7fa879967e836b1b19747de8e8991409ef662/content/app/content_main_runner.cc
[modify] https://crrev.com/baf7fa879967e836b1b19747de8e8991409ef662/content/browser/browser_main_loop.cc
[modify] https://crrev.com/baf7fa879967e836b1b19747de8e8991409ef662/content/browser/sandbox_host_linux.h

Project Member

Comment 25 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/baf7fa879967e836b1b19747de8e8991409ef662

commit baf7fa879967e836b1b19747de8e8991409ef662
Author: Xi Han <hanxi@google.com>
Date: Thu Apr 12 14:42:18 2018

Setup sandbox host in browser process early.

This is the precursor step before creating a thread to start the
ServiceManager before content_main_runner is running. It is because
no thread is expected to be when the zygote process is forked. In this
CL, we move the setup to ContentMainRunner::Initialize().

Bug:  740677 ,729596
Change-Id: I90e95cce8bc32be03c944aaa17f96c79d555e7cb
Reviewed-on: https://chromium-review.googlesource.com/999741
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550191}
[modify] https://crrev.com/baf7fa879967e836b1b19747de8e8991409ef662/content/app/content_main_runner.cc
[modify] https://crrev.com/baf7fa879967e836b1b19747de8e8991409ef662/content/browser/browser_main_loop.cc
[modify] https://crrev.com/baf7fa879967e836b1b19747de8e8991409ef662/content/browser/sandbox_host_linux.h

Project Member

Comment 26 by bugdroid1@chromium.org, Apr 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13dfb3270d72c4b826e4f03b8178b22dd81a158f

commit 13dfb3270d72c4b826e4f03b8178b22dd81a158f
Author: Ran Ji <ranj@chromium.org>
Date: Fri Apr 27 20:39:25 2018

Load resources.pak earlier in service manager main

We need to use the content in resources.pak in service manager, but at
that time resource bundle has not been initialized. Create data pack to
load resources.pak and append the data pack to resource bundle during the
initialization.

Move path FILE_RESOURCES_PACK from chrome_paths.h to ui_base_paths.cc.

Bug: 729596, 815230
Change-Id: Iec3a9409cbd9c10775afb72944e66e26650f1181
Reviewed-on: https://chromium-review.googlesource.com/962679
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Commit-Queue: Ran Ji <ranj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554500}
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_android.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_android.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_linux.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_linux.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_mac.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_mac.mm
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_posix.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_posix.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_win.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_browser_main_win.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/content/app/content_service_manager_main_delegate.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/content/app/content_service_manager_main_delegate.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/content/public/app/content_main_delegate.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/content/public/app/content_main_delegate.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/services/service_manager/embedder/main.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/services/service_manager/embedder/main_delegate.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/ui/base/resource/resource_bundle.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/ui/base/resource/resource_bundle.h
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/ui/base/resource/resource_bundle_android.cc
[modify] https://crrev.com/13dfb3270d72c4b826e4f03b8178b22dd81a158f/ui/base/resource/resource_bundle_android.h

Project Member

Comment 27 by bugdroid1@chromium.org, Apr 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a14a8cd970f00bac9104362997eb8273d188baf3

commit a14a8cd970f00bac9104362997eb8273d188baf3
Author: John Budorick <jbudorick@chromium.org>
Date: Sat Apr 28 01:35:12 2018

Revert "Load resources.pak earlier in service manager main"

This reverts commit 13dfb3270d72c4b826e4f03b8178b22dd81a158f.

Reason for revert: Suspected cause of many test failures in https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/Linux%20Tests%20%28dbg%29%281%29/71676

Original change's description:
> Load resources.pak earlier in service manager main
> 
> We need to use the content in resources.pak in service manager, but at
> that time resource bundle has not been initialized. Create data pack to
> load resources.pak and append the data pack to resource bundle during the
> initialization.
> 
> Move path FILE_RESOURCES_PACK from chrome_paths.h to ui_base_paths.cc.
> 
> Bug: 729596, 815230
> Change-Id: Iec3a9409cbd9c10775afb72944e66e26650f1181
> Reviewed-on: https://chromium-review.googlesource.com/962679
> Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
> Reviewed-by: Ken Rockot <rockot@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Xi Han <hanxi@chromium.org>
> Commit-Queue: Ran Ji <ranj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#554500}

TBR=sky@chromium.org,yfriedman@chromium.org,rockot@chromium.org,hanxi@chromium.org,ranj@chromium.org

Change-Id: Ia23016b542b772581096492898b57f6c6ed3e075
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 729596, 815230
Reviewed-on: https://chromium-review.googlesource.com/1034132
Reviewed-by: John Budorick <jbudorick@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554603}
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_android.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_android.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_linux.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_linux.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_mac.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_mac.mm
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_posix.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_posix.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_win.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_browser_main_win.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/content/app/content_service_manager_main_delegate.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/content/app/content_service_manager_main_delegate.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/content/public/app/content_main_delegate.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/content/public/app/content_main_delegate.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/services/service_manager/embedder/main.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/services/service_manager/embedder/main_delegate.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/ui/base/resource/resource_bundle.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/ui/base/resource/resource_bundle.h
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/ui/base/resource/resource_bundle_android.cc
[modify] https://crrev.com/a14a8cd970f00bac9104362997eb8273d188baf3/ui/base/resource/resource_bundle_android.h

Project Member

Comment 28 by bugdroid1@chromium.org, May 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a96d43d4bd51f65d1736887e05b8862a81ec02be

commit a96d43d4bd51f65d1736887e05b8862a81ec02be
Author: Ran Ji <ranj@chromium.org>
Date: Wed May 02 17:14:53 2018

Load resources.pak earlier in content_main_runner

Reland "Load resources.pak earlier in service manager main"

This is a reland of 13dfb3270d72c4b826e4f03b8178b22dd81a158f

Original change's description:
> Load resources.pak earlier in service manager main
>
> We need to use the content in resources.pak in service manager, but at
> that time resource bundle has not been initialized. Create data pack to
> load resources.pak and append the data pack to resource bundle during the
> initialization.
>
> Move path FILE_RESOURCES_PACK from chrome_paths.h to ui_base_paths.cc.
>
> Bug: 729596, 815230
> Change-Id: Iec3a9409cbd9c10775afb72944e66e26650f1181
> Reviewed-on: https://chromium-review.googlesource.com/962679
> Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
> Reviewed-by: Ken Rockot <rockot@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Xi Han <hanxi@chromium.org>
> Commit-Queue: Ran Ji <ranj@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#554500}

Bug: 729596, 815230
Change-Id: Id963d1e64c70a22a29e94d8186ea0d4bcb1455fd

TBR=sky@chromium.org, yfriedman@chromium.org, rockot@chromium.org

Change-Id: Id963d1e64c70a22a29e94d8186ea0d4bcb1455fd
Reviewed-on: https://chromium-review.googlesource.com/1034133
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555443}
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_android.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_android.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_linux.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_linux.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_mac.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_mac.mm
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_posix.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_posix.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_win.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_browser_main_win.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/content/app/content_main_runner.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/content/public/app/content_main_delegate.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/content/public/app/content_main_delegate.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/ui/base/resource/resource_bundle.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/ui/base/resource/resource_bundle.h
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/ui/base/resource/resource_bundle_android.cc
[modify] https://crrev.com/a96d43d4bd51f65d1736887e05b8862a81ec02be/ui/base/resource/resource_bundle_android.h

Project Member

Comment 29 by bugdroid1@chromium.org, May 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fc95501fb29e3e7487fff98c17e6aaba1046b330

commit fc95501fb29e3e7487fff98c17e6aaba1046b330
Author: Xi Han <hanxi@google.com>
Date: Thu May 10 21:24:41 2018

Create BrowserThread::IO thread before browser main loop to start
ServiceManager.

We need a thread to post/execute tasks when starting the
ServiceManager. This thread needs to be created before the browser
main loop is initialized, and will be registered as the
BrowserThread::IO thread which is currently used by ServiceManager
connections.

The creation of such a thread is moved to service_manager::main via
MainDelegate::CreateIOThreadAndGetTaskRunner(). Since it requires no
thread created before calling fork() on posix, we also move the setup
of sandbox before creating the IO thread.

Bug:  740677 , 729596
Change-Id: I23ef57eb52bfb1eb363682dadf98c571c12afcd1
Reviewed-on: https://chromium-review.googlesource.com/969098
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557680}
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/app/BUILD.gn
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/app/content_main_runner_impl.cc
[add] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/app/content_main_runner_impl.h
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/app/content_service_manager_main_delegate.cc
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/app/content_service_manager_main_delegate.h
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/BUILD.gn
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_main.cc
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_main.h
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_main_loop.cc
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_main_loop.h
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_main_runner_impl.cc
[add] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_main_runner_impl.h
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_process_sub_thread.cc
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/browser/browser_process_sub_thread.h
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/content/public/test/browser_test_base.cc
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/services/service_manager/embedder/main.cc
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/services/service_manager/embedder/main_delegate.cc
[modify] https://crrev.com/fc95501fb29e3e7487fff98c17e6aaba1046b330/services/service_manager/embedder/main_delegate.h

Project Member

Comment 30 by bugdroid1@chromium.org, May 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d76e33d69fa134bf0110781678feac57ae83e5c

commit 5d76e33d69fa134bf0110781678feac57ae83e5c
Author: Chris Pickel <sfiera@chromium.org>
Date: Tue May 15 12:18:57 2018

Revert "Create BrowserThread::IO thread before browser main loop to start"

This reverts commit fc95501fb29e3e7487fff98c17e6aaba1046b330.

Reason for revert:
Findit (https://goo.gl/kROfz5) identified this CL at revision 557680 as the culprit
for introducing flakiness in the tests as shown on:
https://findit-for-me.appspot.com/waterfall/flake/flake-culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyQwsSDEZsYWtlQ3VscHJpdCIxY2hyb21pdW0vZmM5NTUwMWZiMjllM2U3NDg3ZmZmOThjMTdlNmFhYmExMDQ2YjMzMAw

Original change's description:
> Create BrowserThread::IO thread before browser main loop to start
> ServiceManager.
> 
> We need a thread to post/execute tasks when starting the
> ServiceManager. This thread needs to be created before the browser
> main loop is initialized, and will be registered as the
> BrowserThread::IO thread which is currently used by ServiceManager
> connections.
> 
> The creation of such a thread is moved to service_manager::main via
> MainDelegate::CreateIOThreadAndGetTaskRunner(). Since it requires no
> thread created before calling fork() on posix, we also move the setup
> of sandbox before creating the IO thread.
> 
> Bug:  740677 , 729596
> Change-Id: I23ef57eb52bfb1eb363682dadf98c571c12afcd1
> Reviewed-on: https://chromium-review.googlesource.com/969098
> Commit-Queue: Xi Han <hanxi@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#557680}

TBR=gab@chromium.org,jam@chromium.org,hanxi@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  740677 , 729596
Change-Id: Ia548067acbf640010f4c8fbed29a0012a274af05
Reviewed-on: https://chromium-review.googlesource.com/1059167
Reviewed-by: Chris Pickel <sfiera@chromium.org>
Commit-Queue: Chris Pickel <sfiera@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558668}
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/app/BUILD.gn
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/app/content_main_runner_impl.cc
[delete] https://crrev.com/a17bbb370bf5597c6d00f2ef6a8bea3ca6e16e38/content/app/content_main_runner_impl.h
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/app/content_service_manager_main_delegate.cc
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/app/content_service_manager_main_delegate.h
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/BUILD.gn
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/browser_main.cc
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/browser_main.h
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/browser_main_loop.cc
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/browser_main_loop.h
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/browser_main_runner_impl.cc
[delete] https://crrev.com/a17bbb370bf5597c6d00f2ef6a8bea3ca6e16e38/content/browser/browser_main_runner_impl.h
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/browser_process_sub_thread.cc
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/browser/browser_process_sub_thread.h
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/content/public/test/browser_test_base.cc
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/services/service_manager/embedder/main.cc
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/services/service_manager/embedder/main_delegate.cc
[modify] https://crrev.com/5d76e33d69fa134bf0110781678feac57ae83e5c/services/service_manager/embedder/main_delegate.h

Project Member

Comment 31 by bugdroid1@chromium.org, May 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6740d6248c24fdb1a591dad3aaaf312919e35fa5

commit 6740d6248c24fdb1a591dad3aaaf312919e35fa5
Author: Xi Han <hanxi@google.com>
Date: Tue May 22 19:21:07 2018

Reland "Create BrowserThread::IO thread before browser main loop to start"

This is a reland of I23ef57eb52bfb1eb363682dadf98c571c12afcd1.

It was reverted in Ia548067acbf640010f4c8fbed29a0012a274af05. Reason for revert:
Findit (https://goo.gl/kROfz5) identified this CL at revision 557680 as the culprit
for introducing flakiness in the tests as shown on:
https://findit-for-me.appspot.com/waterfall/flake/flake-culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyQwsSDEZsYWtlQ3VscHJpdCIxY2hyb21pdW0vZmM5NTUwMWZiMjllM2U3NDg3ZmZmOThjMTdlNmFhYmExMDQ2YjMzMAw

The data race has been fixed in:
https://chromium-review.googlesource.com/c/chromium/src/+/1064450.

Original change's description:
> Create BrowserThread::IO thread before browser main loop to start
> ServiceManager.
>
> We need a thread to post/execute tasks when starting the
> ServiceManager. This thread needs to be created before the browser
> main loop is initialized, and will be registered as the
> BrowserThread::IO thread which is currently used by ServiceManager
> connections.
>
> The creation of such a thread is moved to service_manager::main via
> MainDelegate::CreateIOThreadAndGetTaskRunner(). Since it requires no
> thread created before calling fork() on posix, we also move the setup
> of sandbox before creating the IO thread.
>
> Bug:  740677 , 729596
> Change-Id: I23ef57eb52bfb1eb363682dadf98c571c12afcd1
> Reviewed-on: https://chromium-review.googlesource.com/969098
> Commit-Queue: Xi Han <hanxi@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#557680}


Bug:  740677 , 729596
Change-Id: I9afb0cdc0f11a1d437c2e9bd09c374503c3d5a4b
Reviewed-on: https://chromium-review.googlesource.com/1059949
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560724}
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/app/BUILD.gn
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/app/content_main_runner_impl.cc
[add] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/app/content_main_runner_impl.h
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/app/content_service_manager_main_delegate.cc
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/app/content_service_manager_main_delegate.h
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/BUILD.gn
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_main.cc
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_main.h
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_main_loop.cc
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_main_loop.h
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_main_runner_impl.cc
[add] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_main_runner_impl.h
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_process_sub_thread.cc
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/browser/browser_process_sub_thread.h
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/content/public/test/browser_test_base.cc
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/services/service_manager/embedder/main.cc
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/services/service_manager/embedder/main_delegate.cc
[modify] https://crrev.com/6740d6248c24fdb1a591dad3aaaf312919e35fa5/services/service_manager/embedder/main_delegate.h

Project Member

Comment 32 by bugdroid1@chromium.org, May 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/12595546f8b1495da70ceed270aadf2827d93ac6

commit 12595546f8b1495da70ceed270aadf2827d93ac6
Author: Xi Han <hanxi@google.com>
Date: Fri May 25 14:30:36 2018

[ServiceManagerContext] Pass a task runner to ServiceManagerContext.

Currently, the ServiceManagerContext uses the BrowserThread::IO to start the
ServiceManager. We want to create the ServiceManagerContext earlier and start
the ServiceManager in the thread that hasn't prompted to BrowserThread::IO yet.

In this CL, a task runner is explictly passed to the constructor of the
ServiceManagerContext to remove the dependency of BrowserThread::IO.

Bug: 729596
Change-Id: I948d6bbd7e5623dbc5c08552ba2b80505e403e67
Reviewed-on: https://chromium-review.googlesource.com/1055757
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561866}
[modify] https://crrev.com/12595546f8b1495da70ceed270aadf2827d93ac6/content/browser/browser_main_loop.cc
[modify] https://crrev.com/12595546f8b1495da70ceed270aadf2827d93ac6/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/12595546f8b1495da70ceed270aadf2827d93ac6/content/browser/service_manager/service_manager_context.h
[modify] https://crrev.com/12595546f8b1495da70ceed270aadf2827d93ac6/content/public/test/test_service_manager_context.cc

Comment 33 by hanxi@chromium.org, May 25 2018

Blocking: 846815

Comment 34 by hanxi@chromium.org, May 25 2018

Blockedon: 846846

Comment 35 by hanxi@chromium.org, Jun 12 2018

Blockedon: 852031

Comment 36 by hanxi@chromium.org, Jun 15 2018

Blockedon: 853254
Project Member

Comment 37 by bugdroid1@chromium.org, Jun 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/57b856f8e551d4c7b2d02000e581650acbc5b31b

commit 57b856f8e551d4c7b2d02000e581650acbc5b31b
Author: Xi Han <hanxi@google.com>
Date: Fri Jun 22 18:10:10 2018

Refactor of ServiceManagerContext.

In this CL, we refactor the ServiceManagerContext to make sure all of the
services can be registered without any dependency of BrowserMainLoop.
It includes the following changes:
1) Add API StartBrowserConnection() in ServiceManagerContext to start the
   browser connection to the ServiceManager. This API must be called after the
   BrowserMainLoop starts.
2) Make OutOfProcessServiceInfo takes a RepeatingCallbacks to get the process
   name.
3) ServiceMangerContext owns the DeferredSequencedTaskRunner for audio service.
   It was owned by BrowserMainloop before this CL.

BUG= 846846 ,729596

Change-Id: I29725a383e2662fccd8a2fba5fedddc52a8c565c
Reviewed-on: https://chromium-review.googlesource.com/1093021
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569694}
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/android_webview/browser/aw_content_browser_client.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/ash/shell/content/client/shell_content_browser_client.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/chrome/browser/ash_service_registry.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/content/browser/browser_main_loop.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/content/browser/browser_main_loop.h
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/content/browser/service_manager/service_manager_context.h
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/content/public/browser/content_browser_client.h
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/content/public/test/test_service_manager_context.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/content/shell/browser/shell_content_browser_client.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/headless/lib/browser/headless_content_browser_client.cc
[modify] https://crrev.com/57b856f8e551d4c7b2d02000e581650acbc5b31b/services/service_manager/embedder/embedded_service_runner.cc

Project Member

Comment 38 by bugdroid1@chromium.org, Jul 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3d6ec66dcda2156fea34c545dd69a421e096ec60

commit 3d6ec66dcda2156fea34c545dd69a421e096ec60
Author: Ran Ji <ranj@chromium.org>
Date: Mon Jul 09 21:18:30 2018

Start message loop on creation on Android

The message loop has to be started to post tasks on Android. Previously
the message loop is started on PreEarlyInitialization(). Now we need to
post tasks earlier than that. This change starts the message loop when
it being created on Android.

For files:
android_webview/browser/aw_browser_main_parts.cc,
chrome/browser/chrome_browser_main_android.cc,
chromecast/browser/cast_browser_main_parts.cc,
components/cronet/android/cronet_library_loader.cc,
content/shell/browser/shell_browser_main_parts.cc,
remoting/client/chromoting_client_runtime.cc

TBR=boliu@chromium.org,yfriedman@chromium.org,halliwell@chromium.org,kapishnikov@chromium.org,mkwst@chromium.org,garykac@chromium.org

Bug:  848615 , 729596
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I4b2a2afb570096cc56339978ef8e4ba3f3f9ecc7
Reviewed-on: https://chromium-review.googlesource.com/1112958
Commit-Queue: Ran Ji <ranj@chromium.org>
Reviewed-by: Ran Ji <ranj@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573447}
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/android_webview/browser/aw_browser_main_parts.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/android/java_handler_thread.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/android/java_handler_thread.h
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/message_loop/message_loop.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/message_loop/message_loop.h
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/message_loop/message_loop_current.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/message_loop/message_loop_current.h
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/message_loop/message_pump_android.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/message_loop/message_pump_android.h
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/base/test/test_support_android.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/chrome/browser/chrome_browser_main_android.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/chromecast/browser/cast_browser_main_parts.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/components/cronet/android/cronet_library_loader.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/content/public/test/nested_message_pump_android.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/content/public/test/nested_message_pump_android.h
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/content/shell/browser/shell_browser_main_parts.cc
[modify] https://crrev.com/3d6ec66dcda2156fea34c545dd69a421e096ec60/remoting/client/chromoting_client_runtime.cc

Project Member

Comment 39 by bugdroid1@chromium.org, Jul 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3

commit 6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3
Author: Ran Ji <ranj@chromium.org>
Date: Mon Jul 09 23:51:29 2018

Move kApplicationLocale pref to ui/base

We need to use the pref in components, so move the pref to ui/base so it
can be accessed.

TBR=jam@chromium.org

Bug: 729596
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Iffc7c5c2f459340c14a74787defeab00c6c5589c
Reviewed-on: https://chromium-review.googlesource.com/1125143
Commit-Queue: Ran Ji <ranj@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573536}
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/accessibility/accessibility_manager.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/accessibility/dictation_chromeos.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/hats/hats_dialog.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/locale_change_guard.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/login/oobe_localization_browsertest.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/login/screens/welcome_screen.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/chromeos/login/ui/login_display_host_webui.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/extensions/api/settings_private/prefs_util.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/lifetime/application_lifetime.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/policy/configuration_policy_handler_list_factory.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/prefs/chrome_command_line_pref_store.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/prefs/chrome_command_line_pref_store_unittest.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/profiles/profile.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/profiles/profile_impl.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/search/one_google_bar/one_google_bar_loader_impl_unittest.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/ui/app_list/arc/arc_app_utils.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/ui/search/local_ntp_test_utils.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/browser/ui/webui/settings/languages_handler.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/common/pref_names.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/common/pref_names.h
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/chrome/service/service_process.cc
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/ios/chrome/browser/prefs/browser_prefs.mm
[modify] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/ui/base/BUILD.gn
[add] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/ui/base/pref_names.cc
[add] https://crrev.com/6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3/ui/base/pref_names.h

Project Member

Comment 40 by bugdroid1@chromium.org, Jul 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5908cff94737bde5356c8305a348f66cae6788c2

commit 5908cff94737bde5356c8305a348f66cae6788c2
Author: Ran Ji <ranj@chromium.org>
Date: Wed Jul 11 20:00:02 2018

Revert "Move kApplicationLocale pref to ui/base"

This reverts commit 6ad1cbd1bd26744de3a8d9be9e6fb824ac5c12b3.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Move kApplicationLocale pref to ui/base
> 
> We need to use the pref in components, so move the pref to ui/base so it
> can be accessed.
> 
> TBR=jam@chromium.org
> 
> Bug: 729596
> Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
> Change-Id: Iffc7c5c2f459340c14a74787defeab00c6c5589c
> Reviewed-on: https://chromium-review.googlesource.com/1125143
> Commit-Queue: Ran Ji <ranj@chromium.org>
> Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#573536}

TBR=sky@chromium.org,jam@chromium.org,asvitkine@chromium.org,ranj@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 729596
Change-Id: I950b8aa43701741de843172f24dd4a1b9887a5de
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Reviewed-on: https://chromium-review.googlesource.com/1133618
Reviewed-by: Ran Ji <ranj@chromium.org>
Commit-Queue: Ran Ji <ranj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574293}
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/accessibility/accessibility_manager.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/accessibility/dictation_chromeos.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/hats/hats_dialog.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/locale_change_guard.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/login/oobe_localization_browsertest.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/login/screens/welcome_screen.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/chromeos/login/ui/login_display_host_webui.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/extensions/api/settings_private/prefs_util.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/lifetime/application_lifetime.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/policy/configuration_policy_handler_list_factory.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/prefs/chrome_command_line_pref_store.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/prefs/chrome_command_line_pref_store_unittest.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/profiles/profile.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/profiles/profile_impl.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/search/one_google_bar/one_google_bar_loader_impl_unittest.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/ui/app_list/arc/arc_app_utils.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/ui/search/local_ntp_test_utils.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/browser/ui/webui/settings/languages_handler.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/common/pref_names.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/common/pref_names.h
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/chrome/service/service_process.cc
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/ios/chrome/browser/prefs/browser_prefs.mm
[modify] https://crrev.com/5908cff94737bde5356c8305a348f66cae6788c2/ui/base/BUILD.gn
[delete] https://crrev.com/8e20a770c6072f9563c9c12f001876c7ae59469a/ui/base/pref_names.cc
[delete] https://crrev.com/8e20a770c6072f9563c9c12f001876c7ae59469a/ui/base/pref_names.h

Project Member

Comment 41 by bugdroid1@chromium.org, Jul 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/73f3b43c1a65d881bc4b5a60608f3019f635dfb7

commit 73f3b43c1a65d881bc4b5a60608f3019f635dfb7
Author: Ran Ji <ranj@chromium.org>
Date: Sun Jul 15 22:10:27 2018

Move kApplicationLocale pref to components/language/

We need to use the pref in components, move the pref to components/language/
so it can be accessed.

Bug: 729596
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I37cb0b6fd9976ff8fc6d3239e01d4f38fc7b73f4
Reviewed-on: https://chromium-review.googlesource.com/1135198
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Ran Ji <ranj@chromium.org>
Commit-Queue: Ran Ji <ranj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575190}
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/accessibility/accessibility_manager.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/accessibility/dictation_chromeos.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/hats/hats_dialog.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/locale_change_guard.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/login/oobe_localization_browsertest.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/login/screens/welcome_screen.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/login/session/user_session_manager.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/chromeos/login/ui/login_display_host_webui.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/extensions/api/settings_private/prefs_util.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/lifetime/application_lifetime.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/policy/configuration_policy_handler_list_factory.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/prefs/chrome_command_line_pref_store.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/prefs/chrome_command_line_pref_store_unittest.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/profiles/profile.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/profiles/profile_impl.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/ui/app_list/arc/arc_app_utils.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/ui/search/local_ntp_test_utils.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/browser/ui/webui/settings/languages_handler.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/common/pref_names.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/common/pref_names.h
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/service/DEPS
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/chrome/service/service_process.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/components/language/core/browser/pref_names.cc
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/components/language/core/browser/pref_names.h
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/ios/chrome/browser/prefs/BUILD.gn
[modify] https://crrev.com/73f3b43c1a65d881bc4b5a60608f3019f635dfb7/ios/chrome/browser/prefs/browser_prefs.mm

Blocking: 864625
Blocking: -864625
Blockedon: 864625
Project Member

Comment 45 by bugdroid1@chromium.org, Aug 27

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ddb1ab17fe48895fa8d1ef920dfe9150ae664715

commit ddb1ab17fe48895fa8d1ef920dfe9150ae664715
Author: Xi Han <hanxi@google.com>
Date: Mon Aug 27 22:18:54 2018

[FeatureList] Load local state file into a pref_store, and use the pref store to init local state later. [1/3]

The reason to create local state in two steps is because we need to read some value from the
local state file first, and at that time it's too early to create the full local state object.

We read local state file by creating a simple pref_service from the pref_store, and when
local state is ready, reset all the objects that uses the simple pref_service to use the
full local state.

This is the first step to move feature list creation earlier on
content_main_runner. We need the simple pref service to create feature list.

This CL comes from https://crrev.com/c/1081759. See previous discussion there.

More info is available on design doc
https://docs.google.com/document/d/1czDvrWU5bE9okOiX-uMwJuZ09SzqxTEW3zHAJG11RVI/edit

Bug:  848615 , 729596
Change-Id: I3e58768ab68e75d51b9a64155923565823e154e3
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Reviewed-on: https://chromium-review.googlesource.com/1148959
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586445}
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/BUILD.gn
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/browser_process_impl.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/browser_process_impl_unittest.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_android.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_android.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_linux.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_linux.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_mac.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_mac.mm
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_posix.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_posix.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_win.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_browser_main_win.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_content_browser_client.h
[add] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_feature_list_creator.cc
[add] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chrome_feature_list_creator.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/prefs/chrome_pref_service_factory.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/chrome/browser/prefs/chrome_pref_service_factory.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/content/public/app/content_main_delegate.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/content/shell/app/shell_main_delegate.cc
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/content/shell/app/shell_main_delegate.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/extensions/shell/app/shell_main_delegate.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/extensions/shell/app/shell_main_delegate_mac.mm
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/headless/lib/headless_content_main_delegate.h
[modify] https://crrev.com/ddb1ab17fe48895fa8d1ef920dfe9150ae664715/headless/lib/headless_content_main_delegate_mac.mm

Project Member

Comment 46 by bugdroid1@chromium.org, Aug 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/08ae48ad56797b61f478f92dc243fc2dc09cccd3

commit 08ae48ad56797b61f478f92dc243fc2dc09cccd3
Author: Xi Han <hanxi@google.com>
Date: Tue Aug 28 15:18:31 2018

[FeatureList] Change GetApplicationLocale() in VariationsServiceClient to be a local function. [2/3]

Before this function uses a pref in Chrome so we need to override it in Chrome
to access that pref value.

As a followup for this cl https://crrev.com/c/1135198,
now we can access the pref directly in componment/ and we no longer need to do that.

This CL comes from https://crrev.com/c/1140356. See previous discussion there.

Bug:729596
TBR=asvitkine@chromium.org

Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I7bf5631b81436344ccb17aaa2a8d6ac4167f5d7f
Reviewed-on: https://chromium-review.googlesource.com/1147481
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586711}
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/android_webview/browser/aw_variations_service_client.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/android_webview/browser/aw_variations_service_client.h
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/chrome/browser/chrome_browser_main_mac.mm
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/chrome/browser/metrics/variations/chrome_variations_service_client.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/chrome/browser/metrics/variations/chrome_variations_service_client.h
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/components/variations/service/BUILD.gn
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/components/variations/service/DEPS
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/components/variations/service/variations_field_trial_creator.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/components/variations/service/variations_field_trial_creator_unittest.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/components/variations/service/variations_service_client.h
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/components/variations/service/variations_service_unittest.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/content/browser/browser_main_loop.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/ios/chrome/browser/variations/ios_chrome_variations_service_client.cc
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/ios/chrome/browser/variations/ios_chrome_variations_service_client.h
[modify] https://crrev.com/08ae48ad56797b61f478f92dc243fc2dc09cccd3/ui/base/l10n/l10n_util_win.h

Project Member

Comment 47 by bugdroid1@chromium.org, Sep 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bbd73f075981027f4c8a4922b97d87b6a17c7f86

commit bbd73f075981027f4c8a4922b97d87b6a17c7f86
Author: Xi Han <hanxi@chromium.org>
Date: Tue Sep 04 17:21:48 2018

Revert "[FeatureList] Change GetApplicationLocale() in VariationsServiceClient to be a local function. [2/3]"

This reverts commit 08ae48ad56797b61f478f92dc243fc2dc09cccd3.

Reason for revert: crbug.com/879703, crbug.com/879547.

Original change's description:
> [FeatureList] Change GetApplicationLocale() in VariationsServiceClient to be a local function. [2/3]
>
> Before this function uses a pref in Chrome so we need to override it in Chrome
> to access that pref value.
>
> As a followup for this cl https://crrev.com/c/1135198,
> now we can access the pref directly in componment/ and we no longer need to do that.
>
> This CL comes from https://crrev.com/c/1140356. See previous discussion there.
>
> Bug:729596
> TBR=asvitkine@chromium.org
>
> Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
> Change-Id: I7bf5631b81436344ccb17aaa2a8d6ac4167f5d7f
> Reviewed-on: https://chromium-review.googlesource.com/1147481
> Commit-Queue: Xi Han <hanxi@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#586711}

TBR=sky@chromium.org,jam@chromium.org,asvitkine@chromium.org,hanxi@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 729596,879703,
Change-Id: I9447c4a44c5f77b6d6cbe633110895c6940d9fad
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/1203881
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588564}
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/android_webview/browser/aw_variations_service_client.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/android_webview/browser/aw_variations_service_client.h
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/chrome/browser/chrome_browser_main_mac.mm
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/chrome/browser/metrics/variations/chrome_variations_service_client.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/chrome/browser/metrics/variations/chrome_variations_service_client.h
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/components/variations/service/BUILD.gn
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/components/variations/service/DEPS
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/components/variations/service/variations_field_trial_creator.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/components/variations/service/variations_field_trial_creator_unittest.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/components/variations/service/variations_service_client.h
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/components/variations/service/variations_service_unittest.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/content/browser/browser_main_loop.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/ios/chrome/browser/variations/ios_chrome_variations_service_client.cc
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/ios/chrome/browser/variations/ios_chrome_variations_service_client.h
[modify] https://crrev.com/bbd73f075981027f4c8a4922b97d87b6a17c7f86/ui/base/l10n/l10n_util_win.h

Project Member

Comment 48 by bugdroid1@chromium.org, Sep 6

Labels: merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e303cffd9dd382b53c5d9017c78b7816f38a870c

commit e303cffd9dd382b53c5d9017c78b7816f38a870c
Author: Xi Han <hanxi@chromium.org>
Date: Thu Sep 06 14:15:41 2018

Revert "[FeatureList] Change GetApplicationLocale() in VariationsServiceClient to be a local function. [2/3]"

This reverts commit 08ae48ad56797b61f478f92dc243fc2dc09cccd3.

Reason for revert: crbug.com/879703, crbug.com/879547.

Original change's description:
> [FeatureList] Change GetApplicationLocale() in VariationsServiceClient to be a local function. [2/3]
>
> Before this function uses a pref in Chrome so we need to override it in Chrome
> to access that pref value.
>
> As a followup for this cl https://crrev.com/c/1135198,
> now we can access the pref directly in componment/ and we no longer need to do that.
>
> This CL comes from https://crrev.com/c/1140356. See previous discussion there.
>
> Bug:729596
> TBR=asvitkine@chromium.org
>
> Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
> Change-Id: I7bf5631b81436344ccb17aaa2a8d6ac4167f5d7f
> Reviewed-on: https://chromium-review.googlesource.com/1147481
> Commit-Queue: Xi Han <hanxi@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#586711}

TBR=sky@chromium.org,jam@chromium.org,asvitkine@chromium.org,hanxi@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 729596,879703,
Change-Id: I9447c4a44c5f77b6d6cbe633110895c6940d9fad
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/1203881
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#588564}(cherry picked from commit bbd73f075981027f4c8a4922b97d87b6a17c7f86)
Reviewed-on: https://chromium-review.googlesource.com/1209548
Cr-Commit-Position: refs/branch-heads/3538@{#88}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/android_webview/browser/aw_variations_service_client.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/android_webview/browser/aw_variations_service_client.h
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/chrome/browser/chrome_browser_main_mac.mm
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/chrome/browser/metrics/variations/chrome_variations_service_client.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/chrome/browser/metrics/variations/chrome_variations_service_client.h
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/components/variations/service/BUILD.gn
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/components/variations/service/DEPS
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/components/variations/service/variations_field_trial_creator.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/components/variations/service/variations_field_trial_creator_unittest.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/components/variations/service/variations_service_client.h
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/components/variations/service/variations_service_unittest.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/content/browser/browser_main_loop.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/ios/chrome/browser/variations/ios_chrome_variations_service_client.cc
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/ios/chrome/browser/variations/ios_chrome_variations_service_client.h
[modify] https://crrev.com/e303cffd9dd382b53c5d9017c78b7816f38a870c/ui/base/l10n/l10n_util_win.h

Blockedon: 887459
Blockedon: 887468
Blockedon: 887638
Project Member

Comment 52 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/392ebc5d51c32fea4a5cec91cc2825494feddc9c

commit 392ebc5d51c32fea4a5cec91cc2825494feddc9c
Author: Xi Han <hanxi@google.com>
Date: Thu Oct 04 14:25:34 2018

Reland "[FeatureList] Change GetApplicationLocale() in VariationsServiceClient to be a local function. [2/3]"

TThis is a reland of 08ae48ad56797b61f478f92dc243fc2dc09cccd3(r586711,
reverted in r588564).

The reland caches the locale value in VariationsFieldTrialCreator after calling
GetApplicationLocale() in the constructor. This is because GetApplicationLocale()
needs IO work and shouldn't be called on the UI thread. Besides, the locale
value won't change after the startup, so it is fine to cache its value.

Original change's description:

Before this function uses a pref in Chrome so we need to override it in Chrome
to access that pref value.

As a followup for this cl https://crrev.com/c/1135198,
now we can access the pref directly in componment/ and we no longer need to do that.

This CL comes from https://crrev.com/c/1140356. See previous discussion there.

Bug: 729596
Change-Id: I1519f80d393416b58cdb3fcd599fb15e0dd14280
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Reviewed-on: https://chromium-review.googlesource.com/c/1213308
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Michael Martis <martis@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596656}
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/android_webview/browser/aw_variations_service_client.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/android_webview/browser/aw_variations_service_client.h
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/chrome/browser/chrome_browser_main_mac.mm
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/chrome/browser/metrics/variations/chrome_variations_service_client.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/chrome/browser/metrics/variations/chrome_variations_service_client.h
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/language/core/browser/BUILD.gn
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/language/core/browser/DEPS
[add] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/language/core/browser/locale_util.cc
[add] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/language/core/browser/locale_util.h
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/variations/service/BUILD.gn
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/variations/service/DEPS
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/variations/service/variations_field_trial_creator.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/variations/service/variations_field_trial_creator.h
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/variations/service/variations_field_trial_creator_unittest.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/variations/service/variations_service_client.h
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/components/variations/service/variations_service_unittest.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/content/browser/browser_main_loop.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/ios/chrome/browser/variations/ios_chrome_variations_service_client.cc
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/ios/chrome/browser/variations/ios_chrome_variations_service_client.h
[modify] https://crrev.com/392ebc5d51c32fea4a5cec91cc2825494feddc9c/ui/base/l10n/l10n_util_win.h

Project Member

Comment 53 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/07bad289f1885c3c7a1e493feddea5ff406e202f

commit 07bad289f1885c3c7a1e493feddea5ff406e202f
Author: Xi Han <hanxi@google.com>
Date: Thu Oct 04 15:13:58 2018

Create feature list before browser main loop starts. [3/3]

This CL originally comes from ran@'s CL(https://crrev.com/c/1102826).
It follows up CLs: https://crrev.com/c/1148959 and
https://crrev.com/c/1213308.

In this CL, we create the local_state in ChromeFetureListCreator, and its
ownership is passed to the BrowerProcessImpl when the full browser starts.
Classes required to create FeatureList and setup FieldTrial, e.g.
VariationsService, MetricsServicesManager etc., are also created in the
ChromeFeatureListCreator and the ownerships are passed to the
BrowserProcessImpl when it is instantiated.

For ChromeOS, we move the initialization of the DBus to
ChromeFeatureListCreator as well before creating the
BrowserPolicyConnectorChromeOS. The BrowserPolicyConnector is required to
create the PolicyService when creating local_state.
internal::PreEarlyInitDBus is moved to a helper file with two static
functions.

Bug:  848615 , 729596
Change-Id: I93a31879e566b14eb01b4e63a4ad8786cc7e16da
Reviewed-on: https://chromium-review.googlesource.com/c/1173163
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Cait Phillips <caitkp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596671}
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/BUILD.gn
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/browser_process_impl.h
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chrome_browser_main.h
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chrome_content_browser_client.h
[delete] https://crrev.com/113acba4154e81809c7c22cbbbb365c8e9ec7ebc/chrome/browser/chrome_feature_list_creator.cc
[delete] https://crrev.com/113acba4154e81809c7c22cbbbb365c8e9ec7ebc/chrome/browser/chrome_feature_list_creator.h
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chromeos/chrome_browser_main_chromeos.h
[add] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chromeos/dbus/dbus_helper.cc
[add] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/chromeos/dbus/dbus_helper.h
[add] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/metrics/chrome_feature_list_creator.cc
[add] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/metrics/chrome_feature_list_creator.h
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/metrics/chrome_metrics_service_accessor.cc
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/metrics/chrome_metrics_service_accessor.h
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/prefs/chrome_pref_service_factory.cc
[modify] https://crrev.com/07bad289f1885c3c7a1e493feddea5ff406e202f/chrome/browser/prefs/chrome_pref_service_factory.h

Project Member

Comment 54 by bugdroid1@chromium.org, Oct 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/636c7ca51e07cecce633758ad27674e842114365

commit 636c7ca51e07cecce633758ad27674e842114365
Author: Xi Han <hanxi@google.com>
Date: Thu Oct 04 16:56:29 2018

[FeatureList] Create default FeatureList early in PostEarlyInitialization.

This CL add a default implementation of
ContentMainDelegate::PostEarlyInitialization() to create FeatureList,
and remove the creation in BrowserMainLoop which happens after staring
the TaskScheduler in CL (https://crrev.com/c/1174955). This
fix browser tests failures when the TaskScheduler is starting before
FeatureList is created.

Bug:  848615 , 729596
Change-Id: I9f9e85c785d41ad518db4170db53c4fc1d57e90d
Reviewed-on: https://chromium-review.googlesource.com/c/1228615
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Paul Miller <paulmiller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596712}
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/android_webview/browser/aw_browser_main_parts.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/android_webview/browser/aw_browser_main_parts.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/android_webview/lib/aw_main_delegate.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/android_webview/lib/aw_main_delegate.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/chrome/browser/chrome_browser_main.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/chromecast/app/cast_main_delegate.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/chromecast/app/cast_main_delegate.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/chromecast/browser/cast_browser_main_parts.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/chromecast/browser/cast_browser_main_parts.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/app/content_main_runner_impl.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/browser/BUILD.gn
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/browser/browser_main_loop.cc
[add] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/browser/startup_helper.cc
[add] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/browser/startup_helper.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/public/app/content_main_delegate.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/public/app/content_main_delegate.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/public/browser/browser_main_parts.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/public/browser/browser_main_parts.h
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/public/test/browser_test_base.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/shell/browser/shell_browser_main_parts.cc
[modify] https://crrev.com/636c7ca51e07cecce633758ad27674e842114365/content/shell/browser/shell_browser_main_parts.h

Blockedon: 892633
Blockedon: 892636
Blockedon: 893707
Project Member

Comment 58 by bugdroid1@chromium.org, Oct 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b80ea1c80ef7c8ec439c14def8120498fc35eda8

commit b80ea1c80ef7c8ec439c14def8120498fc35eda8
Author: Roman Sorokin <rsorokin@chromium.org>
Date: Fri Oct 12 08:10:23 2018

Override stub path before PreEarlyInitDBus

Otherwise install attributes are not loaded on the linux Chrome OS
build.

TEST=manual

Bug:  848615 , 729596
Change-Id: I445b2b337b707822459c076058610f49f02767ab
Reviewed-on: https://chromium-review.googlesource.com/c/1264643
Commit-Queue: Roman Sorokin <rsorokin@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599138}
[modify] https://crrev.com/b80ea1c80ef7c8ec439c14def8120498fc35eda8/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/b80ea1c80ef7c8ec439c14def8120498fc35eda8/chrome/browser/metrics/chrome_feature_list_creator.cc

Cc: -roc...@chromium.org rockot@google.com
Project Member

Comment 60 by bugdroid1@chromium.org, Oct 22

Labels: merge-merged-3578
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d2cf2269fe4c6bd6a7ca4330d684a2b8790b543f

commit d2cf2269fe4c6bd6a7ca4330d684a2b8790b543f
Author: Roman Sorokin <rsorokin@chromium.org>
Date: Mon Oct 22 17:59:33 2018

Override stub path before PreEarlyInitDBus

Otherwise install attributes are not loaded on the linux Chrome OS
build.

TEST=manual

Bug:  848615 , 729596
Change-Id: I445b2b337b707822459c076058610f49f02767ab
Reviewed-on: https://chromium-review.googlesource.com/c/1264643
Commit-Queue: Roman Sorokin <rsorokin@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#599138}(cherry picked from commit b80ea1c80ef7c8ec439c14def8120498fc35eda8)
Reviewed-on: https://chromium-review.googlesource.com/c/1294207
Cr-Commit-Position: refs/branch-heads/3578@{#225}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
[modify] https://crrev.com/d2cf2269fe4c6bd6a7ca4330d684a2b8790b543f/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
[modify] https://crrev.com/d2cf2269fe4c6bd6a7ca4330d684a2b8790b543f/chrome/browser/metrics/chrome_feature_list_creator.cc

Cc: hnakashima@chromium.org
Labels: Merge-Merged-71-3578
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/d2cf2269fe4c6bd6a7ca4330d684a2b8790b543f

Commit: d2cf2269fe4c6bd6a7ca4330d684a2b8790b543f
Author: rsorokin@chromium.org
Commiter: hanxi@chromium.org
Date: 2018-10-22 17:59:33 +0000 UTC

Override stub path before PreEarlyInitDBus

Otherwise install attributes are not loaded on the linux Chrome OS
build.

TEST=manual

Bug:  848615 , 729596
Change-Id: I445b2b337b707822459c076058610f49f02767ab
Reviewed-on: https://chromium-review.googlesource.com/c/1264643
Commit-Queue: Roman Sorokin <rsorokin@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#599138}(cherry picked from commit b80ea1c80ef7c8ec439c14def8120498fc35eda8)
Reviewed-on: https://chromium-review.googlesource.com/c/1294207
Cr-Commit-Position: refs/branch-heads/3578@{#225}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
Project Member

Comment 63 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/349162b29094cd482cd2f90467b128b55057a804

commit 349162b29094cd482cd2f90467b128b55057a804
Author: Xi Han <hanxi@google.com>
Date: Fri Oct 26 12:44:23 2018

Initialize ResouceBundle in ChromeFeatureListCreator.

In this CL, the entire ResouceBundle is initialized in the
ChromeFeatureListCreator. This prevents loading parts of the data pack
earlier and then add it to the ResouceBundle when the full browser
starts.

Bug:  846846 ,729596
Change-Id: Ia254252288ead936bde8cb65b12cf2fecbfc106f
Reviewed-on: https://chromium-review.googlesource.com/c/1292516
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603067}
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/android_webview/browser/aw_browser_main_parts.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/android_webview/lib/aw_main_delegate.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/android_webview/lib/aw_main_delegate.h
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/BUILD.gn
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/browser_process.h
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/browser_process_impl.h
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/chrome_browser_main.h
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/chrome_browser_main_android.cc
[add] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/chrome_resource_bundle_helper.cc
[add] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/chrome_resource_bundle_helper.h
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/chromeos/base/locale_util.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/metrics/chrome_feature_list_creator.h
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/speech/tts_controller_unittest.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/translate/translate_manager_render_view_host_unittest.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/browser/ui/search/local_ntp_test_utils.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/test/base/scoped_browser_locale.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/test/base/testing_browser_process.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/chrome/test/base/testing_browser_process.h
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/349162b29094cd482cd2f90467b128b55057a804/content/public/app/content_main_delegate.h

Blocking: 695115
Blockedon: 899225
Blockedon: 899226
Project Member

Comment 67 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa60c219407f1158214858e83e5456e42dcfe891

commit aa60c219407f1158214858e83e5456e42dcfe891
Author: Xi Han <hanxi@google.com>
Date: Fri Oct 26 15:02:30 2018

Start ServiceManger before creating BrowserMainLoop.

This CL instantiates the ServiceManagerContext before creating
the BrowserMainRunner. It splits the startup path into two,
with/without starting the full browser. The changes are implemented
behind a flag "allow-start-service-manager-only".

Bug:  846846 ,729596
Change-Id: I3584db0d89a10e59d6041e0f4412aaffdc840568
Reviewed-on: https://chromium-review.googlesource.com/c/1113802
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603092}
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/app/DEPS
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/app/content_main_runner_impl.h
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/browser/browser_main_loop.cc
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/browser/browser_main_loop.h
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/browser/service_manager/service_manager_context.h
[modify] https://crrev.com/aa60c219407f1158214858e83e5456e42dcfe891/content/browser/startup_data_impl.h

Blockedon: 899276
Blockedon: 899280
Project Member

Comment 70 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4339da08a99855adc47716ff95f62b5f60ebe66c

commit 4339da08a99855adc47716ff95f62b5f60ebe66c
Author: Xi Han <hanxi@chromium.org>
Date: Fri Oct 26 21:24:08 2018

Revert "Start ServiceManger before creating BrowserMainLoop."

This reverts commit aa60c219407f1158214858e83e5456e42dcfe891.

Reason for revert: it breaks  network_service_webview_instrumentation_test_apk on Mojo Android Build:
https://bugs.chromium.org/p/chromium/issues/detail?id=899376

Bug:899376

Original change's description:
> Start ServiceManger before creating BrowserMainLoop.
> 
> This CL instantiates the ServiceManagerContext before creating
> the BrowserMainRunner. It splits the startup path into two,
> with/without starting the full browser. The changes are implemented
> behind a flag "allow-start-service-manager-only".
> 
> Bug:  846846 ,729596
> Change-Id: I3584db0d89a10e59d6041e0f4412aaffdc840568
> Reviewed-on: https://chromium-review.googlesource.com/c/1113802
> Commit-Queue: Xi Han <hanxi@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#603092}

TBR=gab@chromium.org,jam@chromium.org,hanxi@chromium.org

Change-Id: I866cc2148d529d0d7a02d0ac75b2817d1695a8c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  846846 , 729596
Reviewed-on: https://chromium-review.googlesource.com/c/1303042
Reviewed-by: Xi Han <hanxi@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603194}
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/app/DEPS
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/app/content_main_runner_impl.h
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/browser/browser_main_loop.cc
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/browser/browser_main_loop.h
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/browser/service_manager/service_manager_context.h
[modify] https://crrev.com/4339da08a99855adc47716ff95f62b5f60ebe66c/content/browser/startup_data_impl.h

Project Member

Comment 71 by bugdroid1@chromium.org, Oct 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef5872a5a8f2594284b98373de732b5d4abc5037

commit ef5872a5a8f2594284b98373de732b5d4abc5037
Author: Xi Han <hanxi@google.com>
Date: Wed Oct 31 22:09:38 2018

Use sequence checker in chrome_mojo_proxy_resolver_factory.

The ChromeMojoProxyResolverFactory may be created in early startup when the ui
thread hasn't be promoted to BrowserThread::UI. Therefore, it can't use
DCHECK_CURRENTLY_ON(content::BrowserThread::UI) to check whether it is accessed
on the same thread. Instead, we could use SequenceCheck for the check and make
sure it is accessed sequentially.

Bug: 729596
Change-Id: Id31e53e1ec369b029a843656cf86fc605d768a43
Reviewed-on: https://chromium-review.googlesource.com/c/1308667
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604404}
[modify] https://crrev.com/ef5872a5a8f2594284b98373de732b5d4abc5037/chrome/browser/net/chrome_mojo_proxy_resolver_factory.cc
[modify] https://crrev.com/ef5872a5a8f2594284b98373de732b5d4abc5037/chrome/browser/net/chrome_mojo_proxy_resolver_factory.h

Project Member

Comment 72 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f481306ad989755ebe61cfed4ab2a4fa53044b29

commit f481306ad989755ebe61cfed4ab2a4fa53044b29
Author: Xi Han <hanxi@google.com>
Date: Fri Nov 02 17:19:18 2018

Reland "Start ServiceManger before creating BrowserMainLoop."

This relands commit aa60c219407f1158214858e83e5456e42dcfe891. The original CL
(https://crrev.com/c/1113802) got reverted becuase FeatureList and field
trials are not setup properly in early startup in Android WebView, but
ServiceMangerContext has checked features. See  crbug.com/899376 . The fix is
in a separate CL: https://crrev.com/c/1305876. Another related precursor CL
is: https://crrev.com/c/1308096.

This CL is an exact copy of the original CL.

The original cl description is:
This CL instantiates the ServiceManagerContext before creating
the BrowserMainRunner. It splits the startup path into two,
with/without starting the full browser. The changes are implemented
behind a flag "allow-start-service-manager-only".

Bug:  846846 ,729596
TBR: jam@chromium.org
Change-Id: I5214af850d4ef256c9d223db059ed009a42de714
Reviewed-on: https://chromium-review.googlesource.com/c/1305822
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604969}
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/app/DEPS
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/app/content_main_runner_impl.h
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/browser/browser_main_loop.cc
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/browser/browser_main_loop.h
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/browser/service_manager/service_manager_context.h
[modify] https://crrev.com/f481306ad989755ebe61cfed4ab2a4fa53044b29/content/browser/startup_data_impl.h

Project Member

Comment 73 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1f38adde7975ca71542addb06bc8b645f671fa38

commit 1f38adde7975ca71542addb06bc8b645f671fa38
Author: Xi Han <hanxi@google.com>
Date: Fri Nov 02 20:20:40 2018

Remove BrowserThread::UI check form GetNetworkServiceFromConnector().

GetNetworkServiceFromConnector() may be called in the early startup before the
full browser starts. Therefore, it can't use
DCHECK_CURRENTLY_ON(content::BrowserThread::UI) to check whether it is called
on the same thread. Instead, we check whether the connector is accessed on the
valid sequence to replace this DCHECK.

Bug: 729596
Change-Id: I97e2b0cae7a4a7e0dded919b9b120f60eb18fea6
Reviewed-on: https://chromium-review.googlesource.com/c/1308977
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605036}
[modify] https://crrev.com/1f38adde7975ca71542addb06bc8b645f671fa38/content/browser/network_service_instance.cc

Cc: -jamescook@chromium.org
Project Member

Comment 75 by bugdroid1@chromium.org, Nov 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/faa86b61f1f34002e7bdfc923541d453b9e4223f

commit faa86b61f1f34002e7bdfc923541d453b9e4223f
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Wed Nov 07 09:55:04 2018

Revert "Reland "Start ServiceManger before creating BrowserMainLoop.""

This reverts commit f481306ad989755ebe61cfed4ab2a4fa53044b29 and
disables following tests on Windows:
 * RenderThreadImplBrowserTest.NonResourceDispatchIPCTasksDontGoThroughScheduler
 * UserScriptListenerTest.NavigationWaitsForContentScriptsToLoad

Reason for revert: Causes BrowserMainLoopTest, CreateThreadsInSingleProcess to fail every time content_unittests is run, if DCHECKs are enabled.

Original change's description:
> Reland "Start ServiceManger before creating BrowserMainLoop."
>
> This relands commit aa60c219407f1158214858e83e5456e42dcfe891. The original CL
> (https://crrev.com/c/1113802) got reverted becuase FeatureList and field
> trials are not setup properly in early startup in Android WebView, but
> ServiceMangerContext has checked features. See  crbug.com/899376 . The fix is
> in a separate CL: https://crrev.com/c/1305876. Another related precursor CL
> is: https://crrev.com/c/1308096.
>
> This CL is an exact copy of the original CL.
>
> The original cl description is:
> This CL instantiates the ServiceManagerContext before creating
> the BrowserMainRunner. It splits the startup path into two,
> with/without starting the full browser. The changes are implemented
> behind a flag "allow-start-service-manager-only".
>
> Bug:  846846 ,729596
> TBR: jam@chromium.org
> Change-Id: I5214af850d4ef256c9d223db059ed009a42de714
> Reviewed-on: https://chromium-review.googlesource.com/c/1305822
> Commit-Queue: Xi Han <hanxi@chromium.org>
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#604969}

TBR=gab@chromium.org,jam@chromium.org,hanxi@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  846846 , 729596,  902311 
Change-Id: I8b46711602a240023f4a03a69aa70f66d4eee726
Reviewed-on: https://chromium-review.googlesource.com/c/1322343
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606004}
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/chrome/browser/extensions/user_script_listener_browsertest.cc
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/app/DEPS
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/app/content_main_runner_impl.h
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/browser/browser_main_loop.cc
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/browser/browser_main_loop.h
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/browser/browser_main_loop_unittest.cc
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/browser/service_manager/service_manager_context.h
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/browser/startup_data_impl.h
[modify] https://crrev.com/faa86b61f1f34002e7bdfc923541d453b9e4223f/content/renderer/render_thread_impl_browsertest.cc

Blockedon: 904549
Blockedon: 905678
Project Member

Comment 78 by bugdroid1@chromium.org, Nov 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d5be60ba310d4acc439c440d3dc45c410ca75111

commit d5be60ba310d4acc439c440d3dc45c410ca75111
Author: Alexei Svitkine <asvitkine@chromium.org>
Date: Thu Nov 29 13:24:13 2018

Initialize ResouceBundle in ChromeFeatureListCreator.

In this CL, the entire ResouceBundle is initialized in the
ChromeFeatureListCreator. This prevents loading parts of the data pack
earlier and then add it to the ResouceBundle when the full browser
starts.

TBR=hanxi@google.com

(cherry picked from commit 349162b29094cd482cd2f90467b128b55057a804)

Bug:  846846 ,729596
Change-Id: Ia254252288ead936bde8cb65b12cf2fecbfc106f
Reviewed-on: https://chromium-review.googlesource.com/c/1292516
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#603067}
Reviewed-on: https://chromium-review.googlesource.com/c/1354268
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#846}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/android_webview/browser/aw_browser_main_parts.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/android_webview/lib/aw_main_delegate.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/android_webview/lib/aw_main_delegate.h
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/BUILD.gn
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/browser_process.h
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/browser_process_impl.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/browser_process_impl.h
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/chrome_browser_main.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/chrome_browser_main.h
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/chrome_browser_main_android.cc
[add] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/chrome_resource_bundle_helper.cc
[add] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/chrome_resource_bundle_helper.h
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/chromeos/base/locale_util.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/metrics/chrome_feature_list_creator.h
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/translate/translate_manager_render_view_host_unittest.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/browser/ui/search/local_ntp_test_utils.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/test/base/scoped_browser_locale.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/test/base/testing_browser_process.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/chrome/test/base/testing_browser_process.h
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/content/app/content_main_runner_impl.cc
[modify] https://crrev.com/d5be60ba310d4acc439c440d3dc45c410ca75111/content/public/app/content_main_delegate.h

The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/d5be60ba310d4acc439c440d3dc45c410ca75111

Commit: d5be60ba310d4acc439c440d3dc45c410ca75111
Author: asvitkine@chromium.org
Commiter: asvitkine@chromium.org
Date: 2018-11-29 13:24:13 +0000 UTC

Initialize ResouceBundle in ChromeFeatureListCreator.

In this CL, the entire ResouceBundle is initialized in the
ChromeFeatureListCreator. This prevents loading parts of the data pack
earlier and then add it to the ResouceBundle when the full browser
starts.

TBR=hanxi@google.com

(cherry picked from commit 349162b29094cd482cd2f90467b128b55057a804)

Bug:  846846 ,729596
Change-Id: Ia254252288ead936bde8cb65b12cf2fecbfc106f
Reviewed-on: https://chromium-review.googlesource.com/c/1292516
Commit-Queue: Xi Han <hanxi@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#603067}
Reviewed-on: https://chromium-review.googlesource.com/c/1354268
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#846}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
Labels: CommitLog-Audit-Violation Merge-Without-Approval M-71
Here's a summary of the rules that were executed: 
 - OnlyMergeApprovedChange: Rule Failed -- Revision d5be60ba310d4acc439c440d3dc45c410ca75111 was merged to refs/branch-heads/3578 branch with no merge approval from a TPM! 
Please explain why this change was merged to the branch!
 - AcknowledgeMerge: Notification Required -- 
Blockedon: 913007

Sign in to add a comment