|
|
Created:
6 years, 9 months ago by Mr4D (OOO till 08-26) Modified:
6 years, 9 months ago Reviewers:
sky CC:
chromium-reviews, kalyank, sadrul, ben+ash_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionSimplifying launcher handling by removing an unnecessary data structure and some functions
Ahh. Getting rid of unnecessary complexity!
BUG=343254
TEST=covered by unit tests & tested by hand
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260246
Patch Set 1 #Patch Set 2 : . #
Total comments: 8
Patch Set 3 : Addressed #Patch Set 4 : Re-upload #Patch Set 5 : Fixing unittest #
Messages
Total messages: 45 (0 generated)
Please have a look!
LGTM I think you need to investigate BrowserStatusMonitor. I think some notifications may be missed when leading to web_contents_to_app_id_ getting out of date. https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... File chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc (right): https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:939: // We remove the content before checking existence with GetAppState. Again, document why. This comment just documents code, not why order matters here. https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:946: web_contents_to_app_id_[contents] = app_id; Seems silly to have a remove 2 lines later. How about an else for the if on 949. https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:1681: WebContentsToAppIDMap::iterator it = web_contents_to_app_id_.begin(); nit: for loop? https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:1685: DCHECK(browser); Are you sure this DCHECK is valid here? Seems to me there are a bunch of invalid assummptions in BrowserStatusMonitor that could lead to improve cleanup. I suppose that is separate from this patch though.
Thanks for your review! For BrowserStatusMonitor: I looked at that before - many times (and even found a bug there) - but there was nothing obvious. Today I looked again and I think I have found the culprit - an interaction between multi profile and windowed V1 apps. I will fix that in a separate CL. https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... File chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc (right): https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:939: // We remove the content before checking existence with GetAppState. I do not see it this way. It says that it removes the content before GetAppState gets called which would otherwise find it as active. Sure the reader needs to think a little bit.. I add a few more words. Done. https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:946: web_contents_to_app_id_[contents] = app_id; On 2014/03/26 21:59:35, sky wrote: > Seems silly to have a remove 2 lines later. How about an else for the if on 949. Done. https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:1681: WebContentsToAppIDMap::iterator it = web_contents_to_app_id_.begin(); On 2014/03/26 21:59:35, sky wrote: > nit: for loop? Done. https://codereview.chromium.org/213193007/diff/10001/chrome/browser/ui/ash/la... chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc:1685: DCHECK(browser); This DCHECK was added to identify an ilegal state which was the reason for this cleanup: a page got added but never removed. I think that it is a good test to have, but it could use a comment to point this out. - Done. For BrowserStatusMonitor: I looked in the past over that module several times - and will do so again.
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/30001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_clang_dbg
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/30001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/30001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/30001
The CQ bit was unchecked by commit-bot@chromium.org
Commit queue rejected this change because the description was changed between the time the change entered the commit queue and the time it was ready to commit. You can safely check the commit box again.
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/30001
The CQ bit was unchecked by commit-bot@chromium.org
Commit queue rejected this change because the description was changed between the time the change entered the commit queue and the time it was ready to commit. You can safely check the commit box again.
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/30001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/30001
The CQ bit was unchecked by commit-bot@chromium.org
Commit queue rejected this change because the description was changed between the time the change entered the commit queue and the time it was ready to commit. You can safely check the commit box again.
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/50001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/50001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/50001
The CQ bit was unchecked by skuhne@chromium.org
The CQ bit was checked by skuhne@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skuhne@chromium.org/213193007/70001
Message was sent while issue was closed.
Change committed as 260246 |