This change's purpose includes:
1. Changing the url context getters raw pointers to scoped_refptr.
2. Avoiding storing the system url context getter and only return it when needed to do a url request.
Obviously, using smart pointers is preferred in this case, since the url context getter is a ref counted object and manipulating such object by a raw pointer is risky.
Second, the component updater is instantiated early on during the browser process startup. Since the system url context getter is early acquired during the construction of the component updater and its dependencies. This context getter is only used much later on when making url fetcher requests, therefore, requesting such context as needed is desirable.
Comment 1 by sorin@chromium.org
, Jan 18 2018