Commit ac771a78 authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Remove duplicate init of WebStateListMetricsBrowser

Duplicate initialization was introduced by crrev.com/c/2167852
resulting in a dependency issue.

Previous fix crrev.com/c/2435344
fixed the dependency but kept the double initialization.

Restore the init order pre- crrev.com/c/2167852

Bug: 1132784
Change-Id: I69abeea6826e3aecbad7b321cdda33b6138628de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438427Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812033}
parent 28bb6beb
......@@ -43,12 +43,6 @@ void AttachBrowserAgents(Browser* browser) {
UrlLoadingNotifierBrowserAgent::CreateForBrowser(browser);
AppLauncherBrowserAgent::CreateForBrowser(browser);
// SessionRestorartionAgent requires WebUsageEnablerBrowserAgent.
SessionRestorationBrowserAgent::CreateForBrowser(
browser, [SessionServiceIOS sharedService]);
// WebStateListMetricsBrowserAgent requires SessionRestorationBrowserAgent.
WebStateListMetricsBrowserAgent::CreateForBrowser(browser);
ClosingWebStateObserverBrowserAgent::CreateForBrowser(browser);
SnapshotBrowserAgent::CreateForBrowser(browser);
......@@ -59,6 +53,10 @@ void AttachBrowserAgents(Browser* browser) {
// UrlLoadingBrowserAgent requires UrlLoadingNotifierBrowserAgent.
UrlLoadingBrowserAgent::CreateForBrowser(browser);
// SessionRestorartionAgent requires WebUsageEnablerBrowserAgent.
SessionRestorationBrowserAgent::CreateForBrowser(
browser, [SessionServiceIOS sharedService]);
// TabUsageRecorderBrowserAgent and WebStateListMetricsBrowserAgent observe
// the SessionRestorationBrowserAgent, so they should be created after the the
// SessionRestorationBrowserAgent is created.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment