• danakj's avatar
    Move StartupData to ChromeContentBrowserClient. · 5beedd01
    danakj authored
    Currently it's created with the ChromeContentBrowserClient, and a raw
    pointer is passed to it, which it stores. It is primarily used by
    ChromeContentBrowserClient. The ChromeMainDelegate has to manage the
    lifetime of the two objects instead of one.
    
    We can simplify the relationship here by having the StartupData owned
    by ChromeContentBrowserClient instead. Since ChromeMainDelegate
    already has a pointer to the ChromeContentBrowserClient it creates,
    it can use the StartupData from there. This makes it clear in the
    ChromeMainDelegate code that it depends on the ContentBrowserClient
    being created already when using the StartupData.
    
    R=avi@chromium.org
    
    Bug: 811470
    Change-Id: Ia099042e11f2adc6abb5186f57925fae05343da4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2508231
    Commit-Queue: danakj <danakj@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#822665}
    5beedd01
chrome_main_delegate.h 3.2 KB