• fdoray's avatar
    Store PreRead options obtained from the registry in a global variable. · dee06429
    fdoray authored
    Instead of reading PreRead options from the registry every time they
    are needed, read them once and store them in a global variable.
    This optimization isn't immediately useful as PreRead options are
    currently read only once per process. However, with the upcoming
    /prefetch:# experiment, the browser process will need the PreRead
    options every time it launches a process.
    
    This CL also has these benefits:
    - The caller of GetPreReadOptions doesn't need to know the product
      registry path. This will allow content to get the PreRead options
      to decide whether it should use a /prefetch:# switch when
      launching a process.
    - The PreRead options are returned as a bit field instead of by
      setting multiple booleans. This will facilitate the addition of
      new PreRead options.
    
    BUG=577698
    
    Review URL: https://codereview.chromium.org/1610733002
    
    Cr-Commit-Position: refs/heads/master@{#370805}
    dee06429
main_dll_loader_win.cc 14.2 KB