|
|
Chromium Code Reviews|
Created:
4 years, 7 months ago by dewittj Modified:
4 years, 7 months ago CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dimich+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionOffline Pages: Add NULL-checks for when the model is NULL (incognito mode)
Recently offline pages was changed to be completely disabled in
incognito profiles, since it is no longer associated with bookmarks, so
some consumers failed to check for null.
BUG=613359
Committed: https://crrev.com/261c816b0900eec6c3b41277288ccd4020c23f5d
Cr-Commit-Position: refs/heads/master@{#395422}
Patch Set 1 #
Total comments: 3
Patch Set 2 : Fix test failure. #
Total comments: 1
Patch Set 3 : Remove tab changes. #Messages
Total messages: 18 (7 generated)
Description was changed from ========== Offline Pages: Add NULL-checks for when the model is NULL (incognito mode) BUG=613359 ========== to ========== Offline Pages: Add NULL-checks for when the model is NULL (incognito mode) BUG=613359 ==========
dewittj@chromium.org changed reviewers: + fgorski@chromium.org, tedchoc@chromium.org
Description was changed from ========== Offline Pages: Add NULL-checks for when the model is NULL (incognito mode) BUG=613359 ========== to ========== Offline Pages: Add NULL-checks for when the model is NULL (incognito mode) Recently offline pages was changed to be completely disabled in incognito profiles, since it is no longer associated with bookmarks, so some consumers failed to check for null. BUG=613359 ==========
ptal, thanks.
https://codereview.chromium.org/2004473002/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java (right): https://codereview.chromium.org/2004473002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java:174: if (bridge == null) { this seems too late to be checking this. A user should never be able to get to here if the bridge is null. Shouldn't this be checked somewhere earlier in the UI code to prevent it from showing? Or is this a race?
https://codereview.chromium.org/2004473002/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java (right): https://codereview.chromium.org/2004473002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java:174: if (bridge == null) { On 2016/05/20 16:55:59, Ted C wrote: > this seems too late to be checking this. A user should never be able to get to > here if the bridge is null. Shouldn't this be checked somewhere earlier in the > UI code to prevent it from showing? > > Or is this a race? https://code.google.com/p/chromium/codesearch#chromium/src/chrome/android/jav... We should ensure the menu item is not visible, I think.
https://codereview.chromium.org/2004473002/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java (right): https://codereview.chromium.org/2004473002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java:174: if (bridge == null) { On 2016/05/20 17:03:56, fgorski wrote: > On 2016/05/20 16:55:59, Ted C wrote: > > this seems too late to be checking this. A user should never be able to get > to > > here if the bridge is null. Shouldn't this be checked somewhere earlier in > the > > UI code to prevent it from showing? > > > > Or is this a race? > > https://code.google.com/p/chromium/codesearch#chromium/src/chrome/android/jav... > > We should ensure the menu item is not visible, I think. I'm planning to merge this patch, so updates to the context menu delegate seem out of scope (especially since it's behind a flag right now). Can fix this immediately after landing this patch. Also there might indeed be a race, since there could be a lot of time between showing the context menu and actually executing the click action. I'd leave the null check here even after fixing the ChromeContextMenuItemPopulator. WDYT?
lgtm with nit based on the discussion we had earlier today. https://codereview.chromium.org/2004473002/diff/20001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java (right): https://codereview.chromium.org/2004473002/diff/20001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java:173: // If the tab is incognito we may get a null offline page bridge. nit: Add a TODO for moving to a proper check for offline pages being enabled.
dewittj@chromium.org changed reviewers: - tedchoc@chromium.org
-tedchoc to cc Filip, I removed the tab changes since they are behind a flag anyway. I added crbug.com/614138 to track proper usage of enabled checks on that UI. WDYT?
On 2016/05/23 20:15:38, fgorski wrote: > lgtm with nit based on the discussion we had earlier today. > > https://codereview.chromium.org/2004473002/diff/20001/chrome/android/java/src... > File > chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java > (right): > > https://codereview.chromium.org/2004473002/diff/20001/chrome/android/java/src... > chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java:173: > // If the tab is incognito we may get a null offline page bridge. > nit: Add a TODO for moving to a proper check for offline pages being enabled. also seems reasonable to me, lgtm
still lgtm
The CQ bit was checked by dewittj@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2004473002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2004473002/40001
Message was sent while issue was closed.
Description was changed from ========== Offline Pages: Add NULL-checks for when the model is NULL (incognito mode) Recently offline pages was changed to be completely disabled in incognito profiles, since it is no longer associated with bookmarks, so some consumers failed to check for null. BUG=613359 ========== to ========== Offline Pages: Add NULL-checks for when the model is NULL (incognito mode) Recently offline pages was changed to be completely disabled in incognito profiles, since it is no longer associated with bookmarks, so some consumers failed to check for null. BUG=613359 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Offline Pages: Add NULL-checks for when the model is NULL (incognito mode) Recently offline pages was changed to be completely disabled in incognito profiles, since it is no longer associated with bookmarks, so some consumers failed to check for null. BUG=613359 ========== to ========== Offline Pages: Add NULL-checks for when the model is NULL (incognito mode) Recently offline pages was changed to be completely disabled in incognito profiles, since it is no longer associated with bookmarks, so some consumers failed to check for null. BUG=613359 Committed: https://crrev.com/261c816b0900eec6c3b41277288ccd4020c23f5d Cr-Commit-Position: refs/heads/master@{#395422} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/261c816b0900eec6c3b41277288ccd4020c23f5d Cr-Commit-Position: refs/heads/master@{#395422} |
