|
|
Created:
4 years, 3 months ago by Sorin Jianu Modified:
4 years, 3 months ago Reviewers:
sky CC:
chromium-reviews, waffles Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMechanical refactoring of BrowserProcessImpl::component_updater().
Bring the code to C++11 standard and streamline the execution path inside the function.
BUG=646904
Committed: https://crrev.com/7a43e83784853f6d73842e9ec60feab67daed8b8
Cr-Commit-Position: refs/heads/master@{#418982}
Patch Set 1 #
Total comments: 1
Messages
Total messages: 16 (10 generated)
The CQ bit was checked by sorin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Mechanical refactoring of BrowserProcessImpl::component_updater(). Bring the code to C++11 standard and streamline the executin path inside the function. BUG=646904 ========== to ========== Mechanical refactoring of BrowserProcessImpl::component_updater(). Bring the code to C++11 standard and streamline the executin path inside the function. BUG=646904 ==========
sorin@chromium.org changed reviewers: + sky@chromium.org
Description was changed from ========== Mechanical refactoring of BrowserProcessImpl::component_updater(). Bring the code to C++11 standard and streamline the executin path inside the function. BUG=646904 ========== to ========== Mechanical refactoring of BrowserProcessImpl::component_updater(). Bring the code to C++11 standard and streamline the execution path inside the function. BUG=646904 ==========
https://codereview.chromium.org/2340003002/diff/1/chrome/browser/browser_proc... File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/2340003002/diff/1/chrome/browser/browser_proc... chrome/browser/browser_process_impl.cc:895: if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) I'm a bit confused by this check being only in the path that creates ComponentUpdater. Why is that?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/09/14 18:11:00, sky wrote: > https://codereview.chromium.org/2340003002/diff/1/chrome/browser/browser_proc... > File chrome/browser/browser_process_impl.cc (right): > > https://codereview.chromium.org/2340003002/diff/1/chrome/browser/browser_proc... > chrome/browser/browser_process_impl.cc:895: if > (!BrowserThread::CurrentlyOn(BrowserThread::UI)) > I'm a bit confused by this check being only in the path that creates > ComponentUpdater. Why is that? I agree. A developer's mind stumbles on the said statement. First, this is a mechanical refactoring, hence this change must not introduce a difference in behavior. This is old code, from when cpu@ roamed in Chromium (https://codereview.chromium.org/56743002) That being said, this is how I have read the code in question. The code does an idiomatic lazy init of the component_updater_ and returns its instance when one is available, on any thread that is calling the accessor. On the creation path, it forces that an instance of the component_updater is only created on the UI thread, which is most likely the case, based on the first call site of this function in the browser process. This makes sense, since the component updater code has thread afinity: it needs to be instantiated and called on the UI thread or the main thread of the program. It appears that this was not the case at some point in the past, see the blame CL referenced above. I could try to DCHECK this assumption in a future CL.
LGTM
The CQ bit was checked by sorin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Mechanical refactoring of BrowserProcessImpl::component_updater(). Bring the code to C++11 standard and streamline the execution path inside the function. BUG=646904 ========== to ========== Mechanical refactoring of BrowserProcessImpl::component_updater(). Bring the code to C++11 standard and streamline the execution path inside the function. BUG=646904 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Mechanical refactoring of BrowserProcessImpl::component_updater(). Bring the code to C++11 standard and streamline the execution path inside the function. BUG=646904 ========== to ========== Mechanical refactoring of BrowserProcessImpl::component_updater(). Bring the code to C++11 standard and streamline the execution path inside the function. BUG=646904 Committed: https://crrev.com/7a43e83784853f6d73842e9ec60feab67daed8b8 Cr-Commit-Position: refs/heads/master@{#418982} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/7a43e83784853f6d73842e9ec60feab67daed8b8 Cr-Commit-Position: refs/heads/master@{#418982} |