|
Fix cancelling permission requests on Android when the PermissionRequestManager is enabled
This patch fixes cancelling of permission requests (infobars) on Android
when the PermissionRequestManager is enabled. While we do not actually
support cancelling infobars in this code path (we decided that for code
simplicity we the PermissionPromptAndroid shouldn't keep a pointer to
the InfoBar), we still need to be able to gracefully handle the case of
an iframe which has requested a permission navigating (which currently
crashes upon resolving the prompt).
We change CanAcceptRequestUpdate() + Hide() into MaybeCancelRequest(),
and now call Show() again if the cancel fails so that on Android we can
use the dummy PermissionRequests instead of UAFing on the original ones.
BUG= 606138, 671052
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+170 lines, -54 lines) |
Patch |
|
M |
chrome/android/BUILD.gn
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
chrome/android/java_sources.gni
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
A |
chrome/android/javatests/src/org/chromium/chrome/browser/permissions/PermissionFrameTest.java
|
View
|
1
2
3
|
1 chunk |
+65 lines, -0 lines |
0 comments
|
Download
|
|
M |
chrome/android/javatests/src/org/chromium/chrome/browser/permissions/PermissionTestCaseBase.java
|
View
|
1
2
3
4
5
6
|
6 chunks |
+50 lines, -16 lines |
0 comments
|
Download
|
|
M |
chrome/browser/permissions/permission_prompt_android.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/permissions/permission_prompt_android.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
chrome/browser/permissions/permission_request_manager.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+7 lines, -16 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/cocoa/permission_bubble/permission_bubble_cocoa.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/cocoa/permission_bubble/permission_bubble_cocoa.mm
|
View
|
1
2
3
4
5
6
|
2 chunks |
+7 lines, -8 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/permission_bubble/mock_permission_prompt.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/permission_bubble/mock_permission_prompt.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/permission_bubble/permission_prompt.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+7 lines, -4 lines |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/permission_bubble/permission_prompt_impl.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
|
A |
content/test/data/android/permission_frame_test.html
|
View
|
1
2
3
|
1 chunk |
+17 lines, -0 lines |
0 comments
|
Download
|
Depends on Patchset:
Total messages: 24 (22 generated)
|