Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e215c18dc6 |
@@ -0,0 +1,89 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a Bromite bug report
|
||||
|
||||
---
|
||||
|
||||
<!-- Welcome! Thanks for taking time to submit a bug report.
|
||||
Have you read the README? https://github.com/bromite/bromite/blob/master/README.md
|
||||
Have you searched the issue tracker? https://github.com/bromite/bromite/issues
|
||||
Are you sure this is not a Chromium bug? You have to test with Chromium before submitting a bug.
|
||||
Are you using the latest version of Bromite?
|
||||
|
||||
If instead of a bug report you want to ask a question then please use the GitHub Discussions: https://github.com/bromite/bromite/discussions
|
||||
-->
|
||||
|
||||
### Bromite version
|
||||
|
||||
Version: `89.0...`
|
||||
Arch: `arm` or `arm64` or `x86`
|
||||
Android version: (example: `9.0`)
|
||||
Device model: (example: `SM-G960UZKABST`)
|
||||
|
||||
### Flags
|
||||
|
||||
These are the flags changed under `chrome://flags`:
|
||||
|
||||
<!-- Report all the blue-highlighted flags here, those are the flags with non-default configuration -->
|
||||
|
||||
### Is this bug about the SystemWebView?
|
||||
|
||||
<!-- No support for SystemWebView installations is provided. -->
|
||||
|
||||
Yes/No
|
||||
|
||||
### Is the bug reproducible with latest version?
|
||||
|
||||
<!-- Do not report bugs which are not reproducible with latest version. -->
|
||||
|
||||
Yes/No
|
||||
|
||||
### Can the bug be reproduced with corresponding Chromium version?
|
||||
|
||||
<!--
|
||||
Please pick the same version of Chromium as Bromite from here: https://github.com/bromite/chromium/releases
|
||||
If the bug is reproducible then it might be a configuration issue or an upstream bug. Upstream bugs can be reported on the [Chromium issue tracker](https://bugs.chromium.org/p/chromium/issues/list) and do not forget to read [Chromium project bug reporting guidelines](https://www.chromium.org/for-testers/bug-reporting-guidelines) first.
|
||||
|
||||
If the bug is related to functionality that does not exist in Chromium then answer "No".
|
||||
-->
|
||||
|
||||
Yes/No
|
||||
|
||||
### Is this bug happening in an incognito tab?
|
||||
Yes/No
|
||||
|
||||
### Allow ads for the site; is the bug caused by the adblocker?
|
||||
Yes/No
|
||||
|
||||
### Is the bug a crash?
|
||||
|
||||
No
|
||||
|
||||
-- or --
|
||||
|
||||
Yes, this is the crash dump:
|
||||
```
|
||||
<paste here logcat dump individuated with 'adb logcat | grep chromium'>
|
||||
```
|
||||
|
||||
### Describe the bug
|
||||
|
||||
<!-- Write here a clear and concise description of the bug. -->
|
||||
|
||||
### Steps to reproduce the bug
|
||||
|
||||
Steps to reproduce the bug:
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. Scroll down to '...'
|
||||
4. See error
|
||||
|
||||
Do not write "any website", specify which URLs can be used to reproduce the issue.
|
||||
|
||||
### Expected behavior
|
||||
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
### Screenshots
|
||||
|
||||
<!-- If applicable, add screenshots to help explain your problem. Otherwise remove this section. -->
|
||||
@@ -1,209 +0,0 @@
|
||||
name: Bug report
|
||||
description: Create a Bromite bug report
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Welcome! Thanks for taking the time to submit a bug report.
|
||||
|
||||
If you are looking for a place to ask a question to the Bromite community then please use the [GitHub Discussions](https://github.com/bromite/bromite/discussions) instead.
|
||||
|
||||
Make sure you have acknowledged and completed this template before submitting your issue.
|
||||
|
||||
Please read it carefully: incorrect issues will be automatically closed and ignored.
|
||||
|
||||
- type: checkboxes
|
||||
id: preliminary_checklist
|
||||
attributes:
|
||||
label: Preliminary checklist
|
||||
options:
|
||||
- label: "I have read the [README](https://github.com/bromite/bromite/blob/master/README.md)."
|
||||
required: true
|
||||
- label: "I have searched the existing issues for my problem. This is a new ticket, NOT a duplicate or related to another open issue."
|
||||
required: true
|
||||
- label: "I have read the [FAQs](https://github.com/bromite/bromite/blob/master/FAQ.md)."
|
||||
required: true
|
||||
- label: "I have updated Bromite to the latest version. The bug is reproducible on this latest version."
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: is_chromium
|
||||
attributes:
|
||||
label: Can the bug be reproduced with corresponding Chromium version?
|
||||
description: |
|
||||
Please pick the same version of Chromium as Bromite from here: https://github.com/bromite/chromium/releases
|
||||
If the bug is reproducible then it might be a configuration issue or an upstream bug. Upstream bugs can be reported on the [Chromium issue tracker](https://bugs.chromium.org/p/chromium/issues/list) and
|
||||
do not forget to read [Chromium project bug reporting guidelines](https://www.chromium.org/for-testers/bug-reporting-guidelines) first.
|
||||
|
||||
If the bug is related to functionality that does not exist in Chromium then answer "No".
|
||||
multiple: false
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: bromite_version
|
||||
attributes:
|
||||
label: Bromite version
|
||||
description: What version of Bromite are you using? Please specify a single version e.g. `96.0.4664.1` not `latest`. If this is not the latest version then please update and retry before submitting this bug report.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: device_architecture
|
||||
attributes:
|
||||
label: Device architecture
|
||||
multiple: false
|
||||
options:
|
||||
- arm
|
||||
- arm64
|
||||
- arm64-v8a
|
||||
- armeabi-v7a
|
||||
- x86
|
||||
- x64
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: android_version
|
||||
attributes:
|
||||
label: Android version
|
||||
multiple: false
|
||||
description: What version of Android are you running?
|
||||
options:
|
||||
- 12.1
|
||||
- 12.0
|
||||
- 11
|
||||
- 10
|
||||
- 9
|
||||
- 8.1
|
||||
- 8.0
|
||||
- 7.1
|
||||
- 7.0
|
||||
- 6
|
||||
- 5.1
|
||||
- 5.0
|
||||
- 4.4
|
||||
- 4.3
|
||||
- 4.2
|
||||
- 4.1
|
||||
- 4.0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: device_model
|
||||
attributes:
|
||||
label: Device model
|
||||
description: What is your device model? This can usually be found in your device's settings in the "About" section.
|
||||
placeholder: (e.g. `OnePlus 8 (IN2010)`, or `SM-G960UZKABST`, etc.)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: changed_flags
|
||||
attributes:
|
||||
label: Changed flags
|
||||
description: |
|
||||
These are the flags changed under `chrome://flags`.
|
||||
Report all the flags with non-default configuration (they will be blue-highlighted).
|
||||
|
||||
If no flags are changed then write 'no flags changed'.
|
||||
placeholder: show-overdraw-feedback, enable-parallel-downloading
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: is_system_webview
|
||||
attributes:
|
||||
label: Is this bug about the SystemWebView?
|
||||
description: Please note that no support for System WebView installation is provided.
|
||||
multiple: false
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: is_incognito
|
||||
attributes:
|
||||
label: Is this bug happening in an incognito tab?
|
||||
multiple: false
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: adblock
|
||||
attributes:
|
||||
label: Is this bug caused by the adblocker?
|
||||
description: You can test this by temporarily allowing ads for the site.
|
||||
multiple: false
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: bug_crash
|
||||
attributes:
|
||||
label: Is this bug a crash?
|
||||
description: |
|
||||
1. No.
|
||||
2. Yes, I have attached the crash report dump that I downloaded from `chrome://crashes`
|
||||
3. Yes, I have copy/pasted the crash dump
|
||||
placeholder: |
|
||||
Drag the crash report dump here to attach it or paste the logcat dump individuated with `adb logcat | grep -E '( cr_|bromite|chromium)'`.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: bug_description
|
||||
attributes:
|
||||
label: Describe the bug
|
||||
description: Write a clear and concise description of the bug.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: bug_steps
|
||||
attributes:
|
||||
label: Steps to reproduce the bug
|
||||
description: |
|
||||
Explain how to cause the bug as clearly as possible. Bugs that are not reproducible cannot be investigated.
|
||||
|
||||
Also, do not write "any website": please specify which URLs can be used to reproduce the issue.
|
||||
placeholder: |
|
||||
Steps to reproduce the bug (e.g.):
|
||||
1. Go to '...'
|
||||
2. Click on '...'
|
||||
3. Scroll down to '...'
|
||||
4. See error
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected_behavior
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A clear and concise description of what you expected to happen.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: |
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
Otherwise, ignore this section.
|
||||
placeholder: |
|
||||
Drag the screenshot files here to attach them.
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest a privacy-related idea for this project
|
||||
|
||||
---
|
||||
|
||||
<!-- Welcome! Thanks for taking time to submit a feature request.
|
||||
Have you searched the issue tracker? https://github.com/bromite/bromite/issues
|
||||
Have you read the F.A.Q.s? https://github.com/bromite/bromite/blob/master/FAQ.md
|
||||
Have you read the README? https://github.com/bromite/bromite/blob/master/README.md
|
||||
Have you read the Wiki? https://github.com/bromite/bromite/wiki
|
||||
|
||||
If instead of a feature request you want to ask a question then please use the GitHub Discussions: https://github.com/bromite/bromite/discussions
|
||||
|
||||
-->
|
||||
|
||||
<!-- Do not submit feature requests for extensions support or adding a search engine. -->
|
||||
|
||||
### Is your feature request related to privacy?
|
||||
|
||||
<!-- Features that are not related to privacy are not considered. -->
|
||||
|
||||
### Is there a patch available for this feature somewhere?
|
||||
|
||||
<!-- If yes then provide URL and license information. -->
|
||||
|
||||
### Describe the solution you would like
|
||||
|
||||
<!-- A clear and concise description of what you want to happen.
|
||||
|
||||
Do not ask "I would like feature X which is available in browser Y"; such issues are closed immediately. -->
|
||||
|
||||
### Describe alternatives you have considered
|
||||
|
||||
<!-- A clear and concise description of any alternative solutions or features you have considered. -->
|
||||
@@ -1,65 +0,0 @@
|
||||
name: Feature request
|
||||
description: Create a Bromite feature request
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Welcome! Thanks for taking time to submit a feature request.
|
||||
|
||||
If you are looking for a place to ask a question to the Bromite community then please use the [GitHub Discussions](https://github.com/bromite/bromite/discussions) instead.
|
||||
|
||||
Make sure you have acknowledged and completed this template before submitting your issue.
|
||||
|
||||
Please read it carefully: incorrect issues will be automatically closed and ignored.
|
||||
|
||||
Note:
|
||||
- Features unrelated to privacy will not be considered.
|
||||
- Do not ask "I would like feature X which is available in browser Y."
|
||||
|
||||
- type: checkboxes
|
||||
id: preliminary_checklist
|
||||
attributes:
|
||||
label: Preliminary checklist
|
||||
options:
|
||||
- label: "I have read the [README](https://github.com/bromite/bromite/blob/master/README.md)"
|
||||
required: true
|
||||
- label: "I have read the [FAQs](https://github.com/bromite/bromite/blob/master/FAQ.md)."
|
||||
required: true
|
||||
- label: "I have searched [existing issues](https://github.com/bromite/bromite/issues) for my feature request. This is a new issue (NOT a duplicate) and is not related to another issue."
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: is_privacy_related
|
||||
attributes:
|
||||
label: Is your feature request related to privacy?
|
||||
description: Features that are not related to privacy are not considered.
|
||||
multiple: false
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: is_patch_available
|
||||
attributes:
|
||||
label: Is there a patch available for this feature somewhere?
|
||||
description: If yes please provide URL and related license information.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: solution_description
|
||||
attributes:
|
||||
label: Describe the solution you would like
|
||||
description: A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: alternatives_considered
|
||||
attributes:
|
||||
label: Describe alternatives you have considered
|
||||
description: A clear and concise description of any alternative solutions or features you have considered.
|
||||
validations:
|
||||
required: true
|
||||
+2
-170
@@ -1,175 +1,7 @@
|
||||
# 102.0.5005.96
|
||||
* fix history expiration bug (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2104)
|
||||
* fix category setting activation (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2091)
|
||||
* improve plain text rendering on mobile
|
||||
* rewritten certificate transparency patch (fixes https://github.com/bromite/bromite/issues/2101)
|
||||
|
||||
# 102.0.5005.92
|
||||
* restore offline-indicator-v2 flag functionality (thanks to @Zelda189)
|
||||
|
||||
# 102.0.5005.67
|
||||
* dropped patch to disable mobile identity consistency by default
|
||||
* fix text for blocked ads (fixes https://github.com/bromite/bromite/issues/2026)
|
||||
* fix OpenSeach visited site detection bug (fixes https://github.com/bromite/bromite/issues/1994)
|
||||
|
||||
# 101.0.4951.69
|
||||
* flag to toggle site engagement (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2022)
|
||||
* site settings to enable webGL (thanks to @uazo)
|
||||
* removed flag to disable webGL
|
||||
* fix bottom navigation bar search/site suggestions behaviour (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2049)
|
||||
* enable process isolation for all iframes
|
||||
* add webRTC site settings (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1965)
|
||||
|
||||
# 101.0.4951.53
|
||||
* move incognito settings to separate page (thanks to @uazo)
|
||||
* disable automatic offline pages saving by default (thanks to @uazo)
|
||||
* make history support and site settings in always incognito mode disabled by default (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1991)
|
||||
* move pop-up toolbar to the bottom when using bottom navigation bar (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2030)
|
||||
* menu does not show all entries (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/2011)
|
||||
* stray shadow when using bottom toolbar (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1995)
|
||||
|
||||
# 101.0.4951.39
|
||||
* save only ContentSettings in always-incognito mode (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1942)
|
||||
* fix a couple issues related to signin and metrics leftover code affecting debug builds (thanks to @uazo)
|
||||
* remove some more parameters from the English-version search engine (thanks to @uazo)
|
||||
* add welcome screen with mention of privacy statements (fixes https://github.com/bromite/bromite/issues/691)
|
||||
|
||||
# 100.0.4896.135
|
||||
* remove mremap from seccomp baseline policy
|
||||
* add flag to move top toolbar to bottom (thanks to @uazo)
|
||||
|
||||
# 100.0.4896.92
|
||||
* improve user script errors and visualized name (thanks to @uazo)
|
||||
* fix autofill password not working anymore (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1956)
|
||||
* mark sites as visited when they have an already-parsed OpenSearch descriptor
|
||||
* disable TLS resumption by default (thanks to @uazo)
|
||||
* partition DoH requests by top-frame NIK (thanks to @uazo)
|
||||
|
||||
# 100.0.4896.83
|
||||
* update zh_CN translations (thanks to @zhmars)
|
||||
* fix custom UA reported via Javascript (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1936)
|
||||
* introduce session granularity for permissions (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1549)
|
||||
* disable crash reporting
|
||||
* avoid script injection on some sites
|
||||
* fix upstream OpenSearch bug with search engines prematurely discarded
|
||||
* fix upstream DNS bug with inconsistent Android system DNS configuration (fixes https://github.com/bromite/bromite/issues/1960)
|
||||
* use less invasive approach to protect local IP address when using webRTC (fixes https://github.com/bromite/bromite/issues/589)
|
||||
* add menu entry to select all bookmarks (fixes https://github.com/bromite/bromite/issues/1959)
|
||||
* fix Note 9 crash on startup (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1871)
|
||||
* remove passwords menu entry for leak check
|
||||
* remove privacy menu entry to use phone as a security key
|
||||
|
||||
# 100.0.4896.57
|
||||
* allow OpenSearch search engine URLs with path
|
||||
* disable AsyncDNS by default
|
||||
* remove translate menu entries
|
||||
* fix patch to remove contextual search (thanks to @nikolowry)
|
||||
* add option to never expire history
|
||||
* improve description for JIT site settings (fixes https://github.com/bromite/bromite/issues/1931)
|
||||
* remove more signin integration (fixes https://github.com/bromite/bromite/issues/1902)
|
||||
* miscellaneous fixes for AMP and background video playback (fixes https://github.com/bromite/bromite/issues/1921)
|
||||
* update zh_CN translations (thanks to @zhmars)
|
||||
|
||||
# 99.0.4844.77
|
||||
* fix missing adaptive icon for updates
|
||||
* do not close adblock filters editor when tapping reset button
|
||||
* change text for 'Never' in history days to keep setting
|
||||
* bring back dictionary hints in address bar
|
||||
|
||||
# 99.0.4844.58
|
||||
* remove contextual search (fixes https://github.com/bromite/bromite/issues/1750)
|
||||
* remove global JIT settings
|
||||
* add privacy setting for how many number of days of history to keep (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1870)
|
||||
* disable UA full version (thanks to @uazo)
|
||||
* reintroduce patch for Save-Data header
|
||||
* updated zh_CN translations (thanks to @zhmars)
|
||||
* reintroduce Save-Data header flag
|
||||
|
||||
# 99.0.4844.55
|
||||
* flag to enable Certificate Transparency (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1554)
|
||||
* allow adding search engines from incognito mode
|
||||
* disable all predictors code (thanks to @uazo)
|
||||
* revert allow block of view-source URLs
|
||||
* enable StrictOriginIsolation and SitePerProcess for all devices (thanks to @uazo)
|
||||
* JIT toggle site setting (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1720 and https://github.com/bromite/bromite/issues/1819)
|
||||
* move always incognito preference to native (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1496 and https://github.com/bromite/bromite/issues/1568)
|
||||
* remove Save-Data header flag
|
||||
* close a potential security issue with user scripts on native pages (thanks to @uazo)
|
||||
* disable safety checks and possible Omaha interactions
|
||||
* disable SegmentationPlatformFeature and Optimization Hints (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1632)
|
||||
* add notification for a major upstream version being released (fixes https://github.com/bromite/bromite/issues/1796)
|
||||
* fix screenshots in incognito allowed by default (fixes https://github.com/bromite/bromite/issues/1816)
|
||||
|
||||
# 98.0.4758.116
|
||||
* disable minidumps upload
|
||||
* complete disabling of client hint headers (thanks to @uazo)
|
||||
* disable another way to activate origin trials (thanks to @uazo)
|
||||
* fix for gateway attacks via websockets blocking (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1693)
|
||||
|
||||
# 98.0.4758.108
|
||||
* re-introduce flag for text fragments
|
||||
* re-introduce content feature flag to disable field trials
|
||||
* disable idle detection
|
||||
* disable critical client hints
|
||||
* disable supervised users
|
||||
* partial fix for incognito notification (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1503)
|
||||
* consider websockets 'unknown' address space as 'public' (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1693)
|
||||
* fix crash when accessing site settings of some sites (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1355)
|
||||
|
||||
# 97.0.4692.106
|
||||
* disable url-keyed metrics reporting service (thanks to @uazo)
|
||||
* disable mobile identity consistency by default
|
||||
* disable appending variations header
|
||||
* use Google Chrome branding for client hints
|
||||
* make HTTPS-only mode enabled by default
|
||||
* enable trivial auto var init (thanks to @BayLee4, fixes https://github.com/bromite/bromite/issues/1749)
|
||||
* enable use_cfi_cast
|
||||
|
||||
# 96.0.4664.183
|
||||
* updated zh_CN translations (thanks to @zhmars)
|
||||
|
||||
# 96.0.4664.104
|
||||
* separate patches for package name
|
||||
|
||||
# 96.0.4664.54
|
||||
* restored offline-indicator-v2 flag (fixes https://github.com/bromite/bromite/issues/1588)
|
||||
* re-introduced option to use home page as NTP (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1519)
|
||||
* ask user before closing all tabs (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1561)
|
||||
* fix crash on always incognito on tablet (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1611)
|
||||
* dropped patch to not upload crash data
|
||||
* fix autofill pop-up not appearing (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1534)
|
||||
|
||||
# 95.0.4638.79
|
||||
* improvements for field trials disable patch (thanks to @uazo)
|
||||
* remove privacy sandbox UI leftover (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1560)
|
||||
* disable conversion measurement API (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1531)
|
||||
* remove all code related to FLoC (thanks to @uazo)
|
||||
* remove all code related to ENABLE_REPORTING (thanks to @uazo)
|
||||
* enable ad-tagging feature
|
||||
* SystemWebView: ignore StrictMode warning (thanks to @jylitalbit, https://github.com/bromite/bromite/pull/1567)
|
||||
* improvements for field trials fetch patch (thanks to @uazo)
|
||||
* disable accessibility service by default (thanks to @uazo, https://github.com/bromite/bromite/pull/1559)
|
||||
|
||||
# 95.0.4638.78
|
||||
* disable third-party origin trials (fixes https://github.com/bromite/bromite/issues/1530)
|
||||
* dropped patch for async DNS flag
|
||||
* dropped duplicate patch for pull-to-refresh flag
|
||||
* fix application not closing on incognito tab (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1503)
|
||||
* fix external links in incognito not always opening (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1474)
|
||||
* fix incognito tab closing new tab under normal tab (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1030)
|
||||
* allow custom tab intents and opening external links in incognito (thanks to @uazo)
|
||||
* never use HTTP probes for connectivity check on Android < M
|
||||
* re-introduce option to use home page as NTP (thanks to @uazo, https://github.com/bromite/bromite/pull/1586)
|
||||
|
||||
# 94.0.4606.109
|
||||
* experimental user scripts support (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/792)
|
||||
* Bromite auto-update notifications enabled by default
|
||||
* enable Android native autofill (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/547)
|
||||
|
||||
# 94.0.4606.102
|
||||
* add flag to disable pull-to-refresh effect
|
||||
* add recents, offlinepage and send to home screen for always incognito (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1182 and https://github.com/bromite/bromite/issues/1362)
|
||||
* prompt to restart when always-incognito is enabled (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1459)
|
||||
* prompt to restart when always-incognito is enabled (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1474)
|
||||
* merge patches for custom tab intents
|
||||
|
||||
# 94.0.4606.94
|
||||
@@ -284,7 +116,7 @@
|
||||
* use 64-bit ABI for webview processes (fixes https://github.com/bromite/bromite/issues/997)
|
||||
* use dedicated folder for bookmark all tabs
|
||||
* fix Javascript and cookies permissions missing (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/990)
|
||||
* fix missing enable Save-Data header flag (fixes https://github.com/bromite/bromite/issues/989)
|
||||
* fix missing enable save data header flag (fixes https://github.com/bromite/bromite/issues/989)
|
||||
* fix menu items not properly displayed with tab overflow menu regroup (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/963)
|
||||
|
||||
# 89.0.4389.78
|
||||
|
||||
@@ -20,7 +20,7 @@ Projects which follow a strict approach on this are [Iridium](https://iridiumbro
|
||||
|
||||
Yes, in order to play protected/encrypted media content the browser will use Android's DRM media framework to automatically negotiate access (same as Chromium).
|
||||
This means for example that requests to Android license servers will be performed (`www.googleapis.com`), see https://w3c.github.io/encrypted-media/#direct-individualization
|
||||
To disable this functionality you should disable protected content playback from Site settings -> Protected Content.
|
||||
To disable this functionality you should disable protected content playback from Site settings -> Multimedia.
|
||||
|
||||
## What is the SystemWebView?
|
||||
It is the core component of Android for all web page visualizations. For example when you access a new wifi network and need to activate it, that is using the SystemWebView. If you do not know what it is then you do not need to install it.
|
||||
@@ -31,7 +31,7 @@ Ad-blocking was present and always enabled in the SystemWebView from version `72
|
||||
|
||||
## How to enable DNS-over-HTTPS?
|
||||
|
||||
See [this page](https://www.bromite.org/doh).
|
||||
See [this wiki page](https://github.com/bromite/bromite/wiki/Enabling-DNS-over-HTTPS).
|
||||
|
||||
## Can you add HTTPS everywhere?
|
||||
No.
|
||||
@@ -48,7 +48,9 @@ It is not on the official F-Droid repository and there are no (more) plans to su
|
||||
You can use F-Droid client to install and receive updates via [the official Bromite F-Droid repository](https://www.bromite.org/fdroid).
|
||||
|
||||
## Does Bromite support WebRTC?
|
||||
Partially, see https://github.com/bromite/bromite/wiki/WebRTC
|
||||
Yes, since version 69. While the desktop version of Chromium has an option to disable it (video/audio site settings), the Android version cannot.
|
||||
|
||||
The WebRTC functionality has always been using safe defaults to prevent leaks (disabled multiple routes and non-proxied UDP).
|
||||
|
||||
## Using Bromite will favour the monopoly of the Chromium/Blink engine, why do you develop and maintain Bromite?
|
||||
In short, to show what a Chromium-based engine could do **for the user** if the user experience and needs were the main focus of modern browser design.
|
||||
@@ -72,20 +74,9 @@ PWAs are only supported as home shortcuts; WebAPKs will not work because they ar
|
||||
|
||||
## Does Bromite support the Android autofill framework?
|
||||
|
||||
Yes, since version 94.0.4606.109 the native Android autofill can be used; this does not require accessibility services as a workaround.
|
||||
No; the only autofill available in Chromium browsers requires integration with the Play Store binary blobs.
|
||||
Some apps use accessibility services as a workaround.
|
||||
|
||||
## Does Bromite support casting media content?
|
||||
|
||||
No, this would require Play Store binary blobs.
|
||||
|
||||
## Can you add this search engine as default?
|
||||
No.
|
||||
Bromite does not make any choice related to default search engines, the Chromium default is used.
|
||||
Various Android browsers get some fee to ship their apps with a specific default search engine, Bromite does not get any fee from anyone.
|
||||
Changing the default search engine would lead to an endless series of requests to change it based on personal preferences, thus no change is made to the default.
|
||||
See also: https://github.com/bromite/bromite/wiki/SearchEngines
|
||||
|
||||
## Some sites show ads, how can I fix this?
|
||||
You can compare the blocked URLs with a desktop browser and Bromite (using [remote debugging](https://developer.chrome.com/docs/devtools/remote-debugging/)) and figure out some new filter rules to be added.
|
||||
If the ads are blocked via cosmetic filtering then blocking them is not possible with Bromite's engine and you might need something like an [user script](https://github.com/bromite/bromite/wiki/UserScripts) instead.
|
||||
See also: https://github.com/bromite/bromite/wiki/AdBlocking
|
||||
No; this would require Play Store binary blobs.
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
# Bromite - Take back your browser
|
||||
<a href="https://github.com/bromite/bromite/releases/latest">
|
||||
<img src="https://www.bromite.org/release.svg" alt="current Bromite release" title="current Bromite release" /> </a>
|
||||
<a href="https://github.com/bromite/bromite/blob/master/LICENSE">
|
||||
<img src="https://www.bromite.org/license.svg" alt="GNU GPL v3" title="GNU VPL v3" />
|
||||
</a> <br>
|
||||
<a href="https://www.bromite.org">
|
||||
<img title="Bromite - take back your browser!" src="https://www.bromite.org/android-icon-192x192.png" width="96" alt="Bromite" />
|
||||
</a>
|
||||
|
||||
<img src="https://www.bromite.org/release.svg" alt="current Bromite release" title="current Bromite release" /> <img src="https://www.bromite.org/license.svg" alt="GNU GPL v3" title="GNU VPL v3" />
|
||||
|
||||
<img title="Bromite - take back your browser!" src="https://www.bromite.org/android-icon-192x192.png" width="96" alt="Bromite" />
|
||||
|
||||
Bromite is a [Chromium](https://www.chromium.org/Home) fork with support for ad blocking and enhanced privacy.
|
||||
|
||||
Bromite is only available for Android Marshmallow (v6.0, API level 23) and above.
|
||||
Bromite is only available for Android Lollipop (v5.0, API level 21) and above.
|
||||
|
||||
<img src="https://fdroid.bromite.org/fdroid/bromite_bromite_gh_downloads.svg" alt="Downloads on Github" title="Downloads on Github" />
|
||||
|
||||
@@ -29,23 +25,21 @@ Please donate to support development of Bromite and the costs for the build syst
|
||||
|
||||
[→ Support development with a donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JP3XTQPVRNET2): [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JP3XTQPVRNET2)
|
||||
|
||||
<a href="bitcoin:bc1qlx7h0lj9z88g2xfeuwsrtfs77sxuhrxf2t28sw">BTC donations address</a>: `bc1qlx7h0lj9z88g2xfeuwsrtfs77sxuhrxf2t28sw`
|
||||
<a href="bitcoin:bc1qmpyuqsvs3tz3uaysplmwjr33gg4rzu6cqweaq834ehc25vduxppqkrszel">BTC donations address</a>: `bc1qmpyuqsvs3tz3uaysplmwjr33gg4rzu6cqweaq834ehc25vduxppqkrszel`
|
||||
|
||||
ETH donations address: `0x5d392F8FBf3465afe05B1Adc575e248D33B891F6`
|
||||
ETH donations address: `0xf47ff39223d828f99fec5ab53bd068c5c0522042`
|
||||
|
||||
# Features
|
||||
|
||||
* customizable adblock filters via user-provided URL (see https://www.bromite.org/custom-filters)
|
||||
* automatically updated adblock filters
|
||||
* remove click-tracking and AMP from search results
|
||||
* DNS-over-HTTPS support with any valid IETF DoH endpoint
|
||||
* always-incognito mode
|
||||
* disable all field trials permanently
|
||||
* disable smart search by default, allow web search from incognito mode
|
||||
* always-visible cookies, javascript and ads site settings from address bar popup
|
||||
* always-visible cookies, javascript and ads site settings
|
||||
* remove Play integration binary blobs
|
||||
* use [CFI](https://en.wikipedia.org/wiki/Control-flow_integrity) on all architectures except x86
|
||||
* enable trivial auto var init
|
||||
* disable media router and remoting by default
|
||||
* disable dynamic module loading
|
||||
* show warnings for TLSv1.0/TLSv1.1 pages
|
||||
@@ -59,7 +53,7 @@ ETH donations address: `0x5d392F8FBf3465afe05B1Adc575e248D33B891F6`
|
||||
* security enhancement patches from [GrapheneOS](https://github.com/GrapheneOS) project
|
||||
* disable scroll-to-text-fragment
|
||||
* reduced referer granularity
|
||||
* block gateway attacks via websockets (partial fix, see [this upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=590714))
|
||||
* block gateway attacks via websockets
|
||||
* use 64-bit ABI for webview processes
|
||||
* make all favicon requests on-demand ([supercookie](https://supercookie.me/) mitigation)
|
||||
* enable all network isolation features (`PartitionConnectionsByNetworkIsolationKey`, `PartitionHttpServerPropertiesByNetworkIsolationKey`, `SplitHostCacheByNetworkIsolationKey`, `AppendFrameOriginToNetworkIsolationKey`, `SplitCacheByNetworkIsolationKey`, `UseRegistrableDomainInNetworkIsolationKey`, `PartitionSSLSessionsByNetworkIsolationKey`, `PartitionExpectCTStateByNetworkIsolationKey`, `PartitionDomainReliabilityByNetworkIsolationKey`)
|
||||
@@ -67,32 +61,19 @@ ETH donations address: `0x5d392F8FBf3465afe05B1Adc575e248D33B891F6`
|
||||
* ask permission to play protected media
|
||||
* disable the DIAL repeating discovery
|
||||
* disable RTCGetCurrentBrowsingContextMedia by default
|
||||
* disable FLoC and privacy sandbox by default
|
||||
* disable FLoC by default
|
||||
* disable feeds
|
||||
* disable reporting of certificate errors
|
||||
* use pre-defined phone model for client hints and Javascript
|
||||
* site settings to disable images
|
||||
* allow forcing external links to open in incognito
|
||||
* disable AGSA by default
|
||||
* flag to enable Certificate Transparency
|
||||
* allow adding search engines from incognito mode
|
||||
* disable predictors
|
||||
* disable supervised users
|
||||
* disable safety check
|
||||
* disable capability to block `view-source:` URLs
|
||||
* disable `SegmentationPlatformFeature`, `OptimizationHints`, client hint headers
|
||||
* disable `AsyncDNS` by default
|
||||
* customize history expiration threshold
|
||||
* disable idle detection
|
||||
* HTTPS-only mode enabled by default
|
||||
* disable TLS resumption by default
|
||||
* partition DoH requests by top-frame NIK
|
||||
* add option to use home page as NTP
|
||||
* allow disabling JIT
|
||||
|
||||
## Features not related to privacy
|
||||
* browser automatic updates, enabled by default
|
||||
* native Android autofill support
|
||||
* import/export bookmarks
|
||||
* bookmark all tabs from tabs regroup menu
|
||||
* flag to allow screenshots of incognito tabs
|
||||
* allow playing videos in background tabs and disable pause on switching tabs
|
||||
* all codecs included (proprietary, open H.264 etc.)
|
||||
* [AV1 codec support](https://github.com/bromite/bromite/wiki/AV1-support)
|
||||
@@ -105,17 +86,15 @@ ETH donations address: `0x5d392F8FBf3465afe05B1Adc575e248D33B891F6`
|
||||
* adding an URL as bookmark will clear its blocked status for the NTP tiles
|
||||
* history support in incognito mode
|
||||
* view source of pages
|
||||
* timezone customization
|
||||
* sticky desktop mode setting
|
||||
* disable video autoplay by default, reintroduce site settings
|
||||
* mobile/desktop user agent customization
|
||||
* accessibility preference to force tablet UI
|
||||
* use Alt+D to focus address bar
|
||||
* allow sharing to Bromite
|
||||
* browser automatic updates
|
||||
* UI for crash information collection
|
||||
* allow OpenSearch search engine detection in incognito
|
||||
* allow OpenSearch search engine detection with paths
|
||||
* keyboard dictionary hints in address bar
|
||||
* always allow `view-source:` URLs
|
||||
* allow moving navigation bar to bottom
|
||||
|
||||
You can inspect all functionality/privacy changes by reading the [patches](https://github.com/bromite/bromite/tree/master/build/patches) and/or the [CHANGELOG](./CHANGELOG.md).
|
||||
|
||||
@@ -131,15 +110,15 @@ Flags which have been retired from upstream Chromium but are still available in
|
||||
* `#num-raster-threads`
|
||||
* `#enable-image-reader`, enabled by default
|
||||
* `#enable-tab-groups` and `#enable-tab-groups-ui-improvements`
|
||||
* `#offline-indicator-v2`
|
||||
|
||||
New flags:
|
||||
|
||||
* `#fingerprinting-canvas-image-data-noise`, `#fingerprinting-client-rects-noise` and `#fingerprinting-canvas-measuretext-noise`, enabled by default
|
||||
* `#incognito-screenshot`, disabled by default
|
||||
* `#enable-incognito-snapshots-in-android-recents`, disabled by default
|
||||
* `#max-connections-per-host`
|
||||
* `#resume-background-video`
|
||||
* `#ipv6-probing`
|
||||
* `#disable-webgl`
|
||||
* `#enable-device-motion` and `#enable-device-orientation`
|
||||
* `#show-legacy-tls-warnings`
|
||||
* `#save-data-header`, disabled by default
|
||||
@@ -148,19 +127,6 @@ New flags:
|
||||
* `#cleartext-permitted`, enabled by default, can be used to disable all cleartext-HTTP traffic
|
||||
* `#omnibox-autocomplete-filtering`, can be used to restrict omnibox autocomplete results
|
||||
* `#disable-external-intent-requests`
|
||||
* `#enable-userscripts-log`, see https://github.com/bromite/bromite/wiki/UserScripts#flags
|
||||
* `#certificate-transparency-enabled`, enabled by default; see https://chromium.googlesource.com/chromium/src/+/master/net/docs/certificate-transparency.md
|
||||
* `#move-top-toolbar-to-bottom`, disabled by default
|
||||
* `#site-engagement`, enabled by default
|
||||
|
||||
### Site settings
|
||||
|
||||
* webGL, disabled by default
|
||||
* images, enabled by default
|
||||
* Javascript JIT, disabled by default
|
||||
* timezone customization override
|
||||
* autoplay, disabled by default
|
||||
* webRTC, disabled by default
|
||||
|
||||
# Privacy limitations
|
||||
|
||||
@@ -172,10 +138,10 @@ All built versions are available as [releases](https://github.com/bromite/bromit
|
||||
|
||||
Each tag corresponds to a Chromium Stable release tag.
|
||||
|
||||
Bromite is currently built for ARM, ARM64 and x86 and for the Android SDK version 23+; [Bromite SystemWebView](https://www.bromite.org/system_web_view) is provided as well (SDK23+).
|
||||
Bromite is currently built for ARM, ARM64 and x86 and for the Android SDK versions 19 and 21; [Bromite SystemWebView](https://www.bromite.org/system_web_view) is provided as well (SDK21+).
|
||||
For every Bromite build you can always find a matching [vanilla Chromium](https://www.bromite.org/chromium) build which is used for example to verify which issues are specific to Bromite or not.
|
||||
|
||||
You will automatically receive notifications about new updates (and be able to install them) via the auto updater functionality (enabled by default), see [related wiki page](https://github.com/bromite/bromite/wiki/AutomaticUpdates).
|
||||
You can automatically receive notifications about new updates (and install them) by enabling the auto updater functionality, see [related wiki page](https://github.com/bromite/bromite/wiki/AutomaticUpdates).
|
||||
|
||||
All official releases are also available through the [official third-party F-Droid repository](https://www.bromite.org/fdroid).
|
||||
|
||||
@@ -206,7 +172,7 @@ The [Bromite main repository](https://github.com/bromite/bromite) contains tags
|
||||
Please refer to [official Chromium build documentation](https://www.chromium.org/developers/how-tos/get-the-code) to get started on how to build Chromium; if you can build Chromium for Android, you can build Bromite.
|
||||
|
||||
The Chromium version tag used as base for the patches is available here: [RELEASE](./build/RELEASE); this is always corresponding to the git tag for every release.
|
||||
The GN args used to build Bromite are available here: [bromite.gn_args](./build/bromite.gn_args).
|
||||
The GN args used to build Bromite are available here: [GN_ARGS](./build/GN_ARGS).
|
||||
The patches are to be applied second the order specified in the `bromite_patches_list.txt` file (you can use `git am`).
|
||||
|
||||
## How to build the filters
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
android_channel="stable"
|
||||
blink_symbol_level=1
|
||||
build_contextual_search=false
|
||||
build_with_tflite_lib=false
|
||||
chrome_pgo_phase=0
|
||||
dcheck_always_on=false
|
||||
debuggable_apks=false
|
||||
@@ -18,16 +16,15 @@ enable_iterator_debugging=false
|
||||
enable_mdns=false
|
||||
enable_mse_mpeg2ts_stream_parser=true
|
||||
enable_nacl=false
|
||||
enable_nacl_nonsfi=false
|
||||
enable_platform_dolby_vision=true
|
||||
enable_platform_hevc=true
|
||||
enable_remoting=false
|
||||
enable_reporting=false
|
||||
enable_supervised_users=false
|
||||
enable_vr=false
|
||||
exclude_unwind_tables=false
|
||||
ffmpeg_branding="Chrome"
|
||||
icu_use_data_file=true
|
||||
is_cfi=true
|
||||
is_component_build=false
|
||||
is_debug=false
|
||||
is_official_build=true
|
||||
@@ -35,9 +32,7 @@ proprietary_codecs=true
|
||||
rtc_build_examples=false
|
||||
safe_browsing_mode=0
|
||||
symbol_level=1
|
||||
system_webview_package_name="org.bromite.webview"
|
||||
target_os="android"
|
||||
use_cfi_cast=true
|
||||
use_debug_fission=true
|
||||
use_errorprone_java_compiler=false
|
||||
use_gnome_keyring=false
|
||||
@@ -1 +0,0 @@
|
||||
d5d96df7c999fb23a203ac332784b203afe8614f-
|
||||
+1
-1
@@ -1 +1 @@
|
||||
102.0.5005.96
|
||||
94.0.4606.102
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
91e2c8c16071b47c9a1d2c1bba592f6a643dd1b1
|
||||
@@ -1,15 +1,11 @@
|
||||
Disable-third-party-cookies-by-default.patch
|
||||
do-not-hide-.orig-files.patch
|
||||
Do-not-link-with-libatomic.patch
|
||||
do-not-add-suffix-to-package-name.patch
|
||||
exit-on-failure-of-inclusion.patch
|
||||
AV1-codec-support.patch
|
||||
Switch-to-fstack-protector-strong.patch
|
||||
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
|
||||
Bromite-package-name.patch
|
||||
Restore-classic-new-tab-page.patch
|
||||
Always-use-new-tab-page-for-default-home-page.patch
|
||||
disable-battery-status-updater.patch
|
||||
Always-allow-partner-customisation.patch
|
||||
battery_status_service-disable-more-privacy-nightmares.patch
|
||||
Battery-API-return-nothing.patch
|
||||
updater-disable-updater-pings.patch
|
||||
Remove-EV-certificates.patch
|
||||
@@ -20,19 +16,23 @@ Do-not-hide-component-extensions.patch
|
||||
Do-not-store-passwords-by-default.patch
|
||||
Disable-NTP-remote-suggestions-by-default.patch
|
||||
Disable-references-to-fonts.googleapis.com.patch
|
||||
webRTC-do-not-expose-local-IP-addresses.patch
|
||||
Change-default-webRTC-policy-to-not-use-any-address.patch
|
||||
Never-send-any-crash-upload-data.patch
|
||||
Hide-send-reports-checkbox.patch
|
||||
Never-fetch-popular-sites.patch
|
||||
ungoogled-chromium-Disable-webRTC-log-uploader.patch
|
||||
ungoogled-chromium-Disable-untraceable-URLs.patch
|
||||
ungoogled-chromium-Disable-translate-integration.patch
|
||||
ungoogled-chromium-Disable-profile-avatar.patch
|
||||
ungoogled-chromium-Disable-intranet-detector.patch
|
||||
ungoogled-chromium-no-special-hosts-domains.patch
|
||||
ungoogled-chromium-Disable-intranet-redirect-detector.patch
|
||||
ungoogled-chromium-Disable-Google-host-detection.patch
|
||||
ungoogled-chromium-Disable-Gaia.patch
|
||||
ungoogled-chromium-Disable-domain-reliability.patch
|
||||
ungoogled-chromium-Disable-Network-Time-Tracker.patch
|
||||
Disable-safe-browsing.patch
|
||||
Skip-the-first-run-and-metrics.patch
|
||||
Disable-all-promo-dialogs.patch
|
||||
Remove-signin-integrations.patch
|
||||
Remove-signin-and-data-saver-integrations.patch
|
||||
Hide-passwords-manager-link.patch
|
||||
Disable-update-scheduler.patch
|
||||
Add-English-only-search-engine.patch
|
||||
@@ -47,31 +47,24 @@ Add-exit-menu-item.patch
|
||||
Remove-help-menu-item.patch
|
||||
AudioBuffer-AnalyserNode-fp-mitigations.patch
|
||||
Multiple-fingerprinting-mitigations.patch
|
||||
Disable-metrics-on-all-I-O-threads.patch
|
||||
Always-respect-async-dns-flag-regardless-of-SDK-version.patch
|
||||
Add-flag-to-configure-maximum-connections-per-host.patch
|
||||
Do-not-ignore-download-location-prompt-setting.patch
|
||||
Add-support-for-writing-URIs.patch
|
||||
Add-bookmark-import-export-actions.patch
|
||||
Bookmarks-select-all-menu-entry.patch
|
||||
Add-an-always-incognito-mode.patch
|
||||
Keep-flag-to-allow-screenshots-in-Incognito-mode.patch
|
||||
Add-option-to-not-persist-tabs-across-sessions.patch
|
||||
Add-a-proxy-configuration-page.patch
|
||||
Move-some-account-settings-back-to-privacy-settings.patch
|
||||
Remove-contextual-search-manager.patch
|
||||
Add-custom-tab-intents-privacy-option.patch
|
||||
Disable-FLoC-and-privacy-sandbox.patch
|
||||
History-number-of-days-privacy-setting.patch
|
||||
Disable-fetching-of-all-field-trials.patch
|
||||
Disable-seed-based-field-trials.patch
|
||||
Disable-plugins-enumeration.patch
|
||||
net-cert-increase-default-key-length.patch
|
||||
net-cert-increase-default-key-length-for-newly-generated-RSA-keys.patch
|
||||
dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch
|
||||
Add-flag-to-disable-IPv6-probes.patch
|
||||
profile-resetter-disable-send-settings.patch
|
||||
profile-resetter-do-not-tick-send-settings-by-default.patch
|
||||
Do-not-build-API-keys-infobar.patch
|
||||
autofill-miscellaneous.patch
|
||||
Enable-native-Android-autofill.patch
|
||||
autofill-disable-autofill-download-manager.patch
|
||||
first_run-deactivate-autoupdate-globally.patch
|
||||
translate-disable-fetching-of-languages-from-server.patch
|
||||
translate-disable-fetching-of-translate-languages-from-server.patch
|
||||
kill-TOS-and-metrics-opt-out.patch
|
||||
kill-Vision.patch
|
||||
kill-Location-fall-back-to-system.patch
|
||||
kill-Auth.patch
|
||||
@@ -80,14 +73,16 @@ Remove-SMS-integration.patch
|
||||
Do-not-compile-QR-code-sharing.patch
|
||||
Allow-website-sign-in-without-account-sign-in.patch
|
||||
Offer-builtin-autocomplete-for-chrome-flags.patch
|
||||
Disable-search-engine-DSE-automatic-permission.patch
|
||||
Add-flag-to-disable-IPv6-probes.patch
|
||||
Add-a-proxy-configuration-page.patch
|
||||
Use-4-tile-rows-never-show-logo.patch
|
||||
Disable-various-metrics.patch
|
||||
Disable-metrics-collection-for-NTP-tiles.patch
|
||||
Enable-SPPI-for-devices-with-enough-memory.patch
|
||||
Enable-StrictOriginIsolation-and-SitePerProcess.patch
|
||||
Use-64-bit-WebView-processes.patch
|
||||
prefs-disable-signinallowed-by-default.patch
|
||||
prefs-always-prompt-for-download-directory.patch
|
||||
Disable-offline-pages-in-CCT.patch
|
||||
prefs-always-prompt-for-download-directory-by-default.patch
|
||||
Disable-offline-pages-in-the-downloads-home-to-be-opened-in-CCT-by-default.patch
|
||||
disable-payment-support-by-default.patch
|
||||
disable-background-sync-by-default.patch
|
||||
disable-sensors-access-site-setting-by-default.patch
|
||||
@@ -96,24 +91,29 @@ Restore-Search-Ready-Omnibox-flag.patch
|
||||
disable-AdsBlockedInfoBar.patch
|
||||
Bromite-AdBlockUpdaterService.patch
|
||||
Replace-DoH-probe-domain-with-RIPE-domain.patch
|
||||
Increase-number-of-autocomplete-matches-to-10.patch
|
||||
Disable-requests-for-single-word-Omnibar-searches.patch
|
||||
Increase-number-of-autocomplete-matches-from-5-to-10.patch
|
||||
Disable-HEAD-requests-for-single-word-Omnibar-searches.patch
|
||||
Disable-some-signed-exchange-features.patch
|
||||
DoH-improvements.patch
|
||||
Add-flag-to-disable-WebGL.patch
|
||||
DoH-secure-mode-by-default.patch
|
||||
Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch
|
||||
Revert-flags-remove-disable-pull-to-refresh-effect.patch
|
||||
Use-dummy-DFM-installer.patch
|
||||
Disable-feeds-support-by-default.patch
|
||||
Disable-autofill-assistant-by-default.patch
|
||||
Show-site-settings-for-cookies-javascript-and-ads.patch
|
||||
Disable-DRM-media-origin-IDs-preprovisioning.patch
|
||||
Disable-smart-selection-by-default.patch
|
||||
Enable-user-agent-freeze-by-default.patch
|
||||
disable-browser-autologin-by-default.patch
|
||||
AImageReader-CFI-crash-mitigations.patch
|
||||
Update-i18n-zh_CN-support.patch
|
||||
Add-a-flag-to-allow-screenshots-in-Incognito-mode.patch
|
||||
Add-menu-item-to-view-source.patch
|
||||
Block-gateway-attacks-via-websockets.patch
|
||||
Enable-prefetch-privacy-changes-by-default.patch
|
||||
Disable-support-for-RAR-files-inspection.patch
|
||||
Add-history-support-in-incognito-mode.patch
|
||||
Enable-darken-websites-checkbox-in-themes.patch
|
||||
Remove-blocklisted-URLs-upon-bookmark-creation.patch
|
||||
Disable-the-DIAL-repeating-discovery.patch
|
||||
@@ -121,18 +121,20 @@ Block-qjz9zk-or-trk-requests.patch
|
||||
Hardening-against-incognito-mode-detection.patch
|
||||
Remove-weblayer-dependency-on-Play-Services.patch
|
||||
Timezone-customization.patch
|
||||
Move-some-account-settings-back-to-privacy-settings.patch
|
||||
Restore-Simplified-NTP-launch.patch
|
||||
Add-option-to-use-home-page-as-NTP.patch
|
||||
Revert-the-removal-of-an-option-to-block-autoplay.patch
|
||||
Disable-text-fragments-by-default.patch
|
||||
disable-WebView-variations-support.patch
|
||||
disable-autofill-server-communication-by-default.patch
|
||||
ask-permission-to-play-protected-media-by-default.patch
|
||||
Enable-network-isolation-features.patch
|
||||
Disable-unified-autoplay-feature.patch
|
||||
Revert-flags-remove-num-raster-threads.patch
|
||||
webview-Hard-no-to-persistent-histograms.patch
|
||||
Ignore-enterprise-policies-for-secure-DNS.patch
|
||||
Add-menu-item-to-bookmark-all-tabs.patch
|
||||
Ask-user-before-closing-all-tabs.patch
|
||||
Add-flag-for-save-data-header.patch
|
||||
Add-option-to-force-tablet-UI.patch
|
||||
Make-all-favicon-requests-on-demand.patch
|
||||
Add-Alt-D-hotkey-to-focus-address-bar.patch
|
||||
@@ -142,58 +144,21 @@ Add-AllowUserCertificates-flag.patch
|
||||
Add-IsCleartextPermitted-flag.patch
|
||||
Unexpire-tab-groups-flags.patch
|
||||
Add-flag-for-omnibox-autocomplete-filtering.patch
|
||||
Enable-IntentBlockExternalFormRedirectsNoGesture.patch
|
||||
Enable-IntentBlockExternalFormRedirectsNoGesture-by-default.patch
|
||||
Add-flag-to-disable-external-intent-requests.patch
|
||||
Logcat-crash-reports-UI.patch
|
||||
Add-support-for-ISupportHelpAndFeedback.patch
|
||||
JIT-site-settings.patch
|
||||
JIT-less-toggle.patch
|
||||
API-level-21-prevent-crash-on-download.patch
|
||||
Add-flag-to-disable-vibration.patch
|
||||
mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
|
||||
Client-hints-overrides.patch
|
||||
Override-UA-client-hint-for-model.patch
|
||||
Disable-AGSA-by-default.patch
|
||||
Allow-building-without-enable_reporting.patch
|
||||
Disable-lock-icon-in-address-bar-by-default.patch
|
||||
Add-custom-tab-intents-privacy-option.patch
|
||||
Enable-share-intent.patch
|
||||
Site-setting-for-images.patch
|
||||
Bromite-auto-updater.patch
|
||||
Experimental-user-scripts-support.patch
|
||||
Keep-empty-tabs-between-sessions.patch
|
||||
Disable-third-party-origin-trials.patch
|
||||
Never-use-HTTP-probes-for-connection-detection.patch
|
||||
Disable-Accessibility-service-by-default.patch
|
||||
Disable-conversion-measurement-api.patch
|
||||
Restore-offline-indicator-v2-flag.patch
|
||||
Reintroduce-override_build_timestamp.patch
|
||||
enable-ftrivial-auto-var-init-zero.patch
|
||||
disable-appending-variations-header.patch
|
||||
Make-HTTPS-only-mode-the-default.patch
|
||||
Disable-idle-detection.patch
|
||||
Allow-building-without-supervised-users.patch
|
||||
Disable-minidump-upload-scheduling.patch
|
||||
Revert-Permit-blocking-of-view-source.patch
|
||||
Disable-safety-check.patch
|
||||
Disable-all-predictors-code.patch
|
||||
OpenSearch-miscellaneous.patch
|
||||
Update-i18n-zh_CN-support.patch
|
||||
Add-flag-for-save-data-header.patch
|
||||
Disable-UA-full-version.patch
|
||||
Dictionary-suggestions-for-the-Omnibox.patch
|
||||
Disable-AsyncDNS-by-default.patch
|
||||
Add-lifetime-options-for-permissions.patch
|
||||
Disable-crash-reporting.patch
|
||||
Samsung-Note-9-SDK27-crazylinker-workaround.patch
|
||||
Disable-TLS-resumption.patch
|
||||
Partition-DNS-requests-by-top-frame-NIK.patch
|
||||
Remove-mremap-from-seccomp-baseline-policy.patch
|
||||
Move-navigation-bar-to-bottom.patch
|
||||
Welcome-screen.patch
|
||||
Content-settings-infrastructure.patch
|
||||
Add-webGL-site-setting.patch
|
||||
Add-site-engagement-flag.patch
|
||||
Add-webRTC-site-settings.patch
|
||||
enable-process-isolated-sandboxed-iframes-by-default.patch
|
||||
Enable-Certificate-Transparency.patch
|
||||
Invalidate-components-public-key.patch
|
||||
Improve-plain-text-rendering-on-mobile.patch
|
||||
Add-flag-to-disable-pull-to-refresh-effect.patch
|
||||
Automated-domain-substitution.patch
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
android_channel="stable"
|
||||
blink_symbol_level=1
|
||||
build_contextual_search=false
|
||||
build_with_tflite_lib=false
|
||||
chrome_pgo_phase=0
|
||||
dcheck_always_on=false
|
||||
debuggable_apks=false
|
||||
dfmify_dev_ui=false
|
||||
disable_android_lint=true
|
||||
disable_autofill_assistant_dfm=true
|
||||
disable_fieldtrial_testing_config=true
|
||||
disable_tab_ui_dfm=true
|
||||
enable_av1_decoder=true
|
||||
enable_dav1d_decoder=true
|
||||
enable_gvr_services=false
|
||||
enable_hangout_services_extension=false
|
||||
enable_iterator_debugging=false
|
||||
enable_mdns=false
|
||||
enable_mse_mpeg2ts_stream_parser=true
|
||||
enable_nacl=false
|
||||
enable_platform_dolby_vision=true
|
||||
enable_platform_hevc=true
|
||||
enable_remoting=false
|
||||
enable_reporting=true
|
||||
enable_supervised_users=false
|
||||
enable_vr=false
|
||||
exclude_unwind_tables=false
|
||||
ffmpeg_branding="Chrome"
|
||||
icu_use_data_file=true
|
||||
is_cfi=true
|
||||
is_component_build=false
|
||||
is_debug=false
|
||||
is_official_build=true
|
||||
proprietary_codecs=true
|
||||
rtc_build_examples=false
|
||||
safe_browsing_mode=2
|
||||
symbol_level=1
|
||||
system_webview_package_name="com.android.webview"
|
||||
target_os="android"
|
||||
use_cfi_cast=true
|
||||
use_debug_fission=true
|
||||
use_errorprone_java_compiler=false
|
||||
use_gnome_keyring=false
|
||||
use_official_google_api_keys=false
|
||||
use_rtti=false
|
||||
use_sysroot=false
|
||||
webview_includes_weblayer=false
|
||||
@@ -1,12 +1,4 @@
|
||||
AV1-codec-support.patch
|
||||
exit-on-failure-of-inclusion.patch
|
||||
Reintroduce-override_build_timestamp.patch
|
||||
do-not-hide-.orig-files.patch
|
||||
Do-not-link-with-libatomic.patch
|
||||
do-not-add-suffix-to-package-name.patch
|
||||
Switch-to-fstack-protector-strong.patch
|
||||
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
|
||||
enable-ftrivial-auto-var-init-zero.patch
|
||||
Disable-feeds-support-by-default.patch
|
||||
Allow-building-without-supervised-users.patch
|
||||
Chromium-package-name.patch
|
||||
|
||||
@@ -20,7 +20,7 @@ See discussions at:
|
||||
---
|
||||
base/android/android_image_reader_compat.cc | 8 +++++++-
|
||||
base/android/android_image_reader_compat.h | 4 ++++
|
||||
chrome/browser/flag-metadata.json | 6 +++---
|
||||
chrome/browser/flag-metadata.json | 2 +-
|
||||
gpu/config/gpu_driver_bug_list.json | 16 ++++++++++++++++
|
||||
gpu/config/gpu_finch_features.cc | 5 +++++
|
||||
gpu/config/gpu_finch_features.h | 1 +
|
||||
@@ -30,7 +30,7 @@ See discussions at:
|
||||
gpu/ipc/service/stream_texture_android.cc | 11 ++++++++++-
|
||||
media/base/media_switches.cc | 4 ++++
|
||||
media/base/media_switches.h | 1 +
|
||||
12 files changed, 65 insertions(+), 5 deletions(-)
|
||||
12 files changed, 63 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/base/android/android_image_reader_compat.cc b/base/android/android_image_reader_compat.cc
|
||||
--- a/base/android/android_image_reader_compat.cc
|
||||
@@ -61,9 +61,9 @@ diff --git a/base/android/android_image_reader_compat.cc b/base/android/android_
|
||||
diff --git a/base/android/android_image_reader_compat.h b/base/android/android_image_reader_compat.h
|
||||
--- a/base/android/android_image_reader_compat.h
|
||||
+++ b/base/android/android_image_reader_compat.h
|
||||
@@ -24,6 +24,9 @@ class BASE_EXPORT AndroidImageReader {
|
||||
AndroidImageReader(const AndroidImageReader&) = delete;
|
||||
AndroidImageReader& operator=(const AndroidImageReader&) = delete;
|
||||
@@ -22,6 +22,9 @@ class BASE_EXPORT AndroidImageReader {
|
||||
// Thread safe GetInstance.
|
||||
static AndroidImageReader& GetInstance();
|
||||
|
||||
+ // Disable image reader support.
|
||||
+ static void DisableSupport();
|
||||
@@ -71,7 +71,7 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i
|
||||
// Check if the image reader usage is supported. This function returns TRUE
|
||||
// if android version is >=OREO, image reader support is not disabled and all
|
||||
// the required functions are loaded.
|
||||
@@ -61,6 +64,7 @@ class BASE_EXPORT AndroidImageReader {
|
||||
@@ -59,6 +62,7 @@ class BASE_EXPORT AndroidImageReader {
|
||||
jobject ANativeWindow_toSurface(JNIEnv* env, ANativeWindow* window);
|
||||
|
||||
private:
|
||||
@@ -82,15 +82,11 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i
|
||||
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
|
||||
--- a/chrome/browser/flag-metadata.json
|
||||
+++ b/chrome/browser/flag-metadata.json
|
||||
@@ -2243,9 +2243,9 @@
|
||||
"expiry_milestone": 106
|
||||
},
|
||||
@@ -2017,7 +2017,7 @@
|
||||
{
|
||||
- "name": "enable-image-reader",
|
||||
- "owners": [ "vikassoni", "liberato" ],
|
||||
- "expiry_milestone": 115
|
||||
+ "name": "enable-image-reader", // Bromite: do not expire
|
||||
+ "owners": [ "vikassoni", "liberato" ], // flag
|
||||
"name": "enable-image-reader",
|
||||
"owners": [ "vikassoni", "liberato" ],
|
||||
- "expiry_milestone": 95
|
||||
+ "expiry_milestone": -1
|
||||
},
|
||||
{
|
||||
@@ -98,7 +94,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js
|
||||
diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json
|
||||
--- a/gpu/config/gpu_driver_bug_list.json
|
||||
+++ b/gpu/config/gpu_driver_bug_list.json
|
||||
@@ -3199,6 +3199,22 @@
|
||||
@@ -3191,6 +3191,22 @@
|
||||
"dont_delete_source_texture_for_egl_image"
|
||||
]
|
||||
},
|
||||
@@ -124,25 +120,25 @@ diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_lis
|
||||
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
|
||||
--- a/gpu/config/gpu_finch_features.cc
|
||||
+++ b/gpu/config/gpu_finch_features.cc
|
||||
@@ -52,6 +52,11 @@ bool IsDeviceBlocked(const char* field, const std::string& block_list) {
|
||||
|
||||
@@ -51,6 +51,11 @@ bool IsDeviceBlocked(const char* field, const std::string& block_list) {
|
||||
} // namespace
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
+
|
||||
+// Use android AImageReader when playing videos with MediaPlayer.
|
||||
+const base::Feature kAImageReaderMediaPlayer{"AImageReaderMediaPlayer",
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// Used to limit GL version to 2.0 for skia raster on Android.
|
||||
const base::Feature kUseGles2ForOopR{"UseGles2ForOopR",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
|
||||
--- a/gpu/config/gpu_finch_features.h
|
||||
+++ b/gpu/config/gpu_finch_features.h
|
||||
@@ -17,6 +17,7 @@ namespace features {
|
||||
// All features in alphabetical order. The features should be documented
|
||||
// alongside the definition of their values in the .cc file.
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#if defined(OS_ANDROID)
|
||||
+GPU_EXPORT extern const base::Feature kAImageReaderMediaPlayer;
|
||||
GPU_EXPORT extern const base::Feature kUseGles2ForOopR;
|
||||
GPU_EXPORT extern const base::Feature kAndroidSurfaceControl;
|
||||
@@ -150,8 +146,8 @@ diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
|
||||
diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
|
||||
--- a/gpu/config/gpu_util.cc
|
||||
+++ b/gpu/config/gpu_util.cc
|
||||
@@ -120,6 +120,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus(
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
@@ -114,6 +114,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus(
|
||||
#if !defined(OS_ANDROID)
|
||||
return kGpuFeatureStatusDisabled;
|
||||
#else
|
||||
+ if (blocklisted_features.count(GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL))
|
||||
@@ -160,8 +156,8 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
|
||||
if (!gpu_preferences.enable_android_surface_control)
|
||||
return kGpuFeatureStatusDisabled;
|
||||
|
||||
@@ -343,6 +346,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
|
||||
gpu_feature_info->status_values[GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION] =
|
||||
@@ -319,6 +322,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
|
||||
gpu_feature_info->status_values[GPU_FEATURE_TYPE_ACCELERATED_WEBGL2] =
|
||||
kGpuFeatureStatusBlocklisted;
|
||||
}
|
||||
+
|
||||
@@ -175,20 +171,20 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
|
||||
diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list.txt
|
||||
--- a/gpu/config/gpu_workaround_list.txt
|
||||
+++ b/gpu/config/gpu_workaround_list.txt
|
||||
@@ -14,6 +14,7 @@ decode_encode_srgb_for_generatemipmap
|
||||
@@ -13,6 +13,7 @@ decode_encode_srgb_for_generatemipmap
|
||||
depth_stencil_renderbuffer_resize_emulation
|
||||
disable_2d_canvas_auto_flush
|
||||
disable_accelerated_av1_decode
|
||||
+disable_aimagereader
|
||||
disable_accelerated_av1_decode_d3d11
|
||||
disable_accelerated_h264_encode
|
||||
disable_accelerated_hevc_decode
|
||||
disable_accelerated_vp8_decode
|
||||
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
|
||||
--- a/gpu/ipc/service/gpu_init.cc
|
||||
+++ b/gpu/ipc/service/gpu_init.cc
|
||||
@@ -580,6 +580,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
|
||||
@@ -517,6 +517,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
|
||||
}
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
+ // Disable AImageReader if the workaround is enabled.
|
||||
+ if (gpu_feature_info_.IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
|
||||
@@ -209,7 +205,7 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_
|
||||
#include "base/android/scoped_hardware_buffer_fence_sync.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/feature_list.h"
|
||||
@@ -51,7 +52,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> MakeCurrent(
|
||||
@@ -50,7 +51,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> MakeCurrent(
|
||||
}
|
||||
|
||||
TextureOwner::Mode GetTextureOwnerMode() {
|
||||
@@ -229,7 +225,7 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_
|
||||
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
||||
--- a/media/base/media_switches.cc
|
||||
+++ b/media/base/media_switches.cc
|
||||
@@ -711,6 +711,10 @@ const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
|
||||
@@ -668,6 +668,10 @@ const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
|
||||
// Note: Has no effect if kMediaDrmPreprovisioning feature is disabled.
|
||||
const base::Feature kMediaDrmPreprovisioningAtStartup{
|
||||
"MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
@@ -243,7 +239,7 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
||||
diff --git a/media/base/media_switches.h b/media/base/media_switches.h
|
||||
--- a/media/base/media_switches.h
|
||||
+++ b/media/base/media_switches.h
|
||||
@@ -223,6 +223,7 @@ MEDIA_EXPORT extern const base::Feature kForceHardwareAudioDecoders;
|
||||
@@ -219,6 +219,7 @@ MEDIA_EXPORT extern const base::Feature kForceHardwareAudioDecoders;
|
||||
MEDIA_EXPORT extern const base::Feature kAllowNonSecureOverlays;
|
||||
MEDIA_EXPORT extern const base::Feature kMediaControlsExpandGesture;
|
||||
MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;
|
||||
@@ -251,5 +247,6 @@ diff --git a/media/base/media_switches.h b/media/base/media_switches.h
|
||||
MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioning;
|
||||
MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioningAtStartup;
|
||||
MEDIA_EXPORT extern const base::Feature kCanPlayHls;
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -7,21 +7,13 @@ This patch ignores boolean settings for them and prevents the crash.
|
||||
|
||||
See also: https://github.com/bromite/bromite/issues/1184
|
||||
---
|
||||
.../BundleToPersistableBundleConverter.java | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
.../internal/BundleToPersistableBundleConverter.java | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java b/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
|
||||
--- a/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
|
||||
+++ b/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BundleToPersistableBundleConverter.java
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
package org.chromium.components.background_task_scheduler.internal;
|
||||
|
||||
+import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.PersistableBundle;
|
||||
|
||||
@@ -82,9 +83,17 @@ class BundleToPersistableBundleConverter {
|
||||
@@ -85,9 +85,17 @@ class BundleToPersistableBundleConverter {
|
||||
if (obj == null) {
|
||||
persistableBundle.putString(key, null);
|
||||
} else if (obj instanceof Boolean) {
|
||||
@@ -41,5 +33,6 @@ diff --git a/components/background_task_scheduler/internal/android/java/src/org/
|
||||
} else if (obj instanceof Double) {
|
||||
persistableBundle.putDouble(key, (Double) obj);
|
||||
} else if (obj instanceof double[]) {
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -24,39 +24,39 @@ Report AV1 as playable on Android
|
||||
diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
|
||||
--- a/third_party/libaom/BUILD.gn
|
||||
+++ b/third_party/libaom/BUILD.gn
|
||||
@@ -81,7 +81,7 @@ if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) {
|
||||
sources += aom_dsp_encoder_asm_sse2_x86_64
|
||||
sources += aom_dsp_encoder_asm_ssse3_x86_64
|
||||
@@ -82,7 +82,7 @@ if (enable_libaom) {
|
||||
sources += aom_dsp_encoder_asm_sse2_x86_64
|
||||
sources += aom_dsp_encoder_asm_ssse3_x86_64
|
||||
}
|
||||
- defines = [ "CHROMIUM" ]
|
||||
+ defines = [ "CHROMIUM", "PIC" ]
|
||||
include_dirs = libaom_include_dirs
|
||||
}
|
||||
- defines = [ "CHROMIUM" ]
|
||||
+ defines = [ "CHROMIUM", "PIC" ]
|
||||
include_dirs = libaom_include_dirs
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
if (current_cpu == "arm") {
|
||||
configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
|
||||
- cflags = [ "-mfpu=neon" ]
|
||||
+ cflags = [ "-mfpu=neon", "-fPIC" ]
|
||||
@@ -193,7 +193,7 @@ if (enable_libaom) {
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
if (current_cpu == "arm") {
|
||||
configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
|
||||
- cflags = [ "-mfpu=neon" ]
|
||||
+ cflags = [ "-mfpu=neon", "-fPIC" ]
|
||||
}
|
||||
configs += [ ":libaom_config" ]
|
||||
|
||||
@@ -256,6 +256,8 @@ if (enable_libaom) {
|
||||
if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
|
||||
cpu_arch_full == "arm-neon-cpu-detect") {
|
||||
deps += [ ":libaom_intrinsics_neon" ]
|
||||
+ # will detect CPU
|
||||
+ sources += aom_ports_arm_sources
|
||||
}
|
||||
configs += [ ":libaom_config" ]
|
||||
|
||||
@@ -255,6 +255,8 @@ static_library("libaom") {
|
||||
if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
|
||||
cpu_arch_full == "arm-neon-cpu-detect") {
|
||||
deps += [ ":libaom_intrinsics_neon" ]
|
||||
+ # will detect CPU
|
||||
+ sources += aom_ports_arm_sources
|
||||
}
|
||||
if (is_android) {
|
||||
deps += [ "//third_party/android_ndk:cpu_features" ]
|
||||
if (is_android) {
|
||||
deps += [ "//third_party/android_ndk:cpu_features" ]
|
||||
diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs.gni
|
||||
--- a/third_party/libaom/libaom_srcs.gni
|
||||
+++ b/third_party/libaom/libaom_srcs.gni
|
||||
@@ -652,6 +652,11 @@ aom_rc_interface_sources = [
|
||||
"//third_party/libaom/source/libaom/test/yuv_video_source.h",
|
||||
]
|
||||
@@ -634,6 +634,11 @@ aom_mem_sources = [
|
||||
|
||||
aom_ports_asm_x86 = [ "//third_party/libaom/source/libaom/aom_ports/float.asm" ]
|
||||
|
||||
+aom_ports_arm_sources = [
|
||||
+ "//third_party/libaom/source/libaom/aom_ports/arm_cpudetect.c",
|
||||
@@ -69,146 +69,147 @@ diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs
|
||||
diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
|
||||
--- a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
|
||||
+++ b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
|
||||
@@ -50,7 +50,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
@@ -48,7 +48,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_OPTICAL_FLOW_API equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
CONFIG_PARTITION_SEARCH_ORDER equ 0
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RATECTRL_LOG equ 0
|
||||
CONFIG_RD_COMMAND equ 0
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 1
|
||||
diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
|
||||
--- a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
|
||||
+++ b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
|
||||
@@ -52,7 +52,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
#define CONFIG_OPTICAL_FLOW_API 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
#define CONFIG_PARTITION_SEARCH_ORDER 0
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RATECTRL_LOG 0
|
||||
#define CONFIG_RD_COMMAND 0
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 1
|
||||
diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
|
||||
--- a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
|
||||
+++ b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
|
||||
@@ -50,7 +50,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
@@ -48,7 +48,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_OPTICAL_FLOW_API equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
CONFIG_PARTITION_SEARCH_ORDER equ 0
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RATECTRL_LOG equ 0
|
||||
CONFIG_RD_COMMAND equ 0
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 1
|
||||
diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
|
||||
--- a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
|
||||
+++ b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
|
||||
@@ -52,7 +52,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
#define CONFIG_OPTICAL_FLOW_API 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
#define CONFIG_PARTITION_SEARCH_ORDER 0
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RATECTRL_LOG 0
|
||||
#define CONFIG_RD_COMMAND 0
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 1
|
||||
diff --git a/third_party/libaom/source/config/linux/arm/config/aom_config.asm b/third_party/libaom/source/config/linux/arm/config/aom_config.asm
|
||||
--- a/third_party/libaom/source/config/linux/arm/config/aom_config.asm
|
||||
+++ b/third_party/libaom/source/config/linux/arm/config/aom_config.asm
|
||||
@@ -50,7 +50,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
@@ -48,7 +48,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_OPTICAL_FLOW_API equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
CONFIG_PARTITION_SEARCH_ORDER equ 0
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RATECTRL_LOG equ 0
|
||||
CONFIG_RD_COMMAND equ 0
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 1
|
||||
diff --git a/third_party/libaom/source/config/linux/arm/config/aom_config.h b/third_party/libaom/source/config/linux/arm/config/aom_config.h
|
||||
--- a/third_party/libaom/source/config/linux/arm/config/aom_config.h
|
||||
+++ b/third_party/libaom/source/config/linux/arm/config/aom_config.h
|
||||
@@ -52,7 +52,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
#define CONFIG_OPTICAL_FLOW_API 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
#define CONFIG_PARTITION_SEARCH_ORDER 0
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RATECTRL_LOG 0
|
||||
#define CONFIG_RD_COMMAND 0
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 1
|
||||
diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_config.asm b/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
|
||||
--- a/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
|
||||
+++ b/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
|
||||
@@ -50,7 +50,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
@@ -48,7 +48,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_OPTICAL_FLOW_API equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
CONFIG_PARTITION_SEARCH_ORDER equ 0
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RATECTRL_LOG equ 0
|
||||
CONFIG_RD_COMMAND equ 0
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 1
|
||||
diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_config.h b/third_party/libaom/source/config/linux/arm64/config/aom_config.h
|
||||
--- a/third_party/libaom/source/config/linux/arm64/config/aom_config.h
|
||||
+++ b/third_party/libaom/source/config/linux/arm64/config/aom_config.h
|
||||
@@ -52,7 +52,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
#define CONFIG_OPTICAL_FLOW_API 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
#define CONFIG_PARTITION_SEARCH_ORDER 0
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RATECTRL_LOG 0
|
||||
#define CONFIG_RD_COMMAND 0
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 1
|
||||
diff --git a/third_party/libaom/source/config/linux/generic/config/aom_config.asm b/third_party/libaom/source/config/linux/generic/config/aom_config.asm
|
||||
--- a/third_party/libaom/source/config/linux/generic/config/aom_config.asm
|
||||
+++ b/third_party/libaom/source/config/linux/generic/config/aom_config.asm
|
||||
@@ -50,7 +50,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
@@ -48,7 +48,7 @@ CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_OPTICAL_FLOW_API equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
CONFIG_PARTITION_SEARCH_ORDER equ 0
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RATECTRL_LOG equ 0
|
||||
CONFIG_RD_COMMAND equ 0
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 1
|
||||
diff --git a/third_party/libaom/source/config/linux/generic/config/aom_config.h b/third_party/libaom/source/config/linux/generic/config/aom_config.h
|
||||
--- a/third_party/libaom/source/config/linux/generic/config/aom_config.h
|
||||
+++ b/third_party/libaom/source/config/linux/generic/config/aom_config.h
|
||||
@@ -52,7 +52,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
#define CONFIG_OPTICAL_FLOW_API 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
#define CONFIG_PARTITION_SEARCH_ORDER 0
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RATECTRL_LOG 0
|
||||
#define CONFIG_RD_COMMAND 0
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 1
|
||||
diff --git a/third_party/libaom/source/config/linux/x64/config/aom_config.asm b/third_party/libaom/source/config/linux/x64/config/aom_config.asm
|
||||
--- a/third_party/libaom/source/config/linux/x64/config/aom_config.asm
|
||||
+++ b/third_party/libaom/source/config/linux/x64/config/aom_config.asm
|
||||
@@ -40,7 +40,7 @@
|
||||
@@ -38,7 +38,7 @@
|
||||
%define CONFIG_OPTICAL_FLOW_API 0
|
||||
%define CONFIG_OS_SUPPORT 1
|
||||
%define CONFIG_PARTITION_SEARCH_ORDER 0
|
||||
-%define CONFIG_PIC 0
|
||||
+%define CONFIG_PIC 1
|
||||
%define CONFIG_RATECTRL_LOG 0
|
||||
%define CONFIG_RD_COMMAND 0
|
||||
%define CONFIG_RD_DEBUG 0
|
||||
%define CONFIG_REALTIME_ONLY 1
|
||||
diff --git a/third_party/libaom/source/config/linux/x64/config/aom_config.h b/third_party/libaom/source/config/linux/x64/config/aom_config.h
|
||||
--- a/third_party/libaom/source/config/linux/x64/config/aom_config.h
|
||||
+++ b/third_party/libaom/source/config/linux/x64/config/aom_config.h
|
||||
@@ -52,7 +52,7 @@
|
||||
@@ -50,7 +50,7 @@
|
||||
#define CONFIG_OPTICAL_FLOW_API 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
#define CONFIG_PARTITION_SEARCH_ORDER 0
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RATECTRL_LOG 0
|
||||
#define CONFIG_RD_COMMAND 0
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
--
|
||||
2.25.1
|
||||
#define CONFIG_REALTIME_ONLY 1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -3,22 +3,22 @@ Date: Mon, 26 Apr 2021 13:28:24 +0000
|
||||
Subject: Add AllowUserCertificates flag
|
||||
|
||||
---
|
||||
.../src/org/chromium/chrome/browser/app/ChromeActivity.java | 3 +++
|
||||
.../chrome/browser/app/flags/ChromeCachedFlags.java | 1 +
|
||||
chrome/browser/about_flags.cc | 6 +++++-
|
||||
chrome/browser/flag_descriptions.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
chrome/browser/flags/android/chrome_feature_list.cc | 4 ++++
|
||||
chrome/browser/flags/android/chrome_feature_list.h | 1 +
|
||||
.../chromium/chrome/browser/flags/CachedFeatureFlags.java | 1 +
|
||||
.../chromium/chrome/browser/flags/ChromeFeatureList.java | 1 +
|
||||
net/android/java/src/org/chromium/net/X509Util.java | 5 +++++
|
||||
10 files changed, 29 insertions(+), 1 deletion(-)
|
||||
.../src/org/chromium/chrome/browser/app/ChromeActivity.java | 3 +++
|
||||
.../chromium/chrome/browser/app/flags/ChromeCachedFlags.java | 1 +
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
chrome/browser/flags/android/chrome_feature_list.cc | 4 ++++
|
||||
chrome/browser/flags/android/chrome_feature_list.h | 1 +
|
||||
.../chromium/chrome/browser/flags/CachedFeatureFlags.java | 1 +
|
||||
.../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 1 +
|
||||
net/android/java/src/org/chromium/net/X509Util.java | 5 +++++
|
||||
10 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
@@ -231,6 +231,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
|
||||
@@ -223,6 +223,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
|
||||
import org.chromium.content_public.browser.SelectionPopupController;
|
||||
import org.chromium.content_public.browser.WebContents;
|
||||
import org.chromium.content_public.common.ContentSwitches;
|
||||
@@ -26,7 +26,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
|
||||
import org.chromium.printing.PrintManagerDelegateImpl;
|
||||
import org.chromium.printing.PrintingController;
|
||||
import org.chromium.printing.PrintingControllerImpl;
|
||||
@@ -994,6 +995,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
@@ -976,6 +977,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
UpdateMenuItemHelper.getInstance().onStart();
|
||||
ChromeActivitySessionTracker.getInstance().onStartWithNative();
|
||||
ChromeCachedFlags.getInstance().cacheNativeFlags();
|
||||
@@ -38,9 +38,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java b/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
|
||||
@@ -94,6 +94,7 @@ public class ChromeCachedFlags {
|
||||
.GIVE_JAVA_UI_THREAD_DEFAULT_TASK_TRAITS_USER_BLOCKING_PRIORITY);
|
||||
add(ChromeFeatureList.GRID_TAB_SWITCHER_FOR_TABLETS);
|
||||
@@ -88,6 +88,7 @@ public class ChromeCachedFlags {
|
||||
add(ChromeFeatureList.EARLY_LIBRARY_LOAD);
|
||||
add(ChromeFeatureList.ELASTIC_OVERSCROLL);
|
||||
add(ChromeFeatureList.IMMERSIVE_UI_MODE);
|
||||
+ add(ChromeFeatureList.ALLOW_USER_CERTIFICATES);
|
||||
add(ChromeFeatureList.INSTANT_START);
|
||||
@@ -49,23 +49,21 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/Chrom
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -3220,7 +3220,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-container-queries", flag_descriptions::kCSSContainerQueriesName,
|
||||
@@ -2781,6 +2781,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kCSSContainerQueriesDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(blink::features::kCSSContainerQueries)},
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
+#if BUILDFLAG(IS_ANDROID) // Bromite allow user certificates
|
||||
#if defined(OS_ANDROID)
|
||||
+ {"allow-user-certificates",
|
||||
+ flag_descriptions::kAllowUserCertificatesName,
|
||||
+ flag_descriptions::kAllowUserCertificatesDescription, kOsAndroid,
|
||||
+ FEATURE_VALUE_TYPE(chrome::android::kAllowUserCertificates)},
|
||||
{"explore-sites", flag_descriptions::kExploreSitesName,
|
||||
flag_descriptions::kExploreSitesDescription, kOsAndroid,
|
||||
FEATURE_WITH_PARAMS_VALUE_TYPE(chrome::android::kExploreSites,
|
||||
{"contextual-search-debug", flag_descriptions::kContextualSearchDebugName,
|
||||
flag_descriptions::kContextualSearchDebugDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(chrome::android::kContextualSearchDebug)},
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -13,6 +13,11 @@
|
||||
@@ -11,6 +11,11 @@
|
||||
|
||||
namespace flag_descriptions {
|
||||
|
||||
@@ -80,7 +78,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -38,6 +38,9 @@ namespace flag_descriptions {
|
||||
@@ -46,6 +46,9 @@ namespace flag_descriptions {
|
||||
|
||||
// Cross-platform -------------------------------------------------------------
|
||||
|
||||
@@ -93,15 +91,15 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -144,6 +144,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&feed::kFeedLoadingPlaceholder,
|
||||
@@ -139,6 +139,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&feed::kFeedInteractiveRefresh,
|
||||
&feed::kInterestFeedContentSuggestions,
|
||||
&feed::kInterestFeedSpinnerAlwaysAnimate,
|
||||
+ &kAllowUserCertificates,
|
||||
&feed::kInterestFeedV1ClicksAndViewsConditionalUpload,
|
||||
&feed::kInterestFeedV2,
|
||||
&feed::kInterestFeedV2Autoplay,
|
||||
@@ -399,6 +400,9 @@ const base::Feature kAdaptiveButtonInTopToolbarCustomizationV2{
|
||||
@@ -373,6 +374,9 @@ const base::Feature kAdaptiveButtonInTopToolbarCustomizationV2{
|
||||
"AdaptiveButtonInTopToolbarCustomizationV2",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
@@ -125,29 +123,29 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser
|
||||
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
@@ -51,6 +51,7 @@ public class CachedFeatureFlags {
|
||||
.put(ChromeFeatureList.ANONYMOUS_UPDATE_CHECKS, true)
|
||||
@@ -48,6 +48,7 @@ public class CachedFeatureFlags {
|
||||
*/
|
||||
private static Map<String, Boolean> sDefaults =
|
||||
ImmutableMap.<String, Boolean>builder()
|
||||
+ .put(ChromeFeatureList.ALLOW_USER_CERTIFICATES, false)
|
||||
.put(ChromeFeatureList.ANDROID_PARTNER_CUSTOMIZATION_PHENOTYPE, true)
|
||||
.put(ChromeFeatureList.BOOKMARK_BOTTOM_SHEET, false)
|
||||
.put(ChromeFeatureList.CONDITIONAL_TAB_STRIP_ANDROID, false)
|
||||
+ .put(ChromeFeatureList.ALLOW_USER_CERTIFICATES, false)
|
||||
.put(ChromeFeatureList.LENS_CAMERA_ASSISTED_SEARCH, false)
|
||||
.put(ChromeFeatureList.SERVICE_MANAGER_FOR_DOWNLOAD, true)
|
||||
.put(ChromeFeatureList.SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH, true)
|
||||
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
@@ -193,6 +193,7 @@ public abstract class ChromeFeatureList {
|
||||
@@ -211,6 +211,7 @@ public abstract class ChromeFeatureList {
|
||||
}
|
||||
|
||||
/* Alphabetical: */
|
||||
+ public static final String ALLOW_USER_CERTIFICATES = "AllowUserCertificates";
|
||||
public static final String ABOUT_THIS_SITE_BANNER = "AboutThisSiteBanner";
|
||||
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR = "AdaptiveButtonInTopToolbar";
|
||||
public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_CUSTOMIZATION_V2 =
|
||||
"AdaptiveButtonInTopToolbarCustomizationV2";
|
||||
diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/java/src/org/chromium/net/X509Util.java
|
||||
--- a/net/android/java/src/org/chromium/net/X509Util.java
|
||||
+++ b/net/android/java/src/org/chromium/net/X509Util.java
|
||||
@@ -437,6 +437,8 @@ public class X509Util {
|
||||
@@ -488,6 +488,8 @@ public class X509Util {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -156,7 +154,7 @@ diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/j
|
||||
public static AndroidCertVerifyResult verifyServerCertificates(byte[][] certChain,
|
||||
String authType,
|
||||
String host)
|
||||
@@ -517,6 +519,9 @@ public class X509Util {
|
||||
@@ -568,6 +570,9 @@ public class X509Util {
|
||||
isIssuedByKnownRoot = isKnownRoot(root);
|
||||
}
|
||||
|
||||
@@ -166,5 +164,6 @@ diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/j
|
||||
return new AndroidCertVerifyResult(CertVerifyStatusAndroid.OK,
|
||||
isIssuedByKnownRoot, verifiedChain);
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: Add Alt+D hotkey to focus address bar
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java
|
||||
@@ -155,6 +155,8 @@ public class KeyboardShortcuts {
|
||||
@@ -156,6 +156,8 @@ public class KeyboardShortcuts {
|
||||
KeyEvent.KEYCODE_F, KeyEvent.META_CTRL_ON);
|
||||
addShortcut(context, chromeFeatureShortcutGroup, R.string.keyboard_shortcut_address_bar,
|
||||
KeyEvent.KEYCODE_L, KeyEvent.META_CTRL_ON);
|
||||
@@ -18,5 +18,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcu
|
||||
shortcutGroups.add(chromeFeatureShortcutGroup);
|
||||
|
||||
KeyboardShortcutGroup webpageShortcutGroup = new KeyboardShortcutGroup(
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ disable from all its searches RLZ and field experiments querystring parameters.
|
||||
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
|
||||
--- a/components/search_engines/prepopulated_engines.json
|
||||
+++ b/components/search_engines/prepopulated_engines.json
|
||||
@@ -134,6 +134,27 @@
|
||||
@@ -133,6 +133,27 @@
|
||||
"id": 1
|
||||
},
|
||||
|
||||
@@ -21,8 +21,8 @@ diff --git a/components/search_engines/prepopulated_engines.json b/components/se
|
||||
+ "name": "Google in English",
|
||||
+ "keyword": "googleen",
|
||||
+ "favicon_url": "https://www.google.com/favicon.ico",
|
||||
+ "search_url": "{google:baseURL}search?q={searchTerms}&ie={inputEncoding}&hl=en",
|
||||
+ "suggest_url": "{google:baseSuggestURL}search?client={google:suggestClient}&q={searchTerms}&hl=en",
|
||||
+ "search_url": "{google:baseURL}search?q={searchTerms}&{google:originalQueryForSuggestion}{google:iOSSearchLanguage}{google:searchClient}{google:contextualSearchVersion}ie={inputEncoding}&hl=en",
|
||||
+ "suggest_url": "{google:baseSuggestURL}search?client={google:suggestClient}&gs_ri={google:suggestRid}&xssi=t&q={searchTerms}&{google:inputType}{google:pageClassification}{google:searchVersion}{google:prefetchQuery}sugkey={google:suggestAPIKeyParameter}&hl=en",
|
||||
+ "image_url": "{google:baseURL}searchbyimage/upload?hl=en",
|
||||
+ "new_tab_url": "{google:baseURL}_/chrome/newtab?hl=en&ie={inputEncoding}",
|
||||
+ "contextual_search_url": "{google:baseURL}_/contextualsearch?{google:contextualSearchVersion}{google:contextualSearchContextData}&hl=en",
|
||||
@@ -44,18 +44,18 @@ diff --git a/components/search_engines/prepopulated_engines.json b/components/se
|
||||
diff --git a/components/search_engines/search_engine_type.h b/components/search_engines/search_engine_type.h
|
||||
--- a/components/search_engines/search_engine_type.h
|
||||
+++ b/components/search_engines/search_engine_type.h
|
||||
@@ -75,6 +75,7 @@ enum SearchEngineType {
|
||||
@@ -74,6 +74,7 @@ enum SearchEngineType {
|
||||
SEARCH_ENGINE_OCEANHERO = 57,
|
||||
SEARCH_ENGINE_PRIVACYWALL = 58,
|
||||
SEARCH_ENGINE_ECOSIA = 59,
|
||||
SEARCH_ENGINE_PETALSEARCH = 60,
|
||||
+ SEARCH_ENGINE_GOOGLE_EN = 61,
|
||||
+ SEARCH_ENGINE_GOOGLE_EN,
|
||||
|
||||
SEARCH_ENGINE_MAX // Bounding value needed for UMA histogram macro.
|
||||
};
|
||||
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
|
||||
--- a/components/search_engines/template_url_prepopulate_data.cc
|
||||
+++ b/components/search_engines/template_url_prepopulate_data.cc
|
||||
@@ -28,7 +28,7 @@ namespace {
|
||||
@@ -29,7 +29,7 @@ namespace {
|
||||
|
||||
// Default (for countries with no better engine set)
|
||||
const PrepopulatedEngine* const engines_default[] = {
|
||||
@@ -65,7 +65,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo,
|
||||
};
|
||||
@@ -38,7 +38,7 @@ const PrepopulatedEngine* const engines_default[] = {
|
||||
// clang-format off
|
||||
// Engine selection by country ------------------------------------------------
|
||||
// United Arab Emirates
|
||||
const PrepopulatedEngine* const engines_AE[] = {
|
||||
- &google,
|
||||
@@ -118,7 +118,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -92,7 +92,7 @@ const PrepopulatedEngine* const engines_BA[] = {
|
||||
@@ -91,7 +91,7 @@ const PrepopulatedEngine* const engines_BA[] = {
|
||||
|
||||
// Belgium
|
||||
const PrepopulatedEngine* const engines_BE[] = {
|
||||
@@ -127,7 +127,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ecosia,
|
||||
@@ -101,7 +101,7 @@ const PrepopulatedEngine* const engines_BE[] = {
|
||||
@@ -100,7 +100,7 @@ const PrepopulatedEngine* const engines_BE[] = {
|
||||
|
||||
// Bulgaria
|
||||
const PrepopulatedEngine* const engines_BG[] = {
|
||||
@@ -136,7 +136,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -110,7 +110,7 @@ const PrepopulatedEngine* const engines_BG[] = {
|
||||
@@ -109,7 +109,7 @@ const PrepopulatedEngine* const engines_BG[] = {
|
||||
|
||||
// Bahrain
|
||||
const PrepopulatedEngine* const engines_BH[] = {
|
||||
@@ -145,7 +145,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -119,7 +119,7 @@ const PrepopulatedEngine* const engines_BH[] = {
|
||||
@@ -118,7 +118,7 @@ const PrepopulatedEngine* const engines_BH[] = {
|
||||
|
||||
// Burundi
|
||||
const PrepopulatedEngine* const engines_BI[] = {
|
||||
@@ -154,7 +154,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -128,7 +128,7 @@ const PrepopulatedEngine* const engines_BI[] = {
|
||||
@@ -127,7 +127,7 @@ const PrepopulatedEngine* const engines_BI[] = {
|
||||
|
||||
// Brunei
|
||||
const PrepopulatedEngine* const engines_BN[] = {
|
||||
@@ -163,7 +163,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -137,7 +137,7 @@ const PrepopulatedEngine* const engines_BN[] = {
|
||||
@@ -136,7 +136,7 @@ const PrepopulatedEngine* const engines_BN[] = {
|
||||
|
||||
// Bolivia
|
||||
const PrepopulatedEngine* const engines_BO[] = {
|
||||
@@ -172,7 +172,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -146,7 +146,7 @@ const PrepopulatedEngine* const engines_BO[] = {
|
||||
@@ -145,7 +145,7 @@ const PrepopulatedEngine* const engines_BO[] = {
|
||||
|
||||
// Brazil
|
||||
const PrepopulatedEngine* const engines_BR[] = {
|
||||
@@ -181,7 +181,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_br,
|
||||
&duckduckgo,
|
||||
@@ -155,7 +155,7 @@ const PrepopulatedEngine* const engines_BR[] = {
|
||||
@@ -154,7 +154,7 @@ const PrepopulatedEngine* const engines_BR[] = {
|
||||
|
||||
// Belarus
|
||||
const PrepopulatedEngine* const engines_BY[] = {
|
||||
@@ -190,7 +190,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yandex_by,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
@@ -164,7 +164,7 @@ const PrepopulatedEngine* const engines_BY[] = {
|
||||
@@ -163,7 +163,7 @@ const PrepopulatedEngine* const engines_BY[] = {
|
||||
|
||||
// Belize
|
||||
const PrepopulatedEngine* const engines_BZ[] = {
|
||||
@@ -199,7 +199,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -173,7 +173,7 @@ const PrepopulatedEngine* const engines_BZ[] = {
|
||||
@@ -172,7 +172,7 @@ const PrepopulatedEngine* const engines_BZ[] = {
|
||||
|
||||
// Canada
|
||||
const PrepopulatedEngine* const engines_CA[] = {
|
||||
@@ -208,7 +208,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_ca,
|
||||
&duckduckgo,
|
||||
@@ -182,7 +182,7 @@ const PrepopulatedEngine* const engines_CA[] = {
|
||||
@@ -181,7 +181,7 @@ const PrepopulatedEngine* const engines_CA[] = {
|
||||
|
||||
// Switzerland
|
||||
const PrepopulatedEngine* const engines_CH[] = {
|
||||
@@ -217,21 +217,22 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&ecosia,
|
||||
@@ -191,7 +191,7 @@ const PrepopulatedEngine* const engines_CH[] = {
|
||||
@@ -190,7 +190,7 @@ const PrepopulatedEngine* const engines_CH[] = {
|
||||
|
||||
// Chile
|
||||
const PrepopulatedEngine* const engines_CL[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_cl,
|
||||
&yahoo_es,
|
||||
&duckduckgo,
|
||||
@@ -203,13 +203,13 @@ const PrepopulatedEngine* const engines_CN[] = {
|
||||
&sogou,
|
||||
@@ -201,14 +201,14 @@ const PrepopulatedEngine* const engines_CL[] = {
|
||||
const PrepopulatedEngine* const engines_CN[] = {
|
||||
&baidu,
|
||||
&bing,
|
||||
&sogou,
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&so_360,
|
||||
};
|
||||
|
||||
@@ -240,9 +241,9 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_co,
|
||||
&yahoo_es,
|
||||
&ecosia,
|
||||
@@ -218,7 +218,7 @@ const PrepopulatedEngine* const engines_CO[] = {
|
||||
@@ -217,7 +217,7 @@ const PrepopulatedEngine* const engines_CO[] = {
|
||||
|
||||
// Costa Rica
|
||||
const PrepopulatedEngine* const engines_CR[] = {
|
||||
@@ -251,7 +252,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -227,7 +227,7 @@ const PrepopulatedEngine* const engines_CR[] = {
|
||||
@@ -226,7 +226,7 @@ const PrepopulatedEngine* const engines_CR[] = {
|
||||
|
||||
// Czech Republic
|
||||
const PrepopulatedEngine* const engines_CZ[] = {
|
||||
@@ -260,16 +261,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&seznam_cz,
|
||||
&bing,
|
||||
&yahoo,
|
||||
@@ -236,7 +236,7 @@ const PrepopulatedEngine* const engines_CZ[] = {
|
||||
@@ -235,7 +235,7 @@ const PrepopulatedEngine* const engines_CZ[] = {
|
||||
|
||||
// Germany
|
||||
const PrepopulatedEngine* const engines_DE[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&ecosia,
|
||||
&duckduckgo,
|
||||
@@ -245,7 +245,7 @@ const PrepopulatedEngine* const engines_DE[] = {
|
||||
&ecosia,
|
||||
@@ -244,7 +244,7 @@ const PrepopulatedEngine* const engines_DE[] = {
|
||||
|
||||
// Denmark
|
||||
const PrepopulatedEngine* const engines_DK[] = {
|
||||
@@ -278,7 +279,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_dk,
|
||||
&duckduckgo,
|
||||
@@ -254,7 +254,7 @@ const PrepopulatedEngine* const engines_DK[] = {
|
||||
@@ -253,7 +253,7 @@ const PrepopulatedEngine* const engines_DK[] = {
|
||||
|
||||
// Dominican Republic
|
||||
const PrepopulatedEngine* const engines_DO[] = {
|
||||
@@ -287,16 +288,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -263,7 +263,7 @@ const PrepopulatedEngine* const engines_DO[] = {
|
||||
@@ -262,7 +262,7 @@ const PrepopulatedEngine* const engines_DO[] = {
|
||||
|
||||
// Algeria
|
||||
const PrepopulatedEngine* const engines_DZ[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo_uk,
|
||||
&bing,
|
||||
&yahoo_fr,
|
||||
&yandex_com,
|
||||
@@ -272,7 +272,7 @@ const PrepopulatedEngine* const engines_DZ[] = {
|
||||
&yandex_ru,
|
||||
@@ -271,7 +271,7 @@ const PrepopulatedEngine* const engines_DZ[] = {
|
||||
|
||||
// Ecuador
|
||||
const PrepopulatedEngine* const engines_EC[] = {
|
||||
@@ -304,8 +305,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ecosia,
|
||||
@@ -281,7 +281,7 @@ const PrepopulatedEngine* const engines_EC[] = {
|
||||
&duckduckgo,
|
||||
@@ -280,7 +280,7 @@ const PrepopulatedEngine* const engines_EC[] = {
|
||||
|
||||
// Estonia
|
||||
const PrepopulatedEngine* const engines_EE[] = {
|
||||
@@ -313,17 +314,17 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
&duckduckgo,
|
||||
@@ -290,7 +290,7 @@ const PrepopulatedEngine* const engines_EE[] = {
|
||||
&yahoo,
|
||||
@@ -289,7 +289,7 @@ const PrepopulatedEngine* const engines_EE[] = {
|
||||
|
||||
// Egypt
|
||||
const PrepopulatedEngine* const engines_EG[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_com,
|
||||
@@ -299,7 +299,7 @@ const PrepopulatedEngine* const engines_EG[] = {
|
||||
@@ -298,7 +298,7 @@ const PrepopulatedEngine* const engines_EG[] = {
|
||||
|
||||
// Spain
|
||||
const PrepopulatedEngine* const engines_ES[] = {
|
||||
@@ -332,7 +333,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_es,
|
||||
&duckduckgo,
|
||||
@@ -308,7 +308,7 @@ const PrepopulatedEngine* const engines_ES[] = {
|
||||
@@ -307,7 +307,7 @@ const PrepopulatedEngine* const engines_ES[] = {
|
||||
|
||||
// Finland
|
||||
const PrepopulatedEngine* const engines_FI[] = {
|
||||
@@ -341,7 +342,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_fi,
|
||||
&duckduckgo,
|
||||
@@ -317,7 +317,7 @@ const PrepopulatedEngine* const engines_FI[] = {
|
||||
@@ -316,7 +316,7 @@ const PrepopulatedEngine* const engines_FI[] = {
|
||||
|
||||
// Faroe Islands
|
||||
const PrepopulatedEngine* const engines_FO[] = {
|
||||
@@ -350,7 +351,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_dk,
|
||||
&duckduckgo,
|
||||
@@ -326,7 +326,7 @@ const PrepopulatedEngine* const engines_FO[] = {
|
||||
@@ -325,7 +325,7 @@ const PrepopulatedEngine* const engines_FO[] = {
|
||||
|
||||
// France
|
||||
const PrepopulatedEngine* const engines_FR[] = {
|
||||
@@ -359,7 +360,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_fr,
|
||||
&qwant,
|
||||
@@ -335,7 +335,7 @@ const PrepopulatedEngine* const engines_FR[] = {
|
||||
@@ -334,7 +334,7 @@ const PrepopulatedEngine* const engines_FR[] = {
|
||||
|
||||
// United Kingdom
|
||||
const PrepopulatedEngine* const engines_GB[] = {
|
||||
@@ -368,7 +369,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_uk,
|
||||
&duckduckgo,
|
||||
@@ -344,7 +344,7 @@ const PrepopulatedEngine* const engines_GB[] = {
|
||||
@@ -343,7 +343,7 @@ const PrepopulatedEngine* const engines_GB[] = {
|
||||
|
||||
// Greece
|
||||
const PrepopulatedEngine* const engines_GR[] = {
|
||||
@@ -377,7 +378,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -353,7 +353,7 @@ const PrepopulatedEngine* const engines_GR[] = {
|
||||
@@ -352,7 +352,7 @@ const PrepopulatedEngine* const engines_GR[] = {
|
||||
|
||||
// Guatemala
|
||||
const PrepopulatedEngine* const engines_GT[] = {
|
||||
@@ -386,7 +387,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -362,7 +362,7 @@ const PrepopulatedEngine* const engines_GT[] = {
|
||||
@@ -361,7 +361,7 @@ const PrepopulatedEngine* const engines_GT[] = {
|
||||
|
||||
// Hong Kong
|
||||
const PrepopulatedEngine* const engines_HK[] = {
|
||||
@@ -395,7 +396,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo_hk,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -371,7 +371,7 @@ const PrepopulatedEngine* const engines_HK[] = {
|
||||
@@ -370,7 +370,7 @@ const PrepopulatedEngine* const engines_HK[] = {
|
||||
|
||||
// Honduras
|
||||
const PrepopulatedEngine* const engines_HN[] = {
|
||||
@@ -404,7 +405,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -380,7 +380,7 @@ const PrepopulatedEngine* const engines_HN[] = {
|
||||
@@ -379,7 +379,7 @@ const PrepopulatedEngine* const engines_HN[] = {
|
||||
|
||||
// Croatia
|
||||
const PrepopulatedEngine* const engines_HR[] = {
|
||||
@@ -413,7 +414,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -389,7 +389,7 @@ const PrepopulatedEngine* const engines_HR[] = {
|
||||
@@ -388,7 +388,7 @@ const PrepopulatedEngine* const engines_HR[] = {
|
||||
|
||||
// Hungary
|
||||
const PrepopulatedEngine* const engines_HU[] = {
|
||||
@@ -422,7 +423,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -398,7 +398,7 @@ const PrepopulatedEngine* const engines_HU[] = {
|
||||
@@ -397,7 +397,7 @@ const PrepopulatedEngine* const engines_HU[] = {
|
||||
|
||||
// Indonesia
|
||||
const PrepopulatedEngine* const engines_ID[] = {
|
||||
@@ -430,17 +431,17 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&yahoo_id,
|
||||
&bing,
|
||||
&yandex_com,
|
||||
@@ -407,7 +407,7 @@ const PrepopulatedEngine* const engines_ID[] = {
|
||||
&duckduckgo,
|
||||
@@ -406,7 +406,7 @@ const PrepopulatedEngine* const engines_ID[] = {
|
||||
|
||||
// Ireland
|
||||
const PrepopulatedEngine* const engines_IE[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_uk,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -416,7 +416,7 @@ const PrepopulatedEngine* const engines_IE[] = {
|
||||
@@ -415,7 +415,7 @@ const PrepopulatedEngine* const engines_IE[] = {
|
||||
|
||||
// Israel
|
||||
const PrepopulatedEngine* const engines_IL[] = {
|
||||
@@ -449,7 +450,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
&yahoo,
|
||||
@@ -425,7 +425,7 @@ const PrepopulatedEngine* const engines_IL[] = {
|
||||
@@ -424,7 +424,7 @@ const PrepopulatedEngine* const engines_IL[] = {
|
||||
|
||||
// India
|
||||
const PrepopulatedEngine* const engines_IN[] = {
|
||||
@@ -458,16 +459,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_in,
|
||||
&duckduckgo,
|
||||
@@ -434,7 +434,7 @@ const PrepopulatedEngine* const engines_IN[] = {
|
||||
@@ -433,7 +433,7 @@ const PrepopulatedEngine* const engines_IN[] = {
|
||||
|
||||
// Iraq
|
||||
const PrepopulatedEngine* const engines_IQ[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_tr,
|
||||
@@ -443,7 +443,7 @@ const PrepopulatedEngine* const engines_IQ[] = {
|
||||
&yahoo_uk,
|
||||
&yandex_com,
|
||||
@@ -442,7 +442,7 @@ const PrepopulatedEngine* const engines_IQ[] = {
|
||||
|
||||
// Iran
|
||||
const PrepopulatedEngine* const engines_IR[] = {
|
||||
@@ -476,16 +477,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -452,7 +452,7 @@ const PrepopulatedEngine* const engines_IR[] = {
|
||||
@@ -451,7 +451,7 @@ const PrepopulatedEngine* const engines_IR[] = {
|
||||
|
||||
// Iceland
|
||||
const PrepopulatedEngine* const engines_IS[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo,
|
||||
@@ -461,7 +461,7 @@ const PrepopulatedEngine* const engines_IS[] = {
|
||||
&duckduckgo,
|
||||
@@ -460,7 +460,7 @@ const PrepopulatedEngine* const engines_IS[] = {
|
||||
|
||||
// Italy
|
||||
const PrepopulatedEngine* const engines_IT[] = {
|
||||
@@ -494,7 +495,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -470,7 +470,7 @@ const PrepopulatedEngine* const engines_IT[] = {
|
||||
@@ -469,7 +469,7 @@ const PrepopulatedEngine* const engines_IT[] = {
|
||||
|
||||
// Jamaica
|
||||
const PrepopulatedEngine* const engines_JM[] = {
|
||||
@@ -503,7 +504,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -479,7 +479,7 @@ const PrepopulatedEngine* const engines_JM[] = {
|
||||
@@ -478,7 +478,7 @@ const PrepopulatedEngine* const engines_JM[] = {
|
||||
|
||||
// Jordan
|
||||
const PrepopulatedEngine* const engines_JO[] = {
|
||||
@@ -512,7 +513,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -488,7 +488,7 @@ const PrepopulatedEngine* const engines_JO[] = {
|
||||
@@ -487,7 +487,7 @@ const PrepopulatedEngine* const engines_JO[] = {
|
||||
|
||||
// Japan
|
||||
const PrepopulatedEngine* const engines_JP[] = {
|
||||
@@ -520,8 +521,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&yahoo_jp,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -497,7 +497,7 @@ const PrepopulatedEngine* const engines_JP[] = {
|
||||
&baidu,
|
||||
@@ -496,7 +496,7 @@ const PrepopulatedEngine* const engines_JP[] = {
|
||||
|
||||
// Kenya
|
||||
const PrepopulatedEngine* const engines_KE[] = {
|
||||
@@ -530,16 +531,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -506,7 +506,7 @@ const PrepopulatedEngine* const engines_KE[] = {
|
||||
@@ -505,7 +505,7 @@ const PrepopulatedEngine* const engines_KE[] = {
|
||||
|
||||
// South Korea
|
||||
const PrepopulatedEngine* const engines_KR[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&naver,
|
||||
&daum,
|
||||
&bing,
|
||||
@@ -515,7 +515,7 @@ const PrepopulatedEngine* const engines_KR[] = {
|
||||
&daum,
|
||||
@@ -514,7 +514,7 @@ const PrepopulatedEngine* const engines_KR[] = {
|
||||
|
||||
// Kuwait
|
||||
const PrepopulatedEngine* const engines_KW[] = {
|
||||
@@ -548,7 +549,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -524,7 +524,7 @@ const PrepopulatedEngine* const engines_KW[] = {
|
||||
@@ -523,7 +523,7 @@ const PrepopulatedEngine* const engines_KW[] = {
|
||||
|
||||
// Kazakhstan
|
||||
const PrepopulatedEngine* const engines_KZ[] = {
|
||||
@@ -557,7 +558,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yandex_kz,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
@@ -533,7 +533,7 @@ const PrepopulatedEngine* const engines_KZ[] = {
|
||||
@@ -532,7 +532,7 @@ const PrepopulatedEngine* const engines_KZ[] = {
|
||||
|
||||
// Lebanon
|
||||
const PrepopulatedEngine* const engines_LB[] = {
|
||||
@@ -566,7 +567,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -542,7 +542,7 @@ const PrepopulatedEngine* const engines_LB[] = {
|
||||
@@ -541,7 +541,7 @@ const PrepopulatedEngine* const engines_LB[] = {
|
||||
|
||||
// Liechtenstein
|
||||
const PrepopulatedEngine* const engines_LI[] = {
|
||||
@@ -575,7 +576,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo,
|
||||
@@ -551,7 +551,7 @@ const PrepopulatedEngine* const engines_LI[] = {
|
||||
@@ -550,7 +550,7 @@ const PrepopulatedEngine* const engines_LI[] = {
|
||||
|
||||
// Lithuania
|
||||
const PrepopulatedEngine* const engines_LT[] = {
|
||||
@@ -583,8 +584,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -560,7 +560,7 @@ const PrepopulatedEngine* const engines_LT[] = {
|
||||
&yandex_ru,
|
||||
@@ -559,7 +559,7 @@ const PrepopulatedEngine* const engines_LT[] = {
|
||||
|
||||
// Luxembourg
|
||||
const PrepopulatedEngine* const engines_LU[] = {
|
||||
@@ -593,7 +594,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo,
|
||||
@@ -569,7 +569,7 @@ const PrepopulatedEngine* const engines_LU[] = {
|
||||
@@ -568,7 +568,7 @@ const PrepopulatedEngine* const engines_LU[] = {
|
||||
|
||||
// Latvia
|
||||
const PrepopulatedEngine* const engines_LV[] = {
|
||||
@@ -602,7 +603,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
&yahoo,
|
||||
@@ -578,7 +578,7 @@ const PrepopulatedEngine* const engines_LV[] = {
|
||||
@@ -577,7 +577,7 @@ const PrepopulatedEngine* const engines_LV[] = {
|
||||
|
||||
// Libya
|
||||
const PrepopulatedEngine* const engines_LY[] = {
|
||||
@@ -611,34 +612,34 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_com,
|
||||
@@ -587,7 +587,7 @@ const PrepopulatedEngine* const engines_LY[] = {
|
||||
@@ -586,7 +586,7 @@ const PrepopulatedEngine* const engines_LY[] = {
|
||||
|
||||
// Morocco
|
||||
const PrepopulatedEngine* const engines_MA[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_fr,
|
||||
&bing,
|
||||
&yandex_com,
|
||||
@@ -596,7 +596,7 @@ const PrepopulatedEngine* const engines_MA[] = {
|
||||
@@ -595,7 +595,7 @@ const PrepopulatedEngine* const engines_MA[] = {
|
||||
|
||||
// Monaco
|
||||
const PrepopulatedEngine* const engines_MC[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
&yahoo_fr,
|
||||
@@ -605,7 +605,7 @@ const PrepopulatedEngine* const engines_MC[] = {
|
||||
@@ -604,7 +604,7 @@ const PrepopulatedEngine* const engines_MC[] = {
|
||||
|
||||
// Moldova
|
||||
const PrepopulatedEngine* const engines_MD[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yandex_ru,
|
||||
&bing,
|
||||
&mail_ru,
|
||||
@@ -614,7 +614,7 @@ const PrepopulatedEngine* const engines_MD[] = {
|
||||
&bing,
|
||||
@@ -613,7 +613,7 @@ const PrepopulatedEngine* const engines_MD[] = {
|
||||
|
||||
// Montenegro
|
||||
const PrepopulatedEngine* const engines_ME[] = {
|
||||
@@ -647,7 +648,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -623,7 +623,7 @@ const PrepopulatedEngine* const engines_ME[] = {
|
||||
@@ -622,7 +622,7 @@ const PrepopulatedEngine* const engines_ME[] = {
|
||||
|
||||
// Macedonia
|
||||
const PrepopulatedEngine* const engines_MK[] = {
|
||||
@@ -656,7 +657,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -632,7 +632,7 @@ const PrepopulatedEngine* const engines_MK[] = {
|
||||
@@ -631,7 +631,7 @@ const PrepopulatedEngine* const engines_MK[] = {
|
||||
|
||||
// Mexico
|
||||
const PrepopulatedEngine* const engines_MX[] = {
|
||||
@@ -665,7 +666,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_mx,
|
||||
&duckduckgo,
|
||||
@@ -641,7 +641,7 @@ const PrepopulatedEngine* const engines_MX[] = {
|
||||
@@ -640,7 +640,7 @@ const PrepopulatedEngine* const engines_MX[] = {
|
||||
|
||||
// Malaysia
|
||||
const PrepopulatedEngine* const engines_MY[] = {
|
||||
@@ -674,7 +675,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_my,
|
||||
&duckduckgo,
|
||||
@@ -650,7 +650,7 @@ const PrepopulatedEngine* const engines_MY[] = {
|
||||
@@ -649,7 +649,7 @@ const PrepopulatedEngine* const engines_MY[] = {
|
||||
|
||||
// Nicaragua
|
||||
const PrepopulatedEngine* const engines_NI[] = {
|
||||
@@ -683,16 +684,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -659,7 +659,7 @@ const PrepopulatedEngine* const engines_NI[] = {
|
||||
@@ -658,7 +658,7 @@ const PrepopulatedEngine* const engines_NI[] = {
|
||||
|
||||
// Netherlands
|
||||
const PrepopulatedEngine* const engines_NL[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_nl,
|
||||
&duckduckgo,
|
||||
@@ -668,7 +668,7 @@ const PrepopulatedEngine* const engines_NL[] = {
|
||||
&yahoo_nl,
|
||||
@@ -667,7 +667,7 @@ const PrepopulatedEngine* const engines_NL[] = {
|
||||
|
||||
// Norway
|
||||
const PrepopulatedEngine* const engines_NO[] = {
|
||||
@@ -701,7 +702,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -677,7 +677,7 @@ const PrepopulatedEngine* const engines_NO[] = {
|
||||
@@ -676,7 +676,7 @@ const PrepopulatedEngine* const engines_NO[] = {
|
||||
|
||||
// New Zealand
|
||||
const PrepopulatedEngine* const engines_NZ[] = {
|
||||
@@ -710,7 +711,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_nz,
|
||||
&duckduckgo,
|
||||
@@ -686,7 +686,7 @@ const PrepopulatedEngine* const engines_NZ[] = {
|
||||
@@ -685,7 +685,7 @@ const PrepopulatedEngine* const engines_NZ[] = {
|
||||
|
||||
// Oman
|
||||
const PrepopulatedEngine* const engines_OM[] = {
|
||||
@@ -719,25 +720,25 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -695,7 +695,7 @@ const PrepopulatedEngine* const engines_OM[] = {
|
||||
@@ -694,7 +694,7 @@ const PrepopulatedEngine* const engines_OM[] = {
|
||||
|
||||
// Panama
|
||||
const PrepopulatedEngine* const engines_PA[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_es,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -704,7 +704,7 @@ const PrepopulatedEngine* const engines_PA[] = {
|
||||
@@ -703,7 +703,7 @@ const PrepopulatedEngine* const engines_PA[] = {
|
||||
|
||||
// Peru
|
||||
const PrepopulatedEngine* const engines_PE[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_pe,
|
||||
&yahoo_es,
|
||||
&ecosia,
|
||||
@@ -713,7 +713,7 @@ const PrepopulatedEngine* const engines_PE[] = {
|
||||
@@ -712,7 +712,7 @@ const PrepopulatedEngine* const engines_PE[] = {
|
||||
|
||||
// Philippines
|
||||
const PrepopulatedEngine* const engines_PH[] = {
|
||||
@@ -746,16 +747,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ecosia,
|
||||
@@ -722,7 +722,7 @@ const PrepopulatedEngine* const engines_PH[] = {
|
||||
@@ -721,7 +721,7 @@ const PrepopulatedEngine* const engines_PH[] = {
|
||||
|
||||
// Pakistan
|
||||
const PrepopulatedEngine* const engines_PK[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -731,7 +731,7 @@ const PrepopulatedEngine* const engines_PK[] = {
|
||||
@@ -730,7 +730,7 @@ const PrepopulatedEngine* const engines_PK[] = {
|
||||
|
||||
// Poland
|
||||
const PrepopulatedEngine* const engines_PL[] = {
|
||||
@@ -764,7 +765,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -740,7 +740,7 @@ const PrepopulatedEngine* const engines_PL[] = {
|
||||
@@ -738,7 +738,7 @@ const PrepopulatedEngine* const engines_PL[] = {
|
||||
|
||||
// Puerto Rico
|
||||
const PrepopulatedEngine* const engines_PR[] = {
|
||||
@@ -773,7 +774,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -749,7 +749,7 @@ const PrepopulatedEngine* const engines_PR[] = {
|
||||
@@ -747,7 +747,7 @@ const PrepopulatedEngine* const engines_PR[] = {
|
||||
|
||||
// Portugal
|
||||
const PrepopulatedEngine* const engines_PT[] = {
|
||||
@@ -782,16 +783,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -758,7 +758,7 @@ const PrepopulatedEngine* const engines_PT[] = {
|
||||
@@ -756,7 +756,7 @@ const PrepopulatedEngine* const engines_PT[] = {
|
||||
|
||||
// Paraguay
|
||||
const PrepopulatedEngine* const engines_PY[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_es,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -767,7 +767,7 @@ const PrepopulatedEngine* const engines_PY[] = {
|
||||
@@ -765,7 +765,7 @@ const PrepopulatedEngine* const engines_PY[] = {
|
||||
|
||||
// Qatar
|
||||
const PrepopulatedEngine* const engines_QA[] = {
|
||||
@@ -800,7 +801,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -776,7 +776,7 @@ const PrepopulatedEngine* const engines_QA[] = {
|
||||
@@ -774,7 +774,7 @@ const PrepopulatedEngine* const engines_QA[] = {
|
||||
|
||||
// Romania
|
||||
const PrepopulatedEngine* const engines_RO[] = {
|
||||
@@ -809,7 +810,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -785,7 +785,7 @@ const PrepopulatedEngine* const engines_RO[] = {
|
||||
@@ -783,7 +783,7 @@ const PrepopulatedEngine* const engines_RO[] = {
|
||||
|
||||
// Serbia
|
||||
const PrepopulatedEngine* const engines_RS[] = {
|
||||
@@ -818,7 +819,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -794,7 +794,7 @@ const PrepopulatedEngine* const engines_RS[] = {
|
||||
@@ -792,7 +792,7 @@ const PrepopulatedEngine* const engines_RS[] = {
|
||||
|
||||
// Russia
|
||||
const PrepopulatedEngine* const engines_RU[] = {
|
||||
@@ -827,7 +828,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yandex_ru,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
@@ -803,7 +803,7 @@ const PrepopulatedEngine* const engines_RU[] = {
|
||||
@@ -801,7 +801,7 @@ const PrepopulatedEngine* const engines_RU[] = {
|
||||
|
||||
// Rwanda
|
||||
const PrepopulatedEngine* const engines_RW[] = {
|
||||
@@ -836,7 +837,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -812,7 +812,7 @@ const PrepopulatedEngine* const engines_RW[] = {
|
||||
@@ -810,7 +810,7 @@ const PrepopulatedEngine* const engines_RW[] = {
|
||||
|
||||
// Saudi Arabia
|
||||
const PrepopulatedEngine* const engines_SA[] = {
|
||||
@@ -845,7 +846,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_com,
|
||||
@@ -821,7 +821,7 @@ const PrepopulatedEngine* const engines_SA[] = {
|
||||
@@ -819,7 +819,7 @@ const PrepopulatedEngine* const engines_SA[] = {
|
||||
|
||||
// Sweden
|
||||
const PrepopulatedEngine* const engines_SE[] = {
|
||||
@@ -854,16 +855,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_se,
|
||||
&duckduckgo,
|
||||
@@ -830,7 +830,7 @@ const PrepopulatedEngine* const engines_SE[] = {
|
||||
@@ -828,7 +828,7 @@ const PrepopulatedEngine* const engines_SE[] = {
|
||||
|
||||
// Singapore
|
||||
const PrepopulatedEngine* const engines_SG[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_sg,
|
||||
&duckduckgo,
|
||||
@@ -839,7 +839,7 @@ const PrepopulatedEngine* const engines_SG[] = {
|
||||
&yahoo,
|
||||
&baidu,
|
||||
@@ -837,7 +837,7 @@ const PrepopulatedEngine* const engines_SG[] = {
|
||||
|
||||
// Slovenia
|
||||
const PrepopulatedEngine* const engines_SI[] = {
|
||||
@@ -872,25 +873,25 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo,
|
||||
@@ -848,7 +848,7 @@ const PrepopulatedEngine* const engines_SI[] = {
|
||||
@@ -845,7 +845,7 @@ const PrepopulatedEngine* const engines_SI[] = {
|
||||
|
||||
// Slovakia
|
||||
const PrepopulatedEngine* const engines_SK[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo,
|
||||
@@ -857,7 +857,7 @@ const PrepopulatedEngine* const engines_SK[] = {
|
||||
&duckduckgo,
|
||||
@@ -854,7 +854,7 @@ const PrepopulatedEngine* const engines_SK[] = {
|
||||
|
||||
// El Salvador
|
||||
const PrepopulatedEngine* const engines_SV[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_es,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -866,7 +866,7 @@ const PrepopulatedEngine* const engines_SV[] = {
|
||||
@@ -863,7 +863,7 @@ const PrepopulatedEngine* const engines_SV[] = {
|
||||
|
||||
// Syria
|
||||
const PrepopulatedEngine* const engines_SY[] = {
|
||||
@@ -898,26 +899,26 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_com,
|
||||
@@ -875,7 +875,7 @@ const PrepopulatedEngine* const engines_SY[] = {
|
||||
&yandex_ru,
|
||||
@@ -872,7 +872,7 @@ const PrepopulatedEngine* const engines_SY[] = {
|
||||
|
||||
// Thailand
|
||||
const PrepopulatedEngine* const engines_TH[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_th,
|
||||
&yandex_ru,
|
||||
@@ -884,7 +884,7 @@ const PrepopulatedEngine* const engines_TH[] = {
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -881,7 +881,7 @@ const PrepopulatedEngine* const engines_TH[] = {
|
||||
|
||||
// Tunisia
|
||||
const PrepopulatedEngine* const engines_TN[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_fr,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -893,7 +893,7 @@ const PrepopulatedEngine* const engines_TN[] = {
|
||||
@@ -890,7 +890,7 @@ const PrepopulatedEngine* const engines_TN[] = {
|
||||
|
||||
// Turkey
|
||||
const PrepopulatedEngine* const engines_TR[] = {
|
||||
@@ -926,7 +927,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yandex_tr,
|
||||
&yahoo_tr,
|
||||
&bing,
|
||||
@@ -902,7 +902,7 @@ const PrepopulatedEngine* const engines_TR[] = {
|
||||
@@ -899,7 +899,7 @@ const PrepopulatedEngine* const engines_TR[] = {
|
||||
|
||||
// Trinidad and Tobago
|
||||
const PrepopulatedEngine* const engines_TT[] = {
|
||||
@@ -935,7 +936,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -911,7 +911,7 @@ const PrepopulatedEngine* const engines_TT[] = {
|
||||
@@ -908,7 +908,7 @@ const PrepopulatedEngine* const engines_TT[] = {
|
||||
|
||||
// Taiwan
|
||||
const PrepopulatedEngine* const engines_TW[] = {
|
||||
@@ -944,7 +945,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo_tw,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -920,7 +920,7 @@ const PrepopulatedEngine* const engines_TW[] = {
|
||||
@@ -917,7 +917,7 @@ const PrepopulatedEngine* const engines_TW[] = {
|
||||
|
||||
// Tanzania
|
||||
const PrepopulatedEngine* const engines_TZ[] = {
|
||||
@@ -953,7 +954,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -929,7 +929,7 @@ const PrepopulatedEngine* const engines_TZ[] = {
|
||||
@@ -926,7 +926,7 @@ const PrepopulatedEngine* const engines_TZ[] = {
|
||||
|
||||
// Ukraine
|
||||
const PrepopulatedEngine* const engines_UA[] = {
|
||||
@@ -962,7 +963,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yandex_ua,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -938,7 +938,7 @@ const PrepopulatedEngine* const engines_UA[] = {
|
||||
@@ -935,7 +935,7 @@ const PrepopulatedEngine* const engines_UA[] = {
|
||||
|
||||
// United States
|
||||
const PrepopulatedEngine* const engines_US[] = {
|
||||
@@ -971,34 +972,34 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -947,7 +947,7 @@ const PrepopulatedEngine* const engines_US[] = {
|
||||
@@ -944,7 +944,7 @@ const PrepopulatedEngine* const engines_US[] = {
|
||||
|
||||
// Uruguay
|
||||
const PrepopulatedEngine* const engines_UY[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_es,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -956,7 +956,7 @@ const PrepopulatedEngine* const engines_UY[] = {
|
||||
@@ -953,7 +953,7 @@ const PrepopulatedEngine* const engines_UY[] = {
|
||||
|
||||
// Venezuela
|
||||
const PrepopulatedEngine* const engines_VE[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo_ve,
|
||||
&bing,
|
||||
&yahoo_es,
|
||||
&duckduckgo,
|
||||
@@ -965,7 +965,7 @@ const PrepopulatedEngine* const engines_VE[] = {
|
||||
@@ -962,7 +962,7 @@ const PrepopulatedEngine* const engines_VE[] = {
|
||||
|
||||
// Vietnam
|
||||
const PrepopulatedEngine* const engines_VN[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&coccoc,
|
||||
&yahoo,
|
||||
&bing,
|
||||
@@ -974,7 +974,7 @@ const PrepopulatedEngine* const engines_VN[] = {
|
||||
&yahoo,
|
||||
@@ -971,7 +971,7 @@ const PrepopulatedEngine* const engines_VN[] = {
|
||||
|
||||
// Yemen
|
||||
const PrepopulatedEngine* const engines_YE[] = {
|
||||
@@ -1006,8 +1007,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_com,
|
||||
@@ -983,7 +983,7 @@ const PrepopulatedEngine* const engines_YE[] = {
|
||||
&yandex_ru,
|
||||
@@ -980,7 +980,7 @@ const PrepopulatedEngine* const engines_YE[] = {
|
||||
|
||||
// South Africa
|
||||
const PrepopulatedEngine* const engines_ZA[] = {
|
||||
@@ -1016,7 +1017,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -992,7 +992,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
|
||||
@@ -989,7 +989,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
|
||||
|
||||
// Zimbabwe
|
||||
const PrepopulatedEngine* const engines_ZW[] = {
|
||||
@@ -1025,5 +1026,6 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -3,32 +3,33 @@ Date: Mon, 26 Apr 2021 15:04:11 +0000
|
||||
Subject: Add IsCleartextPermitted flag
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/about_flags.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
net/base/features.cc | 3 +++
|
||||
net/base/features.h | 2 ++
|
||||
net/url_request/url_request_http_job.cc | 4 ++++
|
||||
6 files changed, 20 insertions(+)
|
||||
6 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -8201,6 +8201,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kRequestDesktopSiteExceptionsName,
|
||||
flag_descriptions::kRequestDesktopSiteExceptionsDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(features::kRequestDesktopSiteExceptions)},
|
||||
@@ -7617,6 +7617,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(
|
||||
chrome::android::kBookmarksExportUseSaf)},
|
||||
|
||||
+ {"cleartext-permitted",
|
||||
+ flag_descriptions::kIsCleartextPermittedName,
|
||||
+ flag_descriptions::kIsCleartextPermittedDescription, kOsAndroid,
|
||||
+ FEATURE_VALUE_TYPE(net::features::kIsCleartextPermitted)},
|
||||
#endif
|
||||
|
||||
{"export-bookmarks-use-saf",
|
||||
+
|
||||
// NOTE: Adding a new flag requires adding a corresponding entry to enum
|
||||
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
|
||||
// Histograms" in tools/metrics/histograms/README.md (run the
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -1477,6 +1477,10 @@ const char kHttpsOnlyModeDescription[] =
|
||||
@@ -1407,6 +1407,10 @@ const char kHttpsOnlyModeDescription[] =
|
||||
"Adds a setting under chrome://settings/security to opt-in to HTTPS-First "
|
||||
"Mode.";
|
||||
|
||||
@@ -42,7 +43,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -834,6 +834,9 @@ extern const char kHideShelfControlsInTabletModeDescription[];
|
||||
@@ -814,6 +814,9 @@ extern const char kHostedAppShimCreationDescription[];
|
||||
extern const char kHttpsOnlyModeName[];
|
||||
extern const char kHttpsOnlyModeDescription[];
|
||||
|
||||
@@ -55,8 +56,8 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
||||
diff --git a/net/base/features.cc b/net/base/features.cc
|
||||
--- a/net/base/features.cc
|
||||
+++ b/net/base/features.cc
|
||||
@@ -115,6 +115,9 @@ const base::Feature kEnableTLS13EarlyData{"EnableTLS13EarlyData",
|
||||
const base::Feature kEncryptedClientHello{"EncryptedClientHello",
|
||||
@@ -89,6 +89,9 @@ const base::FeatureParam<int> kUseDnsHttpsSvcbExtraTimePercent{
|
||||
const base::Feature kEnableTLS13EarlyData{"EnableTLS13EarlyData",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
+const base::Feature kIsCleartextPermitted{"IsCleartextPermitted",
|
||||
@@ -69,8 +70,8 @@ diff --git a/net/base/features.h b/net/base/features.h
|
||||
--- a/net/base/features.h
|
||||
+++ b/net/base/features.h
|
||||
@@ -37,6 +37,8 @@ NET_EXPORT extern const base::Feature kCapReferrerToOriginOnCrossOrigin;
|
||||
// Enables the ParsedCookie domain attribute to be the empty string.
|
||||
NET_EXPORT extern const base::Feature kCookieDomainAttributeEmptyString;
|
||||
// Enables TLS 1.3 early data.
|
||||
NET_EXPORT extern const base::Feature kEnableTLS13EarlyData;
|
||||
|
||||
+NET_EXPORT extern const base::Feature kIsCleartextPermitted;
|
||||
+
|
||||
@@ -80,10 +81,10 @@ diff --git a/net/base/features.h b/net/base/features.h
|
||||
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
|
||||
--- a/net/url_request/url_request_http_job.cc
|
||||
+++ b/net/url_request/url_request_http_job.cc
|
||||
@@ -210,6 +210,10 @@ std::unique_ptr<URLRequestJob> URLRequestHttpJob::Create(URLRequest* request) {
|
||||
@@ -214,6 +214,10 @@ std::unique_ptr<URLRequestJob> URLRequestHttpJob::Create(URLRequest* request) {
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#if defined(OS_ANDROID)
|
||||
+ if (base::FeatureList::IsEnabled(net::features::kIsCleartextPermitted) == false) {
|
||||
+ return std::make_unique<URLRequestErrorJob>(request,
|
||||
+ ERR_CLEARTEXT_NOT_PERMITTED);
|
||||
@@ -91,5 +92,6 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque
|
||||
// Check whether the app allows cleartext traffic to this host, and return
|
||||
// ERR_CLEARTEXT_NOT_PERMITTED if not.
|
||||
if (request->context()->check_cleartext_permitted() &&
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 9 May 2020 08:33:15 +0200
|
||||
Subject: Add a flag to allow screenshots in Incognito mode
|
||||
|
||||
See also:
|
||||
* https://github.com/bromite/bromite/issues/551
|
||||
* https://bugs.chromium.org/p/chromium/issues/detail?id=920762
|
||||
---
|
||||
chrome/browser/about_flags.cc | 6 ++++++
|
||||
chrome/browser/flag_descriptions.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
.../flags/android/java_templates/ChromeSwitches.java.tmpl | 4 ----
|
||||
chrome/common/chrome_switches.cc | 3 +++
|
||||
chrome/common/chrome_switches.h | 1 +
|
||||
6 files changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -7518,6 +7518,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
"AndroidDynamicColor")},
|
||||
#endif // defined(OS_ANDROID)
|
||||
|
||||
+#if defined(OS_ANDROID)
|
||||
+ {switches::kEnableIncognitoSnapshotsInAndroidRecents, flag_descriptions::kEnableIncognitoSnapshotsInAndroidRecentsName,
|
||||
+ flag_descriptions::kEnableIncognitoSnapshotsInAndroidRecentsDescription, kOsAndroid,
|
||||
+ SINGLE_VALUE_TYPE(switches::kEnableIncognitoSnapshotsInAndroidRecents)},
|
||||
+#endif
|
||||
+
|
||||
#if defined(OS_WIN)
|
||||
{"win-10-tab-search-caption-button",
|
||||
flag_descriptions::kWin10TabSearchCaptionButtonName,
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -635,6 +635,11 @@ const char kEnableAutofillCreditCardAuthenticationDescription[] =
|
||||
"authenticator (if available) to verify card ownership when retrieving "
|
||||
"credit cards from Google Payments.";
|
||||
|
||||
+const char kEnableIncognitoSnapshotsInAndroidRecentsName[] =
|
||||
+ "Enable Incognito snapshots in Android Recents";
|
||||
+const char kEnableIncognitoSnapshotsInAndroidRecentsDescription[] =
|
||||
+ "Enable the secure flag for Incognito tabs which prevent taking screenshots and seeing snapshots in Android Recents.";
|
||||
+
|
||||
const char
|
||||
kEnableAutofillInfoBarAccountIndicationFooterForSingleAccountUsersName[] =
|
||||
"Display InfoBar footers with account indication information for "
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -404,6 +404,9 @@ extern const char kEnableAutofillSaveCardInfoBarAccountIndicationFooterName[];
|
||||
extern const char
|
||||
kEnableAutofillSaveCardInfoBarAccountIndicationFooterDescription[];
|
||||
|
||||
+extern const char kEnableIncognitoSnapshotsInAndroidRecentsName[];
|
||||
+extern const char kEnableIncognitoSnapshotsInAndroidRecentsDescription[];
|
||||
+
|
||||
extern const char kEnableExperimentalCookieFeaturesName[];
|
||||
extern const char kEnableExperimentalCookieFeaturesDescription[];
|
||||
|
||||
diff --git a/chrome/browser/flags/android/java_templates/ChromeSwitches.java.tmpl b/chrome/browser/flags/android/java_templates/ChromeSwitches.java.tmpl
|
||||
--- a/chrome/browser/flags/android/java_templates/ChromeSwitches.java.tmpl
|
||||
+++ b/chrome/browser/flags/android/java_templates/ChromeSwitches.java.tmpl
|
||||
@@ -129,10 +129,6 @@ public abstract class ChromeSwitches {{
|
||||
/** Switch for enabling the Chrome Survey. Only works when UMA is accepted. */
|
||||
public static final String CHROME_FORCE_ENABLE_SURVEY = "force-enable-chrome-survey";
|
||||
|
||||
- /** Switch to enable incognito tabs to be seen in Android Recents. */
|
||||
- public static final String ENABLE_INCOGNITO_SNAPSHOTS_IN_ANDROID_RECENTS =
|
||||
- "enable-incognito-snapshots-in-android-recents";
|
||||
-
|
||||
/** Open all custom tabs in a new task. Used only for experimental purposes. */
|
||||
public static final String OPEN_CUSTOM_TABS_IN_NEW_TASK = "open-custom-tabs-in-new-task";
|
||||
|
||||
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
|
||||
--- a/chrome/common/chrome_switches.cc
|
||||
+++ b/chrome/common/chrome_switches.cc
|
||||
@@ -344,6 +344,9 @@ const char kHomePage[] = "homepage";
|
||||
// Causes the browser to launch directly in incognito mode.
|
||||
const char kIncognito[] = "incognito";
|
||||
|
||||
+// Allows incognito tabs to be seen in Android Recents and thus user screenshots.
|
||||
+const char kEnableIncognitoSnapshotsInAndroidRecents[] = "enable-incognito-snapshots-in-android-recents";
|
||||
+
|
||||
// Installs an autogenerated theme based on the given RGB value.
|
||||
// The format is "r,g,b", where r, g, b are a numeric values from 0 to 255.
|
||||
const char kInstallAutogeneratedTheme[] = "install-autogenerated-theme";
|
||||
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
|
||||
--- a/chrome/common/chrome_switches.h
|
||||
+++ b/chrome/common/chrome_switches.h
|
||||
@@ -114,6 +114,7 @@ extern const char kForceStackedTabStripLayout[];
|
||||
extern const char kHideCrashRestoreBubble[];
|
||||
extern const char kHomePage[];
|
||||
extern const char kIncognito[];
|
||||
+extern const char kEnableIncognitoSnapshotsInAndroidRecents[];
|
||||
extern const char kInstallAutogeneratedTheme[];
|
||||
extern const char kInstallChromeApp[];
|
||||
extern const char kInstantProcess[];
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -14,7 +14,7 @@ for SimpleURLLoaders as well.
|
||||
.../privacy/settings/PrivacySettings.java | 1 +
|
||||
.../chrome_autocomplete_provider_client.cc | 2 +
|
||||
chrome/browser/browser_resources.grd | 6 +
|
||||
chrome/browser/net/proxy_service_factory.cc | 24 +-
|
||||
chrome/browser/net/proxy_service_factory.cc | 23 +-
|
||||
chrome/browser/net/proxy_service_factory.h | 3 +
|
||||
chrome/browser/prefs/browser_prefs.cc | 4 +
|
||||
.../prefs/chrome_command_line_pref_store.cc | 2 +-
|
||||
@@ -23,17 +23,17 @@ for SimpleURLLoaders as well.
|
||||
chrome/browser/resources/proxy_config.js | 266 +++++++++++
|
||||
chrome/browser/ui/BUILD.gn | 2 +
|
||||
.../webui/chrome_web_ui_controller_factory.cc | 3 +
|
||||
chrome/browser/ui/webui/proxy_config_ui.cc | 418 ++++++++++++++++++
|
||||
chrome/browser/ui/webui/proxy_config_ui.h | 31 ++
|
||||
chrome/browser/ui/webui/proxy_config_ui.cc | 416 ++++++++++++++++++
|
||||
chrome/browser/ui/webui/proxy_config_ui.h | 33 ++
|
||||
chrome/common/webui_url_constants.cc | 4 +
|
||||
chrome/common/webui_url_constants.h | 2 +
|
||||
.../core/browser/proxy_policy_handler.cc | 2 +-
|
||||
.../pref_proxy_config_tracker_impl.cc | 1 +
|
||||
.../proxy_config/proxy_config_dictionary.cc | 30 +-
|
||||
.../proxy_config/proxy_config_dictionary.h | 7 +-
|
||||
.../proxy_config/proxy_policy_handler.cc | 2 +-
|
||||
net/proxy_resolution/proxy_config.cc | 52 ++-
|
||||
net/proxy_resolution/proxy_config.h | 3 +
|
||||
24 files changed, 996 insertions(+), 14 deletions(-)
|
||||
24 files changed, 995 insertions(+), 14 deletions(-)
|
||||
create mode 100644 chrome/browser/resources/proxy_config.css
|
||||
create mode 100644 chrome/browser/resources/proxy_config.html
|
||||
create mode 100644 chrome/browser/resources/proxy_config.js
|
||||
@@ -51,8 +51,8 @@ diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res
|
||||
+ <string name="proxy_url">chrome://proxy</string>
|
||||
+
|
||||
<!-- Download InfoBar animation. -->
|
||||
<integer name="download_infobar_fill_in_delay">1200</integer>
|
||||
<integer name="download_infobar_fill_out_delay">200</integer>
|
||||
<integer name="download_infobar_sweep_up_delay">500</integer>
|
||||
<integer name="download_infobar_sweep_down_delay">800</integer>
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -70,18 +70,18 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -58,6 +58,7 @@ public class PrivacySettings
|
||||
private static final String PREF_DO_NOT_TRACK = "do_not_track";
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
@@ -50,6 +50,7 @@ import org.chromium.ui.text.SpanApplier;
|
||||
public class PrivacySettings
|
||||
extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener,
|
||||
INeedSnackbarManager {
|
||||
+ private static final String PREF_PROXY_OPTIONS = "proxy";
|
||||
private static final String PREF_PRIVACY_REVIEW = "privacy_review";
|
||||
private static final String PREF_INCOGNITO_LOCK = "incognito_lock";
|
||||
private static final String PREF_PHONE_AS_A_SECURITY_KEY = "phone_as_a_security_key";
|
||||
private SnackbarManager mSnackbarManager;
|
||||
private Snackbar mSnackbar;
|
||||
|
||||
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
@@ -275,6 +275,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
|
||||
@@ -365,6 +365,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
|
||||
builtins_to_provide.push_back(
|
||||
base::ASCIIToUTF16(chrome::kChromeUISettingsURL));
|
||||
#endif
|
||||
@@ -93,7 +93,7 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
|
||||
--- a/chrome/browser/browser_resources.grd
|
||||
+++ b/chrome/browser/browser_resources.grd
|
||||
@@ -74,6 +74,12 @@
|
||||
@@ -88,6 +88,12 @@
|
||||
<include name="IDR_HANGOUT_SERVICES_MANIFEST" file="resources\hangout_services\manifest.json" type="BINDATA" />
|
||||
</if>
|
||||
|
||||
@@ -109,15 +109,7 @@ diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resou
|
||||
diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/proxy_service_factory.cc
|
||||
--- a/chrome/browser/net/proxy_service_factory.cc
|
||||
+++ b/chrome/browser/net/proxy_service_factory.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
+#include "base/logging.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
@@ -14,6 +15,9 @@
|
||||
@@ -15,6 +15,9 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "net/proxy_resolution/configured_proxy_resolution_service.h"
|
||||
#include "net/proxy_resolution/proxy_config_service.h"
|
||||
@@ -127,14 +119,14 @@ diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/pr
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#include "chromeos/network/proxy/proxy_config_service_impl.h"
|
||||
@@ -72,7 +76,20 @@ ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
|
||||
@@ -59,7 +62,20 @@ ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
|
||||
return std::make_unique<chromeos::ProxyConfigServiceImpl>(
|
||||
profile_prefs, local_state_prefs, nullptr);
|
||||
#else
|
||||
- return std::make_unique<PrefProxyConfigTrackerImpl>(profile_prefs, nullptr);
|
||||
+ // Migrate from profile_prefs to local_state_prefs
|
||||
+ if (local_state_prefs->GetBoolean("proxy_migrated") == false) {
|
||||
+ const base::Value* dict =
|
||||
+ const base::DictionaryValue* dict =
|
||||
+ profile_prefs->GetDictionary(proxy_config::prefs::kProxy);
|
||||
+
|
||||
+ LOG(INFO) << "CreatePrefProxyConfigTrackerOfProfile: Migration from profile to local state";
|
||||
@@ -149,7 +141,7 @@ diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/pr
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
}
|
||||
|
||||
@@ -88,3 +105,8 @@ ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
|
||||
@@ -75,3 +91,8 @@ ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
|
||||
nullptr);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
}
|
||||
@@ -161,27 +153,27 @@ diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/pr
|
||||
diff --git a/chrome/browser/net/proxy_service_factory.h b/chrome/browser/net/proxy_service_factory.h
|
||||
--- a/chrome/browser/net/proxy_service_factory.h
|
||||
+++ b/chrome/browser/net/proxy_service_factory.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#define CHROME_BROWSER_NET_PROXY_SERVICE_FACTORY_H_
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
+#include "components/prefs/pref_registry_simple.h"
|
||||
|
||||
class PrefProxyConfigTracker;
|
||||
class PrefService;
|
||||
@@ -35,6 +36,8 @@ class ProxyServiceFactory {
|
||||
CreatePrefProxyConfigTrackerOfProfile(PrefService* profile_prefs,
|
||||
PrefService* local_state_prefs);
|
||||
@@ -37,6 +38,8 @@ class ProxyServiceFactory {
|
||||
static std::unique_ptr<PrefProxyConfigTracker>
|
||||
CreatePrefProxyConfigTrackerOfLocalState(PrefService* local_state_prefs);
|
||||
|
||||
+ static void RegisterPrefs(PrefRegistrySimple* registry);
|
||||
+
|
||||
// Creates a PrefProxyConfigTracker that tracks local state only. This tracker
|
||||
// should be used for the system request context and the signin screen
|
||||
// (ChromeOS only).
|
||||
private:
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(ProxyServiceFactory);
|
||||
};
|
||||
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -161,6 +161,8 @@
|
||||
@@ -160,6 +160,8 @@
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "rlz/buildflags/buildflags.h"
|
||||
|
||||
@@ -190,15 +182,15 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
|
||||
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
|
||||
#include "chrome/browser/background/background_mode_manager.h"
|
||||
#endif
|
||||
@@ -994,6 +996,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
chrome::enterprise_util::RegisterLocalStatePrefs(registry);
|
||||
component_updater::RegisterPrefs(registry);
|
||||
embedder_support::OriginTrialPrefs::RegisterPrefs(registry);
|
||||
@@ -914,6 +916,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
|
||||
PluginsResourceService::RegisterPrefs(registry);
|
||||
#endif
|
||||
|
||||
+ ProxyServiceFactory::RegisterPrefs(registry);
|
||||
+
|
||||
enterprise_reporting::RegisterLocalStatePrefs(registry);
|
||||
ExternalProtocolHandler::RegisterPrefs(registry);
|
||||
flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry);
|
||||
#if defined(OS_ANDROID)
|
||||
::android::RegisterPrefs(registry);
|
||||
|
||||
diff --git a/chrome/browser/prefs/chrome_command_line_pref_store.cc b/chrome/browser/prefs/chrome_command_line_pref_store.cc
|
||||
--- a/chrome/browser/prefs/chrome_command_line_pref_store.cc
|
||||
+++ b/chrome/browser/prefs/chrome_command_line_pref_store.cc
|
||||
@@ -635,7 +627,7 @@ new file mode 100644
|
||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -281,6 +281,8 @@ static_library("ui") {
|
||||
@@ -265,6 +265,8 @@ static_library("ui") {
|
||||
"webui/metrics_handler.h",
|
||||
"webui/net_export_ui.cc",
|
||||
"webui/net_export_ui.h",
|
||||
@@ -647,15 +639,15 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
|
||||
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
||||
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
||||
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
|
||||
@@ -56,6 +56,7 @@
|
||||
#include "chrome/browser/ui/webui/ntp_tiles_internals_ui.h"
|
||||
@@ -53,6 +53,7 @@
|
||||
#include "chrome/browser/ui/webui/omnibox/omnibox_ui.h"
|
||||
#include "chrome/browser/ui/webui/policy/policy_ui.h"
|
||||
+#include "chrome/browser/ui/webui/proxy_config_ui.h"
|
||||
#include "chrome/browser/ui/webui/predictors/predictors_ui.h"
|
||||
#include "chrome/browser/ui/webui/profiles/profile_internals_ui.h"
|
||||
#include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals_ui.h"
|
||||
@@ -778,6 +779,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
|
||||
+#include "chrome/browser/ui/webui/proxy_config_ui.h"
|
||||
#include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
|
||||
#include "chrome/browser/ui/webui/signin_internals_ui.h"
|
||||
#include "chrome/browser/ui/webui/sync_internals/sync_internals_ui.h"
|
||||
@@ -619,6 +620,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
|
||||
return &NewWebUI<MemoryInternalsUI>;
|
||||
if (url.host_piece() == chrome::kChromeUINetExportHost)
|
||||
return &NewWebUI<NetExportUI>;
|
||||
@@ -668,7 +660,7 @@ diff --git a/chrome/browser/ui/webui/proxy_config_ui.cc b/chrome/browser/ui/webu
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/ui/webui/proxy_config_ui.cc
|
||||
@@ -0,0 +1,418 @@
|
||||
@@ -0,0 +1,416 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -697,6 +689,7 @@ new file mode 100644
|
||||
+#include "base/bind.h"
|
||||
+#include "base/command_line.h"
|
||||
+#include "base/lazy_instance.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "base/memory/ref_counted.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "base/strings/utf_string_conversions.h"
|
||||
@@ -744,8 +737,6 @@ new file mode 100644
|
||||
+ public base::SupportsWeakPtr<ProxyConfigMessageHandler>,
|
||||
+ public net::ProxyConfigService::Observer {
|
||||
+ public:
|
||||
+ ProxyConfigMessageHandler(const ProxyConfigMessageHandler&) = delete;
|
||||
+ ProxyConfigMessageHandler& operator=(const ProxyConfigMessageHandler&) = delete;
|
||||
+ // Creates a ProxyConfigMessageHandler that handles message exchanges with the Javascript
|
||||
+ // side of the UI and gets proxy settings from the Web UI associated profile to watch for changes.
|
||||
+ // The created ProxyConfigMessageHandler must be destroyed before |profile|.
|
||||
@@ -756,9 +747,9 @@ new file mode 100644
|
||||
+ void RegisterMessages() override;
|
||||
+
|
||||
+ // Messages
|
||||
+ void OnEnableNotifyUIWithState(const base::Value::List& args);
|
||||
+ void OnApply(const base::Value::List& args);
|
||||
+ void OnClear(const base::Value::List& args);
|
||||
+ void OnEnableNotifyUIWithState(const base::ListValue* list);
|
||||
+ void OnApply(const base::ListValue* config);
|
||||
+ void OnClear(const base::ListValue* config);
|
||||
+
|
||||
+ // net::ProxyConfigService::Observer implementation:
|
||||
+ // Calls ProxyConfigView.onProxyConfigChanged JavaScript function in the
|
||||
@@ -780,6 +771,8 @@ new file mode 100644
|
||||
+ void apply(const net::ProxyConfig& config);
|
||||
+
|
||||
+ base::WeakPtrFactory<ProxyConfigMessageHandler> weak_ptr_factory_;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(ProxyConfigMessageHandler);
|
||||
+};
|
||||
+
|
||||
+ProxyConfigMessageHandler::ProxyConfigMessageHandler(Profile *profile)
|
||||
@@ -808,7 +801,7 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ proxy_config_service_ = ProxyServiceFactory::CreateProxyConfigService(
|
||||
+ pref_proxy_config_tracker_.get(), nullptr);
|
||||
+ pref_proxy_config_tracker_.get());
|
||||
+}
|
||||
+
|
||||
+void ProxyConfigMessageHandler::OnProxyConfigChanged(
|
||||
@@ -917,7 +910,7 @@ new file mode 100644
|
||||
+// The proxy configuration UI is not notified of state changes until this function runs.
|
||||
+// After this function, OnProxyConfigChanged() will be called on all proxy state changes.
|
||||
+void ProxyConfigMessageHandler::OnEnableNotifyUIWithState(
|
||||
+ const base::Value::List& list) {
|
||||
+ const base::ListValue* list) {
|
||||
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
+
|
||||
+ if (!is_observing_) {
|
||||
@@ -928,7 +921,7 @@ new file mode 100644
|
||||
+ net::ProxyConfigWithAnnotation config;
|
||||
+ auto availability = proxy_config_service_->GetLatestProxyConfig(&config);
|
||||
+
|
||||
+ const base::Value* dict =
|
||||
+ const base::DictionaryValue* dict =
|
||||
+ pref_service_->GetDictionary(proxy_config::prefs::kProxy);
|
||||
+ ProxyConfigDictionary proxy_dict(dict->Clone());
|
||||
+ ProxyPrefs::ProxyMode mode;
|
||||
@@ -939,24 +932,24 @@ new file mode 100644
|
||||
+ OnProxyConfigChanged(config, availability);
|
||||
+}
|
||||
+
|
||||
+void ProxyConfigMessageHandler::OnClear(const base::Value::List& list) {
|
||||
+void ProxyConfigMessageHandler::OnClear(const base::ListValue* list) {
|
||||
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
+
|
||||
+ const base::Value cfg = ProxyConfigDictionary::CreateSystem();
|
||||
+ pref_service_->Set(proxy_config::prefs::kProxy, cfg);
|
||||
+ pref_service_->CommitPendingWrite();
|
||||
+ OnEnableNotifyUIWithState(list);
|
||||
+ OnEnableNotifyUIWithState(nullptr);
|
||||
+}
|
||||
+
|
||||
+void ProxyConfigMessageHandler::OnApply(const base::Value::List& list) {
|
||||
+void ProxyConfigMessageHandler::OnApply(const base::ListValue* list) {
|
||||
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
+
|
||||
+ if ((list.size() != 1) || !list[0].is_dict()) {
|
||||
+ if ((list->GetList().size() != 1) || !list->GetList()[0].is_dict()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ const base::DictionaryValue* config = nullptr;
|
||||
+ if (!list[0].GetAsDictionary(&config))
|
||||
+ if (!list->GetDictionary(0, &config))
|
||||
+ return;
|
||||
+
|
||||
+ const base::Value *autoDetect = config->FindKeyOfType("auto_detect", base::Value::Type::BOOLEAN);
|
||||
@@ -1026,8 +1019,7 @@ new file mode 100644
|
||||
+ } else if (t == "direct") {
|
||||
+ proxyConfig.proxy_rules().type = net::ProxyConfig::ProxyRules::Type::EMPTY;
|
||||
+ } else if (t == "none") {
|
||||
+ base::Value::List empty;
|
||||
+ OnClear(empty);
|
||||
+ OnClear(nullptr);
|
||||
+ return;
|
||||
+ } else {
|
||||
+ // invalid type
|
||||
@@ -1072,9 +1064,7 @@ new file mode 100644
|
||||
+ pref_service_->Set(proxy_config::prefs::kProxy, cfg);
|
||||
+ }
|
||||
+ pref_service_->CommitPendingWrite();
|
||||
+
|
||||
+ base::Value::List empty;
|
||||
+ OnEnableNotifyUIWithState(empty);
|
||||
+ OnEnableNotifyUIWithState(nullptr);
|
||||
+}
|
||||
+
|
||||
+} // namespace
|
||||
@@ -1091,7 +1081,7 @@ diff --git a/chrome/browser/ui/webui/proxy_config_ui.h b/chrome/browser/ui/webui
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/ui/webui/proxy_config_ui.h
|
||||
@@ -0,0 +1,31 @@
|
||||
@@ -0,0 +1,33 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -1112,21 +1102,23 @@ new file mode 100644
|
||||
+#ifndef CHROME_BROWSER_UI_WEBUI_PROXY_CONFIG_UI_H_
|
||||
+#define CHROME_BROWSER_UI_WEBUI_PROXY_CONFIG_UI_H_
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "content/public/browser/web_ui_controller.h"
|
||||
+
|
||||
+// The WebUI for chrome://proxy/.
|
||||
+class ProxyConfigUI : public content::WebUIController {
|
||||
+ public:
|
||||
+ ProxyConfigUI(const ProxyConfigUI&) = delete;
|
||||
+ ProxyConfigUI& operator=(const ProxyConfigUI&) = delete;
|
||||
+ explicit ProxyConfigUI(content::WebUI* web_ui);
|
||||
+
|
||||
+ private:
|
||||
+ DISALLOW_COPY_AND_ASSIGN(ProxyConfigUI);
|
||||
+};
|
||||
+
|
||||
+#endif // CHROME_BROWSER_UI_WEBUI_PROXY_CONFIG_UI_H_
|
||||
diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc
|
||||
--- a/chrome/common/webui_url_constants.cc
|
||||
+++ b/chrome/common/webui_url_constants.cc
|
||||
@@ -48,6 +48,8 @@ const char kChromeUICertificateViewerHost[] = "view-cert";
|
||||
@@ -34,6 +34,8 @@ const char kChromeUICertificateViewerHost[] = "view-cert";
|
||||
const char kChromeUICertificateViewerURL[] = "chrome://view-cert/";
|
||||
const char kChromeUIChromeSigninHost[] = "chrome-signin";
|
||||
const char kChromeUIChromeSigninURL[] = "chrome://chrome-signin/";
|
||||
@@ -1135,7 +1127,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons
|
||||
const char kChromeUIChromeURLsHost[] = "chrome-urls";
|
||||
const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
|
||||
const char kChromeUIComponentsHost[] = "components";
|
||||
@@ -421,6 +423,7 @@ bool IsSystemWebUIHost(base::StringPiece host) {
|
||||
@@ -346,6 +348,7 @@ bool IsSystemWebUIHost(base::StringPiece host) {
|
||||
kChromeUIMobileSetupHost,
|
||||
kChromeUIMultiDeviceSetupHost,
|
||||
kChromeUINetworkHost,
|
||||
@@ -1143,8 +1135,8 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons
|
||||
kChromeUIOobeHost,
|
||||
kChromeUIOSCreditsHost,
|
||||
kChromeUIOSSettingsHost,
|
||||
@@ -672,6 +675,7 @@ const char* const kChromeHostURLs[] = {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
@@ -568,6 +571,7 @@ const char* const kChromeHostURLs[] = {
|
||||
#if !defined(OS_ANDROID)
|
||||
#if !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
kChromeUIAppLauncherPageHost,
|
||||
+ kChromeUIProxyConfigHost,
|
||||
@@ -1154,7 +1146,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons
|
||||
diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h
|
||||
--- a/chrome/common/webui_url_constants.h
|
||||
+++ b/chrome/common/webui_url_constants.h
|
||||
@@ -132,6 +132,8 @@ extern const char kChromeUIMemoryInternalsHost[];
|
||||
@@ -125,6 +125,8 @@ extern const char kChromeUIMemoryInternalsHost[];
|
||||
extern const char kChromeUINTPTilesInternalsHost[];
|
||||
extern const char kChromeUINaClHost[];
|
||||
extern const char kChromeUINetExportHost[];
|
||||
@@ -1163,10 +1155,22 @@ diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_const
|
||||
extern const char kChromeUINetInternalsHost[];
|
||||
extern const char kChromeUINetInternalsURL[];
|
||||
extern const char kChromeUINewTabHost[];
|
||||
diff --git a/components/policy/core/browser/proxy_policy_handler.cc b/components/policy/core/browser/proxy_policy_handler.cc
|
||||
--- a/components/policy/core/browser/proxy_policy_handler.cc
|
||||
+++ b/components/policy/core/browser/proxy_policy_handler.cc
|
||||
@@ -207,7 +207,7 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
|
||||
ProxyConfigDictionary::CreateFixedServers(
|
||||
server->GetString(), bypass_list && bypass_list->is_string()
|
||||
? bypass_list->GetString()
|
||||
- : std::string()));
|
||||
+ : std::string(), false));
|
||||
}
|
||||
break;
|
||||
}
|
||||
diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/components/proxy_config/pref_proxy_config_tracker_impl.cc
|
||||
--- a/components/proxy_config/pref_proxy_config_tracker_impl.cc
|
||||
+++ b/components/proxy_config/pref_proxy_config_tracker_impl.cc
|
||||
@@ -381,6 +381,7 @@ bool PrefProxyConfigTrackerImpl::PrefConfigToNetConfig(
|
||||
@@ -380,6 +380,7 @@ bool PrefProxyConfigTrackerImpl::PrefConfigToNetConfig(
|
||||
if (proxy_dict.GetBypassList(&proxy_bypass)) {
|
||||
proxy_config.proxy_rules().bypass_rules.ParseFromString(proxy_bypass);
|
||||
}
|
||||
@@ -1177,7 +1181,7 @@ diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.cc b/compone
|
||||
diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/proxy_config/proxy_config_dictionary.cc
|
||||
--- a/components/proxy_config/proxy_config_dictionary.cc
|
||||
+++ b/components/proxy_config/proxy_config_dictionary.cc
|
||||
@@ -30,6 +30,8 @@ const char kProxyPacMandatory[] = "pac_mandatory";
|
||||
@@ -28,6 +28,8 @@ const char kProxyPacMandatory[] = "pac_mandatory";
|
||||
// String containing proxy bypass rules. For a specification of the
|
||||
// expected syntax see net::ProxyBypassRules::ParseFromString().
|
||||
const char kProxyBypassList[] = "bypass_list";
|
||||
@@ -1186,7 +1190,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/pro
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -78,6 +80,14 @@ bool ProxyConfigDictionary::HasBypassList() const {
|
||||
@@ -72,6 +74,14 @@ bool ProxyConfigDictionary::HasBypassList() const {
|
||||
return dict_.FindKey(kProxyBypassList);
|
||||
}
|
||||
|
||||
@@ -1201,7 +1205,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/pro
|
||||
const base::Value& ProxyConfigDictionary::GetDictionary() const {
|
||||
return dict_;
|
||||
}
|
||||
@@ -85,29 +95,30 @@ const base::Value& ProxyConfigDictionary::GetDictionary() const {
|
||||
@@ -79,29 +89,30 @@ const base::Value& ProxyConfigDictionary::GetDictionary() const {
|
||||
// static
|
||||
base::Value ProxyConfigDictionary::CreateDirect() {
|
||||
return CreateDictionary(ProxyPrefs::MODE_DIRECT, std::string(), false,
|
||||
@@ -1237,7 +1241,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/pro
|
||||
} else {
|
||||
return CreateDirect();
|
||||
}
|
||||
@@ -116,7 +127,7 @@ base::Value ProxyConfigDictionary::CreateFixedServers(
|
||||
@@ -110,7 +121,7 @@ base::Value ProxyConfigDictionary::CreateFixedServers(
|
||||
// static
|
||||
base::Value ProxyConfigDictionary::CreateSystem() {
|
||||
return CreateDictionary(ProxyPrefs::MODE_SYSTEM, std::string(), false,
|
||||
@@ -1246,7 +1250,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/pro
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -125,7 +136,8 @@ base::Value ProxyConfigDictionary::CreateDictionary(
|
||||
@@ -119,7 +130,8 @@ base::Value ProxyConfigDictionary::CreateDictionary(
|
||||
const std::string& pac_url,
|
||||
bool pac_mandatory,
|
||||
const std::string& proxy_server,
|
||||
@@ -1256,7 +1260,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/pro
|
||||
base::Value dict(base::Value::Type::DICTIONARY);
|
||||
dict.SetKey(kProxyMode, base::Value(ProxyModeToString(mode)));
|
||||
if (!pac_url.empty()) {
|
||||
@@ -134,8 +146,10 @@ base::Value ProxyConfigDictionary::CreateDictionary(
|
||||
@@ -128,8 +140,10 @@ base::Value ProxyConfigDictionary::CreateDictionary(
|
||||
}
|
||||
if (!proxy_server.empty())
|
||||
dict.SetKey(kProxyServer, base::Value(proxy_server));
|
||||
@@ -1271,7 +1275,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.cc b/components/pro
|
||||
diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/proxy_config/proxy_config_dictionary.h
|
||||
--- a/components/proxy_config/proxy_config_dictionary.h
|
||||
+++ b/components/proxy_config/proxy_config_dictionary.h
|
||||
@@ -42,6 +42,7 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary {
|
||||
@@ -38,6 +38,7 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary {
|
||||
bool GetProxyServer(std::string* out) const;
|
||||
bool GetBypassList(std::string* out) const;
|
||||
bool HasBypassList() const;
|
||||
@@ -1279,7 +1283,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/prox
|
||||
|
||||
const base::Value& GetDictionary() const;
|
||||
|
||||
@@ -50,7 +51,8 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary {
|
||||
@@ -46,7 +47,8 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary {
|
||||
static base::Value CreatePacScript(const std::string& pac_url,
|
||||
bool pac_mandatory);
|
||||
static base::Value CreateFixedServers(const std::string& proxy_server,
|
||||
@@ -1289,7 +1293,7 @@ diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/prox
|
||||
static base::Value CreateSystem();
|
||||
|
||||
// Encodes the proxy server as "<url-scheme>=<proxy-scheme>://<proxy>".
|
||||
@@ -66,7 +68,8 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary {
|
||||
@@ -62,7 +64,8 @@ class PROXY_CONFIG_EXPORT ProxyConfigDictionary {
|
||||
const std::string& pac_url,
|
||||
bool pac_mandatory,
|
||||
const std::string& proxy_server,
|
||||
@@ -1298,23 +1302,11 @@ diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/prox
|
||||
+ bool reverse_bypass);
|
||||
|
||||
base::Value dict_;
|
||||
};
|
||||
diff --git a/components/proxy_config/proxy_policy_handler.cc b/components/proxy_config/proxy_policy_handler.cc
|
||||
--- a/components/proxy_config/proxy_policy_handler.cc
|
||||
+++ b/components/proxy_config/proxy_policy_handler.cc
|
||||
@@ -258,7 +258,7 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
|
||||
ProxyConfigDictionary::CreateFixedServers(
|
||||
server->GetString(), bypass_list && bypass_list->is_string()
|
||||
? bypass_list->GetString()
|
||||
- : std::string()));
|
||||
+ : std::string(), false));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_config.cc
|
||||
--- a/net/proxy_resolution/proxy_config.cc
|
||||
+++ b/net/proxy_resolution/proxy_config.cc
|
||||
@@ -112,7 +112,7 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
|
||||
@@ -110,7 +110,7 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
|
||||
&single_proxies,
|
||||
ProxyServer::SCHEME_HTTP);
|
||||
type = Type::PROXY_LIST;
|
||||
@@ -1323,7 +1315,7 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c
|
||||
}
|
||||
|
||||
// Trim whitespace off the url scheme.
|
||||
@@ -143,6 +143,56 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
|
||||
@@ -141,6 +141,56 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1337,7 +1329,7 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c
|
||||
+ std::string proxy_list;
|
||||
+ for (const ProxyServer& proxy_server :
|
||||
+ single_proxies.GetAll()) {
|
||||
+ proxy_list += ProxyServerToProxyUri(proxy_server) + ";";
|
||||
+ proxy_list += proxy_server.ToURI() + ";";
|
||||
+ }
|
||||
+ // remove last semicolon
|
||||
+ if (proxy_list.length() != 0 ) {
|
||||
@@ -1356,19 +1348,19 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c
|
||||
+ std::string list;
|
||||
+ for (const ProxyServer& proxy_server :
|
||||
+ proxies_for_http.GetAll()) {
|
||||
+ list += "http=" + ProxyServerToProxyUri(proxy_server) + ";";
|
||||
+ list += "http=" + proxy_server.ToURI() + ";";
|
||||
+ }
|
||||
+ for (const ProxyServer& proxy_server :
|
||||
+ proxies_for_https.GetAll()) {
|
||||
+ list += "https=" + ProxyServerToProxyUri(proxy_server) + ";";
|
||||
+ list += "https=" + proxy_server.ToURI() + ";";
|
||||
+ }
|
||||
+ for (const ProxyServer& proxy_server :
|
||||
+ proxies_for_ftp.GetAll()) {
|
||||
+ list += "ftp=" + ProxyServerToProxyUri(proxy_server) + ";";
|
||||
+ list += "ftp=" + proxy_server.ToURI() + ";";
|
||||
+ }
|
||||
+ for (const ProxyServer& proxy_server :
|
||||
+ fallback_proxies.GetAll()) {
|
||||
+ list += "socks=" + ProxyServerToProxyUri(proxy_server) + ";";
|
||||
+ list += "socks=" + proxy_server.ToURI() + ";";
|
||||
+ }
|
||||
+ if (list.length() != 0 ) {
|
||||
+ // remove last semicolon
|
||||
@@ -1393,5 +1385,6 @@ diff --git a/net/proxy_resolution/proxy_config.h b/net/proxy_resolution/proxy_co
|
||||
|
||||
// Returns one of {&proxies_for_http, &proxies_for_https, &proxies_for_ftp,
|
||||
// &fallback_proxies}, or NULL if there is no proxy to use.
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,23 +5,24 @@ Subject: Add bookmark import/export actions
|
||||
Add bookmark import/export actions in bookmarks activity and page
|
||||
Reduce permissions needed for bookmarks import/export
|
||||
Completely remove contacts picker permission from the file dialog
|
||||
|
||||
Requires patch: Adds-support-for-writing-URIs.patch
|
||||
---
|
||||
base/android/content_uri_utils.cc | 10 +
|
||||
base/android/content_uri_utils.h | 4 +
|
||||
.../org/chromium/base/ContentUriUtils.java | 32 ++
|
||||
chrome/android/java/AndroidManifest.xml | 1 -
|
||||
.../res/menu/bookmark_action_bar_menu.xml | 14 +
|
||||
.../browser/TabbedModeTabDelegateFactory.java | 5 +-
|
||||
.../browser/bookmarks/BookmarkActionBar.java | 12 +
|
||||
.../browser/bookmarks/BookmarkActivity.java | 30 ++
|
||||
.../browser/bookmarks/BookmarkBridge.java | 278 +++++++++++++++++
|
||||
.../browser/bookmarks/BookmarkBridge.java | 277 +++++++++++++++++
|
||||
.../browser/bookmarks/BookmarkDelegate.java | 10 +
|
||||
.../browser/bookmarks/BookmarkManager.java | 22 ++
|
||||
.../browser/bookmarks/BookmarkPage.java | 8 +-
|
||||
.../native_page/NativePageFactory.java | 11 +-
|
||||
chrome/browser/BUILD.gn | 11 +-
|
||||
chrome/browser/about_flags.cc | 6 +
|
||||
.../android/bookmarks/bookmark_bridge.cc | 283 ++++++++++++++++++
|
||||
.../android/bookmarks/bookmark_bridge.h | 30 +-
|
||||
.../android/bookmarks/bookmark_bridge.cc | 284 ++++++++++++++++++
|
||||
.../android/bookmarks/bookmark_bridge.h | 28 +-
|
||||
.../browser/bookmarks/bookmark_html_writer.cc | 8 +-
|
||||
.../dialogs/DownloadLocationCustomView.java | 8 +-
|
||||
.../DownloadLocationDialogCoordinator.java | 8 +-
|
||||
@@ -43,8 +44,91 @@ Requires patch: Adds-support-for-writing-URIs.patch
|
||||
ui/shell_dialogs/select_file_dialog.h | 2 +
|
||||
.../select_file_dialog_android.cc | 6 +
|
||||
ui/shell_dialogs/select_file_dialog_android.h | 2 +
|
||||
35 files changed, 846 insertions(+), 29 deletions(-)
|
||||
38 files changed, 890 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils.cc
|
||||
--- a/base/android/content_uri_utils.cc
|
||||
+++ b/base/android/content_uri_utils.cc
|
||||
@@ -30,6 +30,16 @@ File OpenContentUriForRead(const FilePath& content_uri) {
|
||||
return File(fd);
|
||||
}
|
||||
|
||||
+File OpenContentUriForWrite(const FilePath& content_uri) {
|
||||
+ JNIEnv* env = base::android::AttachCurrentThread();
|
||||
+ ScopedJavaLocalRef<jstring> j_uri =
|
||||
+ ConvertUTF8ToJavaString(env, content_uri.value());
|
||||
+ jint fd = Java_ContentUriUtils_openContentUriForWrite(env, j_uri);
|
||||
+ if (fd < 0)
|
||||
+ return File();
|
||||
+ return File(fd);
|
||||
+}
|
||||
+
|
||||
std::string GetContentUriMimeType(const FilePath& content_uri) {
|
||||
JNIEnv* env = base::android::AttachCurrentThread();
|
||||
ScopedJavaLocalRef<jstring> j_uri =
|
||||
diff --git a/base/android/content_uri_utils.h b/base/android/content_uri_utils.h
|
||||
--- a/base/android/content_uri_utils.h
|
||||
+++ b/base/android/content_uri_utils.h
|
||||
@@ -17,6 +17,10 @@ namespace base {
|
||||
// Returns -1 if the URI is invalid.
|
||||
BASE_EXPORT File OpenContentUriForRead(const FilePath& content_uri);
|
||||
|
||||
+// Opens a content URI for write and returns the file descriptor to the caller.
|
||||
+// Returns -1 if the URI is invalid.
|
||||
+BASE_EXPORT File OpenContentUriForWrite(const FilePath& content_uri);
|
||||
+
|
||||
// Check whether a content URI exists.
|
||||
BASE_EXPORT bool ContentUriExists(const FilePath& content_uri);
|
||||
|
||||
diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
--- a/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
+++ b/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
@@ -23,6 +23,9 @@ import org.chromium.base.annotations.CalledByNative;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
+import android.system.Os;
|
||||
+import android.content.ContentProviderClient;
|
||||
+
|
||||
/**
|
||||
* This class provides methods to access content URI schemes.
|
||||
*/
|
||||
@@ -89,6 +92,35 @@ public abstract class ContentUriUtils {
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ @CalledByNative
|
||||
+ public static int openContentUriForWrite(String uriString) {
|
||||
+ try {
|
||||
+ Uri uri = Uri.parse(uriString);
|
||||
+ ContentResolver resolver = ContextUtils.getApplicationContext().getContentResolver();
|
||||
+ ContentProviderClient client = resolver.acquireContentProviderClient(
|
||||
+ uri.getAuthority());
|
||||
+ ParcelFileDescriptor pfd = client.openFile(uri, "rw");
|
||||
+ int fd = pfd.detachFd();
|
||||
+ client.close();
|
||||
+ return fd;
|
||||
+ } catch (Exception e) {
|
||||
+ Log.e(TAG, "Cannot open intermediate Uri.", e);
|
||||
+ }
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ public static String getFilePathFromContentUri(Uri uri) {
|
||||
+ String path = null;
|
||||
+ try {
|
||||
+ ContentResolver resolver = ContextUtils.getApplicationContext().getContentResolver();
|
||||
+ ParcelFileDescriptor pfd = resolver.openFileDescriptor(uri, "r");
|
||||
+ path = Os.readlink("/proc/self/fd/" + pfd.getFd());
|
||||
+ pfd.close();
|
||||
+ } catch (Throwable t) {
|
||||
+ }
|
||||
+ return path;
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Check whether a content URI exists.
|
||||
*
|
||||
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
|
||||
--- a/chrome/android/java/AndroidManifest.xml
|
||||
+++ b/chrome/android/java/AndroidManifest.xml
|
||||
@@ -62,7 +146,7 @@ diff --git a/chrome/android/java/res/menu/bookmark_action_bar_menu.xml b/chrome/
|
||||
@@ -21,6 +21,20 @@
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"
|
||||
app:iconTint="@color/default_icon_color_secondary_tint_list" />
|
||||
app:iconTint="@color/default_icon_color_tint_list" />
|
||||
+ <item
|
||||
+ android:id="@+id/import_menu_id"
|
||||
+ android:icon="@drawable/ic_folder_blue_24dp"
|
||||
@@ -112,7 +196,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDe
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
|
||||
@@ -86,6 +86,12 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
@@ -83,6 +83,12 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
} else if (menuItem.getItemId() == R.id.search_menu_id) {
|
||||
mDelegate.openSearchUI();
|
||||
return true;
|
||||
@@ -125,7 +209,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
}
|
||||
|
||||
SelectionDelegate<BookmarkId> selectionDelegate = mDelegate.getSelectionDelegate();
|
||||
@@ -137,6 +143,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
@@ -134,6 +140,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
void showLoadingUi() {
|
||||
setTitle(null);
|
||||
setNavigationButton(NAVIGATION_BUTTON_NONE);
|
||||
@@ -134,7 +218,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
getMenu().findItem(R.id.search_menu_id).setVisible(false);
|
||||
getMenu().findItem(R.id.edit_menu_id).setVisible(false);
|
||||
}
|
||||
@@ -146,6 +154,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
@@ -143,6 +151,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
super.showNormalView();
|
||||
|
||||
if (mDelegate == null) {
|
||||
@@ -143,10 +227,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
getMenu().findItem(R.id.search_menu_id).setVisible(false);
|
||||
getMenu().findItem(R.id.edit_menu_id).setVisible(false);
|
||||
}
|
||||
@@ -175,6 +185,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
@Override
|
||||
@@ -173,6 +183,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
public void onFolderStateSet(BookmarkId folder) {
|
||||
mCurrentFolder = mDelegate.getModel().getBookmarkById(folder);
|
||||
|
||||
+ getMenu().findItem(R.id.import_menu_id).setVisible(true);
|
||||
+ getMenu().findItem(R.id.export_menu_id).setVisible(true);
|
||||
getMenu().findItem(R.id.search_menu_id).setVisible(true);
|
||||
@@ -155,7 +239,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActivity.java
|
||||
@@ -16,6 +16,11 @@ import org.chromium.chrome.browser.IntentHandler;
|
||||
@@ -15,6 +15,11 @@ import org.chromium.chrome.browser.IntentHandler;
|
||||
import org.chromium.chrome.browser.SnackbarActivity;
|
||||
import org.chromium.components.bookmarks.BookmarkId;
|
||||
import org.chromium.components.embedder_support.util.UrlConstants;
|
||||
@@ -167,7 +251,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
|
||||
/**
|
||||
* The activity that displays the bookmark UI on the phone. It keeps a {@link BookmarkManager}
|
||||
@@ -25,6 +30,7 @@ import org.chromium.components.embedder_support.util.UrlConstants;
|
||||
@@ -24,6 +29,7 @@ import org.chromium.components.embedder_support.util.UrlConstants;
|
||||
public class BookmarkActivity extends SnackbarActivity {
|
||||
|
||||
private BookmarkManager mBookmarkManager;
|
||||
@@ -175,10 +259,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
static final int EDIT_BOOKMARK_REQUEST_CODE = 14;
|
||||
public static final String INTENT_VISIT_BOOKMARK_ID = "BookmarkEditActivity.VisitBookmarkId";
|
||||
|
||||
@@ -42,8 +48,23 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
@@ -40,8 +46,23 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
if (TextUtils.isEmpty(url)) url = UrlConstants.BOOKMARKS_URL;
|
||||
mBookmarkManager.updateForUrl(url);
|
||||
setContentView(mBookmarkManager.getView());
|
||||
BackPressHelper.create(this, getOnBackPressedDispatcher(), mBookmarkManager::onBackPressed);
|
||||
+
|
||||
+ final boolean listenToActivityState = true;
|
||||
+ IntentRequestTracker intentRequestTracker = IntentRequestTracker.createFromActivity(this);
|
||||
@@ -199,15 +283,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
@@ -53,6 +74,7 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
@@ -56,6 +77,7 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
+ mWindowAndroid.getIntentRequestTracker().onActivityResult(requestCode, resultCode, data);
|
||||
+ mWindowAndroid.getIntentRequestTracker().onActivityResult(requestCode, resultCode, data, mWindowAndroid);
|
||||
if (requestCode == EDIT_BOOKMARK_REQUEST_CODE && resultCode == RESULT_OK) {
|
||||
BookmarkId bookmarkId = BookmarkId.getBookmarkIdFromString(data.getStringExtra(
|
||||
INTENT_VISIT_BOOKMARK_ID));
|
||||
@@ -60,6 +82,14 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
@@ -63,6 +85,14 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,11 +309,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
|
||||
@@ -4,7 +4,20 @@
|
||||
@@ -4,7 +4,19 @@
|
||||
|
||||
package org.chromium.chrome.browser.bookmarks;
|
||||
|
||||
+import android.app.Activity;
|
||||
+import android.content.Intent;
|
||||
+import android.content.Context;
|
||||
+import android.content.pm.PackageManager;
|
||||
@@ -246,9 +329,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
import android.text.TextUtils;
|
||||
import android.util.Pair;
|
||||
|
||||
@@ -46,6 +59,32 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -27,8 +39,33 @@ import org.chromium.components.url_formatter.UrlFormatter;
|
||||
import org.chromium.content_public.browser.WebContents;
|
||||
import org.chromium.url.GURL;
|
||||
|
||||
+import org.chromium.base.ContentUriUtils;
|
||||
+import org.chromium.chrome.R;
|
||||
@@ -274,12 +357,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+import android.content.res.Resources;
|
||||
+import org.chromium.base.task.AsyncTask;
|
||||
+
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+import java.io.File;
|
||||
+
|
||||
|
||||
/**
|
||||
* Provides the communication channel for Android to fetch and manipulate the
|
||||
* bookmark model stored in native.
|
||||
@@ -737,6 +776,209 @@ public class BookmarkBridge {
|
||||
@@ -585,6 +622,210 @@ public class BookmarkBridge {
|
||||
mNativeBookmarkBridge, BookmarkBridge.this, id.getId(), id.getType());
|
||||
}
|
||||
|
||||
@@ -333,7 +417,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+ window.showIntent(fileSelector,
|
||||
+ new WindowAndroid.IntentCallback() {
|
||||
+ @Override
|
||||
+ public void onIntentCompleted(int resultCode, Intent data) {
|
||||
+ public void onIntentCompleted(WindowAndroid window, int resultCode, Intent data) {
|
||||
+ if (data == null) return;
|
||||
+ Uri filePath = data.getData();
|
||||
+ doExportBookmarksImpl(window, filePath);
|
||||
@@ -362,8 +446,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+ // get real actual file name on disk
|
||||
+ if (actualFilePath==null) actualFilePath = lastSelectedUri.toString();
|
||||
+ // set file name to last exported file name
|
||||
+ fileSelector.putExtra(Intent.EXTRA_TITLE,
|
||||
+ ContentUriUtils.getDisplayName(lastSelectedUri, context,
|
||||
+ fileSelector.putExtra(Intent.EXTRA_TITLE,
|
||||
+ ContentUriUtils.getDisplayName(lastSelectedUri, context,
|
||||
+ DocumentsContract.Document.COLUMN_DISPLAY_NAME));
|
||||
+ }
|
||||
+ return null;
|
||||
@@ -374,7 +458,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+ // check for permissions
|
||||
+ if (uriExists) {
|
||||
+ AlertDialog.Builder alert =
|
||||
+ new AlertDialog.Builder(context, R.style.ThemeOverlay_BrowserUI_AlertDialog);
|
||||
+ new AlertDialog.Builder(context, R.style.Theme_Chromium_AlertDialog);
|
||||
+ AlertDialog alertDialog =
|
||||
+ alert.setTitle(R.string.export_bookmarks_alert_title)
|
||||
+ .setMessage(context.getString(R.string.export_bookmarks_alert_message, actualFilePath))
|
||||
@@ -420,7 +504,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+ DownloadLocationDialogController controller = new DownloadLocationDialogController() {
|
||||
+ @Override
|
||||
+ public void onDownloadLocationDialogComplete(String returnedPath) {}
|
||||
+
|
||||
+
|
||||
+ @Override
|
||||
+ public void onDownloadLocationDialogCanceled() {}
|
||||
+ };
|
||||
@@ -431,19 +515,20 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+ if (mDialogModel != null) return;
|
||||
+
|
||||
+ // Actually show the dialog.
|
||||
+ mCustomView = (DownloadLocationCustomView) LayoutInflater.from(context).inflate(
|
||||
+ mCustomView = (DownloadLocationCustomView) LayoutInflater.from(mContext).inflate(
|
||||
+ R.layout.download_location_dialog, null);
|
||||
+ mCustomView.initialize(DownloadLocationDialogType.DEFAULT, /*totalBytes*/ 0);
|
||||
+ mCustomView.setTitle(context.getString(R.string.export_bookmarks_alert_title));
|
||||
+ mCustomView.setFileName(standardBoorkmarkName);
|
||||
+ mCustomView.initialize(
|
||||
+ DownloadLocationDialogType.DEFAULT, new File(standardBoorkmarkName),
|
||||
+ /*totalBytes*/ 0, context.getString(R.string.export_bookmarks_alert_title));
|
||||
+ mCustomView.mDontShowAgain.setVisibility(View.GONE);
|
||||
+
|
||||
+ Resources resources = context.getResources();
|
||||
+ Resources resources = mContext.getResources();
|
||||
+ mDialogModel = new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
|
||||
+ .with(ModalDialogProperties.CONTROLLER, this)
|
||||
+ .with(ModalDialogProperties.CUSTOM_VIEW, mCustomView)
|
||||
+ .with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, resources,
|
||||
+ R.string.export_bookmarks)
|
||||
+ .with(ModalDialogProperties.PRIMARY_BUTTON_FILLED, true)
|
||||
+ .with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, resources,
|
||||
+ R.string.cancel)
|
||||
+ .build();
|
||||
@@ -483,13 +568,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+ };
|
||||
+ dialog.initialize(controller);
|
||||
+ dialog.showDialog(context, modalDialogManager, /*totalBytes*/ 0,
|
||||
+ DownloadLocationDialogType.DEFAULT, /*suggestedPath*/ "", /*isIncognito*/ false);
|
||||
+ DownloadLocationDialogType.DEFAULT, /*suggestedPath*/ "");
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Synchronously gets a list of bookmarks that match the specified search query.
|
||||
* @param query Keyword used for searching bookmarks.
|
||||
@@ -1319,6 +1561,39 @@ public class BookmarkBridge {
|
||||
@@ -1021,6 +1262,39 @@ public class BookmarkBridge {
|
||||
depthList.add(depth);
|
||||
}
|
||||
|
||||
@@ -529,7 +614,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
private static List<Pair<Integer, Integer>> createPairsList(int[] left, int[] right) {
|
||||
List<Pair<Integer, Integer>> pairList = new ArrayList<Pair<Integer, Integer>>();
|
||||
for (int i = 0; i < left.length; i++) {
|
||||
@@ -1389,6 +1664,9 @@ public class BookmarkBridge {
|
||||
@@ -1088,6 +1362,9 @@ public class BookmarkBridge {
|
||||
int getChildCount(long nativeBookmarkBridge, BookmarkBridge caller, long id, int type);
|
||||
void getChildIDs(long nativeBookmarkBridge, BookmarkBridge caller, long id, int type,
|
||||
List<BookmarkId> bookmarksList);
|
||||
@@ -562,7 +647,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java
|
||||
@@ -35,6 +35,8 @@ import org.chromium.components.browser_ui.util.ConversionUtils;
|
||||
@@ -33,6 +33,8 @@ import org.chromium.components.browser_ui.util.ConversionUtils;
|
||||
import org.chromium.components.browser_ui.widget.dragreorder.DragStateDelegate;
|
||||
import org.chromium.components.browser_ui.widget.selectable_list.SelectableListLayout;
|
||||
import org.chromium.components.browser_ui.widget.selectable_list.SelectableListToolbar.SearchDelegate;
|
||||
@@ -571,7 +656,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate;
|
||||
import org.chromium.components.favicon.LargeIconBridge;
|
||||
import org.chromium.url.GURL;
|
||||
@@ -57,6 +59,8 @@ public class BookmarkManager
|
||||
@@ -55,6 +57,8 @@ public class BookmarkManager
|
||||
private ComponentName mOpenBookmarkComponentName;
|
||||
private ViewGroup mMainView;
|
||||
private BookmarkModel mBookmarkModel;
|
||||
@@ -580,7 +665,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
private BookmarkUndoController mUndoController;
|
||||
private final ObserverList<BookmarkUIObserver> mUIObservers = new ObserverList<>();
|
||||
private BasicNativePage mNativePage;
|
||||
@@ -351,6 +355,14 @@ public class BookmarkManager
|
||||
@@ -331,6 +335,14 @@ public class BookmarkManager
|
||||
mNativePage = nativePage;
|
||||
}
|
||||
|
||||
@@ -595,7 +680,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
/**
|
||||
* @return Current URL representing the UI state of bookmark manager. If no state has been shown
|
||||
* yet in this session, on phone return last used state stored in preference; on tablet
|
||||
@@ -531,6 +543,16 @@ public class BookmarkManager
|
||||
@@ -509,6 +521,16 @@ public class BookmarkManager
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,9 +735,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
import org.chromium.base.supplier.DestroyableObservableSupplier;
|
||||
import org.chromium.base.supplier.Supplier;
|
||||
+import org.chromium.chrome.browser.app.ChromeActivity;
|
||||
import org.chromium.chrome.browser.app.download.home.DownloadPage;
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkPage;
|
||||
import org.chromium.chrome.browser.browser_controls.BrowserControlsMarginSupplier;
|
||||
import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider;
|
||||
@@ -54,7 +55,7 @@ import org.chromium.ui.util.ColorUtils;
|
||||
* Creates NativePage objects to show chrome-native:// URLs using the native Android view system.
|
||||
*/
|
||||
@@ -662,7 +747,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
private final BottomSheetController mBottomSheetController;
|
||||
private final BrowserControlsManager mBrowserControlsManager;
|
||||
private final Supplier<Tab> mCurrentTabSupplier;
|
||||
@@ -71,7 +72,7 @@ public class NativePageFactory {
|
||||
@@ -72,7 +73,7 @@ public class NativePageFactory {
|
||||
|
||||
private NativePageBuilder mNativePageBuilder;
|
||||
|
||||
@@ -671,7 +756,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
@NonNull BottomSheetController sheetController,
|
||||
@NonNull BrowserControlsManager browserControlsManager,
|
||||
@NonNull Supplier<Tab> currentTabSupplier,
|
||||
@@ -119,7 +120,7 @@ public class NativePageFactory {
|
||||
@@ -123,7 +124,7 @@ public class NativePageFactory {
|
||||
|
||||
@VisibleForTesting
|
||||
static class NativePageBuilder {
|
||||
@@ -680,7 +765,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
private final BottomSheetController mBottomSheetController;
|
||||
private final Supplier<NewTabPageUma> mUma;
|
||||
private final BrowserControlsManager mBrowserControlsManager;
|
||||
@@ -132,7 +133,7 @@ public class NativePageFactory {
|
||||
@@ -137,7 +138,7 @@ public class NativePageFactory {
|
||||
private final JankTracker mJankTracker;
|
||||
private final Supplier<Toolbar> mToolbarSupplier;
|
||||
|
||||
@@ -689,7 +774,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
BottomSheetController sheetController,
|
||||
BrowserControlsManager browserControlsManager, Supplier<Tab> currentTabSupplier,
|
||||
Supplier<SnackbarManager> snackbarManagerSupplier,
|
||||
@@ -169,7 +170,7 @@ public class NativePageFactory {
|
||||
@@ -176,7 +177,7 @@ public class NativePageFactory {
|
||||
protected NativePage buildBookmarksPage(Tab tab) {
|
||||
return new BookmarkPage(mActivity.getComponentName(), mSnackbarManagerSupplier.get(),
|
||||
mTabModelSelector.isIncognitoSelected(),
|
||||
@@ -701,8 +786,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -1845,6 +1845,13 @@ static_library("browser") {
|
||||
"webid/federated_identity_sharing_permission_context_factory.h",
|
||||
@@ -1817,6 +1817,13 @@ static_library("browser") {
|
||||
"window_placement/window_placement_permission_context.h",
|
||||
]
|
||||
|
||||
+ if (is_android) {
|
||||
@@ -715,7 +800,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
configs += [
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
"//build/config:precompiled_headers",
|
||||
@@ -3003,6 +3010,8 @@ static_library("browser") {
|
||||
@@ -2938,6 +2945,8 @@ static_library("browser") {
|
||||
"autofill/manual_filling_view_interface.h",
|
||||
"banners/android/chrome_app_banner_manager_android.cc",
|
||||
"banners/android/chrome_app_banner_manager_android.h",
|
||||
@@ -724,21 +809,21 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
"browser_process_platform_part_android.cc",
|
||||
"browser_process_platform_part_android.h",
|
||||
"chrome_browser_field_trials_mobile.cc",
|
||||
@@ -3621,8 +3630,6 @@ static_library("browser") {
|
||||
@@ -3483,8 +3492,6 @@ static_library("browser") {
|
||||
"badging/badge_manager_factory.h",
|
||||
"banners/app_banner_manager_desktop.cc",
|
||||
"banners/app_banner_manager_desktop.h",
|
||||
- "bookmarks/bookmark_html_writer.cc",
|
||||
- "bookmarks/bookmark_html_writer.h",
|
||||
"cart/cart_db.cc",
|
||||
"cart/cart_db.h",
|
||||
"cart/cart_discount_fetcher.cc",
|
||||
"browsing_data/chrome_browsing_data_lifetime_manager.cc",
|
||||
"browsing_data/chrome_browsing_data_lifetime_manager.h",
|
||||
"browsing_data/chrome_browsing_data_lifetime_manager_factory.cc",
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -8246,6 +8246,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kRequestDesktopSiteExceptions)},
|
||||
#endif
|
||||
@@ -7567,6 +7567,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(
|
||||
password_manager::features::kPasswordsAccountStorageRevisedOptInFlow)},
|
||||
|
||||
+ {"export-bookmarks-use-saf",
|
||||
+ flag_descriptions::kBookmarksExportUseSafName,
|
||||
@@ -746,13 +831,21 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
+ FEATURE_VALUE_TYPE(
|
||||
+ chrome::android::kBookmarksExportUseSaf)},
|
||||
+
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
{"snooping-protection", flag_descriptions::kSnoopingProtectionName,
|
||||
flag_descriptions::kSnoopingProtectionDescription, kOsCrOS,
|
||||
// NOTE: Adding a new flag requires adding a corresponding entry to enum
|
||||
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
|
||||
// Histograms" in tools/metrics/histograms/README.md (run the
|
||||
diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browser/android/bookmarks/bookmark_bridge.cc
|
||||
--- a/chrome/browser/android/bookmarks/bookmark_bridge.cc
|
||||
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.cc
|
||||
@@ -56,6 +56,25 @@
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "components/bookmarks/common/android/bookmark_type.h"
|
||||
#include "components/bookmarks/common/bookmark_pref_names.h"
|
||||
#include "components/bookmarks/managed/managed_bookmark_service.h"
|
||||
+#include "components/favicon_base/favicon_usage_data.h"
|
||||
#include "components/dom_distiller/core/url_utils.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/query_parser/query_parser.h"
|
||||
@@ -48,6 +49,24 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
|
||||
@@ -767,7 +860,6 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
+#include "chrome/common/importer/imported_bookmark_entry.h"
|
||||
+#include "chrome/common/importer/importer_data_types.h"
|
||||
+#include "chrome/common/url_constants.h"
|
||||
+#include "components/favicon_base/favicon_usage_data.h"
|
||||
+#include "components/search_engines/template_url.h"
|
||||
+#include "components/url_formatter/url_fixer.h"
|
||||
+#include "ui/android/window_android.h"
|
||||
@@ -778,7 +870,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
using base::android::AttachCurrentThread;
|
||||
using base::android::ConvertUTF8ToJavaString;
|
||||
using base::android::ConvertUTF16ToJavaString;
|
||||
@@ -72,8 +91,92 @@ using bookmarks::BookmarkNode;
|
||||
@@ -64,8 +83,93 @@ using bookmarks::BookmarkNode;
|
||||
using bookmarks::BookmarkType;
|
||||
using content::BrowserThread;
|
||||
|
||||
@@ -793,7 +885,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
+
|
||||
+ // Filter out the URLs with unsupported schemes.
|
||||
+ const char* const kInvalidSchemes[] = {"wyciwyg", "place"};
|
||||
+ for (size_t i = 0; i < std::size(kInvalidSchemes); ++i) {
|
||||
+ for (size_t i = 0; i < base::size(kInvalidSchemes); ++i) {
|
||||
+ if (url.SchemeIs(kInvalidSchemes[i]))
|
||||
+ return false;
|
||||
+ }
|
||||
@@ -868,10 +960,11 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
+ const std::string export_path_;
|
||||
+};
|
||||
+
|
||||
+
|
||||
const int kInvalidId = -1;
|
||||
|
||||
class BookmarkTitleComparer {
|
||||
public:
|
||||
explicit BookmarkTitleComparer(BookmarkBridge* bookmark_bridge,
|
||||
@@ -160,6 +263,10 @@ BookmarkBridge::~BookmarkBridge() {
|
||||
@@ -152,6 +256,10 @@ BookmarkBridge::~BookmarkBridge() {
|
||||
if (partner_bookmarks_shim_)
|
||||
partner_bookmarks_shim_->RemoveObserver(this);
|
||||
reading_list_manager_->RemoveObserver(this);
|
||||
@@ -882,7 +975,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
}
|
||||
|
||||
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
|
||||
@@ -577,6 +684,182 @@ jint BookmarkBridge::GetTotalBookmarkCount(
|
||||
@@ -543,6 +651,182 @@ jint BookmarkBridge::GetTotalBookmarkCount(
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -1068,7 +1161,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser/android/bookmarks/bookmark_bridge.h
|
||||
--- a/chrome/browser/android/bookmarks/bookmark_bridge.h
|
||||
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.h
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "base/scoped_observation.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
|
||||
@@ -1076,7 +1169,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/profiles/profile_observer.h"
|
||||
#include "chrome/browser/reading_list/android/reading_list_manager.h"
|
||||
@@ -27,6 +28,9 @@
|
||||
@@ -25,6 +26,9 @@
|
||||
#include "components/prefs/pref_change_registrar.h"
|
||||
#include "url/android/gurl_android.h"
|
||||
|
||||
@@ -1086,7 +1179,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
namespace bookmarks {
|
||||
class BookmarkModel;
|
||||
class ManagedBookmarkService;
|
||||
@@ -42,7 +46,8 @@ class Profile;
|
||||
@@ -39,7 +43,8 @@ class Profile;
|
||||
class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
public PartnerBookmarksShim::Observer,
|
||||
public ReadingListManager::Observer,
|
||||
@@ -1096,7 +1189,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
public:
|
||||
BookmarkBridge(JNIEnv* env,
|
||||
const base::android::JavaRef<jobject>& obj,
|
||||
@@ -62,6 +67,12 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -55,6 +60,12 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
bool IsDoingExtensiveChanges(JNIEnv* env,
|
||||
const base::android::JavaParamRef<jobject>& obj);
|
||||
|
||||
@@ -1109,7 +1202,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
jboolean IsEditBookmarksEnabled(JNIEnv* env);
|
||||
|
||||
void LoadEmptyPartnerBookmarkShimForTesting(
|
||||
@@ -159,6 +170,15 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -142,6 +153,15 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
jlong id,
|
||||
jint type);
|
||||
|
||||
@@ -1125,16 +1218,15 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
void SetBookmarkTitle(JNIEnv* env,
|
||||
const base::android::JavaParamRef<jobject>& obj,
|
||||
jlong id,
|
||||
@@ -381,12 +401,16 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -315,12 +335,15 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
void DestroyJavaObject();
|
||||
|
||||
raw_ptr<Profile> profile_;
|
||||
Profile* profile_;
|
||||
+ base::FilePath export_path_;
|
||||
+ BookmarksExportObserver* observer_; // weak
|
||||
+
|
||||
JavaObjectWeakGlobalRef weak_java_ref_;
|
||||
raw_ptr<bookmarks::BookmarkModel> bookmark_model_; // weak
|
||||
raw_ptr<bookmarks::ManagedBookmarkService> managed_bookmark_service_; // weak
|
||||
bookmarks::BookmarkModel* bookmark_model_; // weak
|
||||
bookmarks::ManagedBookmarkService* managed_bookmark_service_; // weak
|
||||
std::unique_ptr<bookmarks::ScopedGroupBookmarkActions>
|
||||
grouped_bookmark_actions_;
|
||||
PrefChangeRegistrar pref_change_registrar_;
|
||||
@@ -1142,21 +1234,20 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
|
||||
// Information about the Partner bookmarks (must check for IsLoaded()).
|
||||
// This is owned by profile.
|
||||
@@ -398,6 +422,10 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -332,6 +355,9 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
// Observes the profile destruction and creation.
|
||||
base::ScopedObservation<Profile, ProfileObserver> profile_observation_{this};
|
||||
|
||||
+ const std::string FileSelectedImpl(const base::FilePath& path);
|
||||
+ void FileSelectedImplOnUIThread(const base::FilePath& path,
|
||||
+ const std::string& contents);
|
||||
+
|
||||
// A means of accessing metadata about bookmarks.
|
||||
OptimizationGuideKeyedService* opt_guide_;
|
||||
DISALLOW_COPY_AND_ASSIGN(BookmarkBridge);
|
||||
};
|
||||
|
||||
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc
|
||||
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc
|
||||
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "base/task/thread_pool.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/values.h"
|
||||
@@ -1164,7 +1255,7 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b
|
||||
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
|
||||
#include "chrome/browser/favicon/favicon_service_factory.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -234,7 +235,12 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
|
||||
@@ -230,7 +231,12 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
|
||||
// Opens the file, returning true on success.
|
||||
bool OpenFile() {
|
||||
int flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE;
|
||||
@@ -1181,7 +1272,7 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b
|
||||
diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java
|
||||
--- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java
|
||||
+++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java
|
||||
@@ -49,7 +49,7 @@ public class DownloadLocationCustomView
|
||||
@@ -46,7 +46,7 @@ public class DownloadLocationCustomView
|
||||
private TextView mFileSize;
|
||||
private Spinner mFileLocation;
|
||||
private TextView mLocationAvailableSpace;
|
||||
@@ -1190,7 +1281,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
||||
private @DownloadLocationDialogType int mDialogType;
|
||||
private long mTotalBytes;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class DownloadLocationCustomView
|
||||
@@ -68,7 +68,7 @@ public class DownloadLocationCustomView
|
||||
mDontShowAgain = findViewById(R.id.show_again_checkbox);
|
||||
}
|
||||
|
||||
@@ -1199,7 +1290,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
||||
// TODO(xingliu): Remove this function, currently used by smart suggestion.
|
||||
mDialogType = dialogType;
|
||||
mTotalBytes = totalBytes;
|
||||
@@ -125,7 +125,7 @@ public class DownloadLocationCustomView
|
||||
@@ -117,7 +117,7 @@ public class DownloadLocationCustomView
|
||||
* @return The text that the user inputted as the name of the file.
|
||||
*/
|
||||
@Nullable
|
||||
@@ -1208,7 +1299,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
||||
if (mFileName == null || mFileName.getText() == null) return null;
|
||||
return mFileName.getText().toString();
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public class DownloadLocationCustomView
|
||||
@@ -126,7 +126,7 @@ public class DownloadLocationCustomView
|
||||
* @return The file path based on what the user selected as the location of the file.
|
||||
*/
|
||||
@Nullable
|
||||
@@ -1220,7 +1311,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
||||
diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
|
||||
--- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
|
||||
+++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
|
||||
@@ -37,12 +37,12 @@ import java.util.ArrayList;
|
||||
@@ -36,12 +36,12 @@ import java.util.ArrayList;
|
||||
public class DownloadLocationDialogCoordinator implements ModalDialogProperties.Controller {
|
||||
@NonNull
|
||||
private DownloadLocationDialogController mController;
|
||||
@@ -1236,7 +1327,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
||||
private long mTotalBytes;
|
||||
private @DownloadLocationDialogType int mDialogType;
|
||||
private String mSuggestedPath;
|
||||
@@ -131,7 +131,7 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties.
|
||||
@@ -127,7 +127,7 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties.
|
||||
* Called after retrieved the download directory options.
|
||||
* @param dirs An list of available download directories.
|
||||
*/
|
||||
@@ -1248,8 +1339,8 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -5872,6 +5872,11 @@ const char kWebKioskEnableLacrosDescription[] =
|
||||
"ChromeOS. When disabled, the Ash-chrome will be used";
|
||||
@@ -5306,6 +5306,11 @@ const char kWebKioskEnableLacrosDescription[] =
|
||||
"Chrome OS. When disabled, the Ash-chrome will be used";
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
+const char kBookmarksExportUseSafName[] = "Use saf for bookmarks export";
|
||||
@@ -1263,7 +1354,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -3404,6 +3404,9 @@ extern const char kWebKioskEnableLacrosName[];
|
||||
@@ -3091,6 +3091,9 @@ extern const char kWebKioskEnableLacrosName[];
|
||||
extern const char kWebKioskEnableLacrosDescription[];
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
@@ -1276,15 +1367,15 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -174,6 +174,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&kBulkTabRestore,
|
||||
&kCastDeviceFilter,
|
||||
&kCloseAllTabsModalDialog,
|
||||
@@ -164,6 +164,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&kBackgroundThreadPool,
|
||||
&kBentoOffline,
|
||||
&kBookmarkBottomSheet,
|
||||
+ &kBookmarksExportUseSaf,
|
||||
&kCastDeviceFilter,
|
||||
&kCloseTabSuggestions,
|
||||
&kCriticalPersistedTabData,
|
||||
&kCCTBackgroundTab,
|
||||
@@ -854,6 +855,10 @@ const base::Feature kWebApkInstallService{"WebApkInstallService",
|
||||
@@ -810,6 +811,10 @@ const base::Feature kWebApkInstallCompleteNotification{
|
||||
const base::Feature kWebApkTrampolineOnInitialIntent{
|
||||
"WebApkTrampolineOnInitialIntent", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
@@ -1298,7 +1389,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.h
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.h
|
||||
@@ -154,6 +154,7 @@ extern const base::Feature kToolbarMicIphAndroid;
|
||||
@@ -146,6 +146,7 @@ extern const base::Feature kToolbarMicIphAndroid;
|
||||
extern const base::Feature kToolbarUseHardwareBitmapDraw;
|
||||
extern const base::Feature kTrustedWebActivityLocationDelegation;
|
||||
extern const base::Feature kTrustedWebActivityNewDisclosure;
|
||||
@@ -1309,8 +1400,8 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser
|
||||
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
@@ -557,6 +557,7 @@ public abstract class ChromeFeatureList {
|
||||
public static final String WEB_APK_INSTALL_SERVICE = "WebApkInstallService";
|
||||
@@ -560,6 +560,7 @@ public abstract class ChromeFeatureList {
|
||||
"WebApkTrampolineOnInitialIntent";
|
||||
public static final String XSURFACE_METRICS_REPORTING = "XsurfaceMetricsReporting";
|
||||
public static final String WEB_OTP_CROSS_DEVICE_SIMPLE_STRING = "WebOtpCrossDeviceSimpleString";
|
||||
+ public static final String BOOKMARKS_EXPORT_USESAF = "BookmarksExportUseSaf";
|
||||
@@ -1324,7 +1415,7 @@ diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer
|
||||
HistoryServiceFactory::GetForProfile(profile_,
|
||||
ServiceAccessType::EXPLICIT_ACCESS)
|
||||
->AddPagesWithDetails(page, visit_source);
|
||||
+#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if !defined(OS_ANDROID)
|
||||
// Measure the size of the history page after Auto Import on first run.
|
||||
if (first_run::IsChromeFirstRun() &&
|
||||
visit_source == history::SOURCE_IE_IMPORTED) {
|
||||
@@ -1356,14 +1447,14 @@ diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/
|
||||
--- a/chrome/browser/importer/profile_writer.h
|
||||
+++ b/chrome/browser/importer/profile_writer.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "components/bookmarks/browser/bookmark_model.h"
|
||||
#include "components/favicon_base/favicon_usage_data.h"
|
||||
#include "components/history/core/browser/history_types.h"
|
||||
#include "components/search_engines/template_url_service.h"
|
||||
@@ -71,6 +72,11 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
|
||||
@@ -68,6 +69,11 @@ class ProfileWriter : public base::RefCountedThreadSafe<ProfileWriter> {
|
||||
virtual void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks,
|
||||
const std::u16string& top_level_folder_name);
|
||||
|
||||
@@ -1378,7 +1469,7 @@ diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/
|
||||
diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
@@ -99,6 +99,8 @@ public final class ChromePreferenceKeys {
|
||||
@@ -124,6 +124,8 @@ public final class ChromePreferenceKeys {
|
||||
public static final String BOOKMARKS_LAST_USED_URL = "enhanced_bookmark_last_used_url";
|
||||
public static final String BOOKMARKS_LAST_USED_PARENT =
|
||||
"enhanced_bookmark_last_used_parent_folder";
|
||||
@@ -1387,8 +1478,8 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro
|
||||
|
||||
/**
|
||||
* Whether Chrome is set as the default browser.
|
||||
@@ -1017,6 +1019,7 @@ public final class ChromePreferenceKeys {
|
||||
ASSISTANT_VOICE_SEARCH_ENABLED,
|
||||
@@ -1042,6 +1044,7 @@ public final class ChromePreferenceKeys {
|
||||
AUTOFILL_ASSISTANT_PROACTIVE_HELP,
|
||||
APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE,
|
||||
APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO,
|
||||
+ BOOKMARKS_LAST_EXPORT_URI,
|
||||
@@ -1398,7 +1489,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -243,6 +243,24 @@ CHAR_LIMIT guidelines:
|
||||
@@ -242,6 +242,24 @@ CHAR_LIMIT guidelines:
|
||||
<message name="IDS_NOTIFICATION_CATEGORY_SITES" desc="Label for notifications from websites, within a list of notification categories. [CHAR_LIMIT=32]">
|
||||
Sites
|
||||
</message>
|
||||
@@ -1426,7 +1517,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
|
||||
--- a/chrome/common/BUILD.gn
|
||||
+++ b/chrome/common/BUILD.gn
|
||||
@@ -383,6 +383,9 @@ static_library("common") {
|
||||
@@ -416,6 +416,9 @@ static_library("common") {
|
||||
sources += [
|
||||
"media/chrome_media_drm_bridge_client.cc",
|
||||
"media/chrome_media_drm_bridge_client.h",
|
||||
@@ -1448,8 +1539,8 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
|
||||
"importer/bookmarks_file_importer.cc",
|
||||
"importer/bookmarks_file_importer.h",
|
||||
"importer/external_process_importer_bridge.cc",
|
||||
@@ -196,6 +194,11 @@ static_library("utility") {
|
||||
]
|
||||
@@ -184,6 +182,11 @@ static_library("utility") {
|
||||
}
|
||||
}
|
||||
|
||||
+ sources += [
|
||||
@@ -1463,25 +1554,25 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
|
||||
diff --git a/chrome/utility/importer/bookmark_html_reader.cc b/chrome/utility/importer/bookmark_html_reader.cc
|
||||
--- a/chrome/utility/importer/bookmark_html_reader.cc
|
||||
+++ b/chrome/utility/importer/bookmark_html_reader.cc
|
||||
@@ -16,7 +16,9 @@
|
||||
@@ -17,7 +17,9 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/time/time.h"
|
||||
#include "chrome/common/importer/imported_bookmark_entry.h"
|
||||
+#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if !defined(OS_ANDROID)
|
||||
#include "chrome/utility/importer/favicon_reencode.h"
|
||||
+#endif
|
||||
#include "components/search_engines/search_terms_data.h"
|
||||
#include "components/search_engines/template_url.h"
|
||||
#include "net/base/data_url.h"
|
||||
@@ -55,6 +57,7 @@ bool GetAttribute(const std::string& attribute_list,
|
||||
@@ -56,6 +58,7 @@ bool GetAttribute(const std::string& attribute_list,
|
||||
return true;
|
||||
}
|
||||
|
||||
+#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if !defined(OS_ANDROID)
|
||||
// Given the URL of a page and a favicon data URL, adds an appropriate record
|
||||
// to the given favicon usage vector.
|
||||
void DataURLToFaviconUsage(const GURL& link_url,
|
||||
@@ -85,6 +88,7 @@ void DataURLToFaviconUsage(const GURL& link_url,
|
||||
@@ -86,6 +89,7 @@ void DataURLToFaviconUsage(const GURL& link_url,
|
||||
|
||||
favicons->push_back(usage);
|
||||
}
|
||||
@@ -1489,7 +1580,7 @@ diff --git a/chrome/utility/importer/bookmark_html_reader.cc b/chrome/utility/im
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -105,14 +109,28 @@ static std::string stripDt(const std::string& lineDt) {
|
||||
@@ -106,14 +110,28 @@ static std::string stripDt(const std::string& lineDt) {
|
||||
}
|
||||
|
||||
void ImportBookmarksFile(
|
||||
@@ -1521,7 +1612,7 @@ diff --git a/chrome/utility/importer/bookmark_html_reader.cc b/chrome/utility/im
|
||||
std::vector<std::string> lines = base::SplitString(
|
||||
content, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
||||
|
||||
@@ -125,6 +143,7 @@ void ImportBookmarksFile(
|
||||
@@ -126,6 +144,7 @@ void ImportBookmarksFile(
|
||||
std::vector<std::u16string> path;
|
||||
size_t toolbar_folder_index = 0;
|
||||
std::string charset = "UTF-8"; // If no charset is specified, assume utf-8.
|
||||
@@ -1529,11 +1620,11 @@ diff --git a/chrome/utility/importer/bookmark_html_reader.cc b/chrome/utility/im
|
||||
for (size_t i = 0;
|
||||
i < lines.size() &&
|
||||
(cancellation_callback.is_null() || !cancellation_callback.Run());
|
||||
@@ -217,10 +236,12 @@ void ImportBookmarksFile(
|
||||
@@ -218,10 +237,12 @@ void ImportBookmarksFile(
|
||||
}
|
||||
bookmarks->push_back(entry);
|
||||
|
||||
+#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if !defined(OS_ANDROID)
|
||||
// Save the favicon. DataURLToFaviconUsage will handle the case where
|
||||
// there is no favicon.
|
||||
if (favicons)
|
||||
@@ -1563,15 +1654,15 @@ diff --git a/chrome/utility/importer/bookmark_html_reader.h b/chrome/utility/imp
|
||||
diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
|
||||
--- a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
|
||||
+++ b/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
|
||||
@@ -39,6 +39,7 @@ import org.chromium.base.task.AsyncTask;
|
||||
@@ -38,6 +38,7 @@ import org.chromium.base.task.AsyncTask;
|
||||
import org.chromium.base.task.PostTask;
|
||||
import org.chromium.base.task.TaskTraits;
|
||||
import org.chromium.ui.R;
|
||||
+import org.chromium.ui.widget.Toast;
|
||||
import org.chromium.ui.UiUtils;
|
||||
import org.chromium.ui.permissions.PermissionConstants;
|
||||
|
||||
@@ -58,6 +59,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
import java.io.File;
|
||||
@@ -56,6 +57,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
private static final String TAG = "SelectFileDialog";
|
||||
private static final String IMAGE_TYPE = "image";
|
||||
private static final String VIDEO_TYPE = "video";
|
||||
@@ -1579,7 +1670,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
private static final String AUDIO_TYPE = "audio";
|
||||
private static final String ALL_TYPES = "*/*";
|
||||
|
||||
@@ -241,6 +243,11 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -239,6 +241,11 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
mFileTypes = fileTypes;
|
||||
}
|
||||
|
||||
@@ -1591,16 +1682,16 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
/**
|
||||
* Creates and starts an intent based on the passed fileTypes and capture value.
|
||||
* @param fileTypes MIME types requested (i.e. "image/*")
|
||||
@@ -267,7 +274,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -266,7 +273,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
List<String> missingPermissions = new ArrayList<>();
|
||||
String storagePermission = Manifest.permission.READ_EXTERNAL_STORAGE;
|
||||
boolean shouldUsePhotoPicker = shouldUsePhotoPicker();
|
||||
- if (shouldUsePhotoPicker) {
|
||||
+ if (shouldUsePhotoPicker || shouldShowHtmlTypes()) {
|
||||
if (BuildInfo.isAtLeastT()) {
|
||||
if (!window.hasPermission(PermissionConstants.READ_MEDIA_IMAGES)
|
||||
&& shouldShowImageTypes()) {
|
||||
@@ -308,7 +315,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
if (!window.hasPermission(storagePermission)) missingPermissions.add(storagePermission);
|
||||
} else {
|
||||
if (((mSupportsImageCapture && shouldShowImageTypes())
|
||||
@@ -294,7 +301,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
}
|
||||
|
||||
// TODO(finnur): Remove once we figure out the cause of crbug.com/950024.
|
||||
@@ -1609,16 +1700,16 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
if (permissions.length != requestPermissions.length) {
|
||||
throw new RuntimeException(
|
||||
String.format("Permissions arrays misaligned: %d != %d",
|
||||
@@ -322,7 +329,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -308,7 +315,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
}
|
||||
}
|
||||
|
||||
- if (shouldUsePhotoPicker) {
|
||||
+ if (shouldUsePhotoPicker || shouldShowHtmlTypes()) {
|
||||
if (permissions[i].equals(storagePermission)
|
||||
|| permissions[i].equals(PermissionConstants.READ_MEDIA_IMAGES)
|
||||
|| permissions[i].equals(
|
||||
@@ -523,6 +530,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
- if (shouldUsePhotoPicker && permissions[i].equals(storagePermission)) {
|
||||
+ if ((shouldUsePhotoPicker || shouldShowHtmlTypes()) && permissions[i].equals(storagePermission)) {
|
||||
onFileNotSelected();
|
||||
return;
|
||||
}
|
||||
@@ -504,6 +511,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
}
|
||||
if (!mimeTypes.contains(mimeType)) mimeTypes.add(mimeType);
|
||||
}
|
||||
@@ -1626,7 +1717,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
return mimeTypes;
|
||||
}
|
||||
|
||||
@@ -828,6 +836,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -812,6 +820,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
return countAcceptTypesFor(superType) == mFileTypes.size();
|
||||
}
|
||||
|
||||
@@ -1640,7 +1731,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
diff --git a/ui/android/java/strings/android_ui_strings.grd b/ui/android/java/strings/android_ui_strings.grd
|
||||
--- a/ui/android/java/strings/android_ui_strings.grd
|
||||
+++ b/ui/android/java/strings/android_ui_strings.grd
|
||||
@@ -178,6 +178,9 @@
|
||||
@@ -174,6 +174,9 @@
|
||||
<message name="IDS_OPENING_FILE_ERROR" desc="Toast when the browser is unable to open a file for upload. [CHAR_LIMIT=32]">
|
||||
Failed to open selected file
|
||||
</message>
|
||||
@@ -1653,7 +1744,7 @@ diff --git a/ui/android/java/strings/android_ui_strings.grd b/ui/android/java/st
|
||||
diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h
|
||||
--- a/ui/shell_dialogs/select_file_dialog.h
|
||||
+++ b/ui/shell_dialogs/select_file_dialog.h
|
||||
@@ -205,6 +205,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
|
||||
@@ -202,6 +202,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
|
||||
void* params);
|
||||
bool HasMultipleFileTypeChoices();
|
||||
|
||||
@@ -1681,7 +1772,7 @@ diff --git a/ui/shell_dialogs/select_file_dialog_android.cc b/ui/shell_dialogs/s
|
||||
diff --git a/ui/shell_dialogs/select_file_dialog_android.h b/ui/shell_dialogs/select_file_dialog_android.h
|
||||
--- a/ui/shell_dialogs/select_file_dialog_android.h
|
||||
+++ b/ui/shell_dialogs/select_file_dialog_android.h
|
||||
@@ -57,6 +57,8 @@ class SelectFileDialogImpl : public SelectFileDialog {
|
||||
@@ -55,6 +55,8 @@ class SelectFileDialogImpl : public SelectFileDialog {
|
||||
gfx::NativeWindow owning_window,
|
||||
void* params) override;
|
||||
|
||||
@@ -1690,5 +1781,6 @@ diff --git a/ui/shell_dialogs/select_file_dialog_android.h b/ui/shell_dialogs/se
|
||||
protected:
|
||||
~SelectFileDialogImpl() override;
|
||||
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -9,18 +9,16 @@ Flags are mutually exclusive.
|
||||
|
||||
See also: https://github.com/bromite/bromite/issues/1474
|
||||
---
|
||||
.../java/res/xml/privacy_preferences.xml | 10 ++++++++
|
||||
.../browser/LaunchIntentDispatcher.java | 22 +++++++++++++++++
|
||||
.../IncognitoCustomTabIntentDataProvider.java | 6 +++++
|
||||
.../privacy/settings/PrivacySettings.java | 24 +++++++++++++++++++
|
||||
.../chrome/browser/tab/TabAssociatedApp.java | 6 ++++-
|
||||
.../strings/android_chrome_strings.grd | 15 ++++++++++++
|
||||
6 files changed, 82 insertions(+), 1 deletion(-)
|
||||
.../java/res/xml/privacy_preferences.xml | 10 ++++++
|
||||
.../browser/LaunchIntentDispatcher.java | 19 ++++++++++
|
||||
.../privacy/settings/PrivacySettings.java | 36 +++++++++++++++++++
|
||||
.../strings/android_chrome_strings.grd | 15 ++++++++
|
||||
4 files changed, 80 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -55,6 +55,16 @@
|
||||
@@ -56,6 +56,16 @@
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
|
||||
android:key="do_not_track"
|
||||
android:title="@string/do_not_track_title"/>
|
||||
@@ -40,15 +38,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
|
||||
@@ -44,6 +44,7 @@ import org.chromium.chrome.browser.notifications.NotificationPlatformBridge;
|
||||
import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations;
|
||||
import org.chromium.chrome.browser.searchwidget.SearchActivity;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
+import org.chromium.chrome.browser.tab.TabLaunchType;
|
||||
import org.chromium.chrome.browser.translate.TranslateIntentHandler;
|
||||
import org.chromium.chrome.browser.util.AndroidTaskUtils;
|
||||
import org.chromium.chrome.browser.vr.VrModuleProvider;
|
||||
@@ -57,6 +58,8 @@ import java.lang.annotation.Retention;
|
||||
@@ -59,6 +59,8 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -57,28 +47,20 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis
|
||||
/**
|
||||
* Dispatches incoming intents to the appropriate activity based on the current configuration and
|
||||
* Intent fired.
|
||||
@@ -273,6 +276,9 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
@@ -279,6 +281,12 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
*/
|
||||
public static boolean isCustomTabIntent(Intent intent) {
|
||||
if (intent == null) return false;
|
||||
+ if (ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false))
|
||||
+ return false;
|
||||
+ if (!ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_ALLOW_CUSTOM_TAB_INTENTS, false))
|
||||
+ return false;
|
||||
if (CustomTabsIntent.shouldAlwaysUseBrowserUI(intent)
|
||||
|| !intent.hasExtra(CustomTabsIntent.EXTRA_SESSION)) {
|
||||
return false;
|
||||
@@ -292,6 +298,10 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
newIntent.setData(uri);
|
||||
newIntent.setClassName(context, CustomTabActivity.class.getName());
|
||||
|
||||
+ if (ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false))
|
||||
+ newIntent.putExtra(IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, true);
|
||||
+
|
||||
// Since configureIntentForResizableCustomTab() might change the componenet/class
|
||||
// associated with the passed intent, it needs to be called after #setClassName(context,
|
||||
// CustomTabActivity.class.getName());
|
||||
@@ -411,6 +421,18 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
@@ -417,6 +425,17 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
|
||||
if (Intent.ACTION_VIEW.equals(newIntent.getAction())
|
||||
&& !IntentHandler.wasIntentSenderChrome(newIntent)) {
|
||||
@@ -90,42 +72,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis
|
||||
+ /*incognito*/true);
|
||||
+ newIntent.setData(mIntent.getData());
|
||||
+ newIntent.setPackage(applicationContext.getPackageName());
|
||||
+ IntentHandler.setTabLaunchType(newIntent, TabLaunchType.FROM_EXTERNAL_APP);
|
||||
+ newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
+ }
|
||||
+
|
||||
long time = SystemClock.elapsedRealtime();
|
||||
if (!chromeTabbedTaskExists()) {
|
||||
newIntent.putExtra(IntentHandler.EXTRA_STARTED_TABBED_CHROME_TASK, true);
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java
|
||||
@@ -36,6 +36,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
+import org.chromium.base.ContextUtils;
|
||||
+import org.chromium.chrome.browser.privacy.settings.PrivacySettings;
|
||||
+
|
||||
/**
|
||||
* A model class that parses the incoming intent for incognito Custom Tabs specific customization
|
||||
* data.
|
||||
@@ -109,6 +112,9 @@ public class IncognitoCustomTabIntentDataProvider extends BrowserServicesIntentD
|
||||
}
|
||||
|
||||
private static boolean isIntentFromThirdPartyAllowed() {
|
||||
+ if (ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false))
|
||||
+ return true;
|
||||
return CachedFeatureFlags.isEnabled(
|
||||
ChromeFeatureList.CCT_INCOGNITO_AVAILABLE_TO_THIRD_PARTY);
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -83,6 +83,9 @@ public class PrivacySettings
|
||||
private ViewGroup mDialogContainer;
|
||||
private BottomSheetController mBottomSheetController;
|
||||
@@ -90,6 +90,9 @@ public class PrivacySettings
|
||||
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
|
||||
+ private ChromeSwitchPreference allowCustomTabIntentsPref;
|
||||
+ private ChromeSwitchPreference openExternalLinksPref;
|
||||
@@ -133,8 +91,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
PrivacyPreferencesManagerImpl privacyPrefManager =
|
||||
@@ -154,6 +157,9 @@ public class PrivacySettings
|
||||
updatePreferences();
|
||||
@@ -191,6 +194,9 @@ public class PrivacySettings
|
||||
updateSummaries();
|
||||
}
|
||||
|
||||
+ public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents";
|
||||
@@ -143,22 +101,34 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
String key = preference.getKey();
|
||||
@@ -170,6 +176,14 @@ public class PrivacySettings
|
||||
} else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
|
||||
@@ -222,6 +228,26 @@ public class PrivacySettings
|
||||
} else if (PREF_INCOGNITO_TAB_HISTORY_ENABLED.equals(key)) {
|
||||
UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
.setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
|
||||
.setBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED, (boolean) newValue);
|
||||
+ } else if (PREF_ALLOW_CUSTOM_TAB_INTENTS.equals(key)) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_ALLOW_CUSTOM_TAB_INTENTS, (boolean)newValue);
|
||||
+ sharedPreferencesEditor.apply();
|
||||
+
|
||||
+ // PREF_ALLOW_CUSTOM_TAB_INTENTS and PREF_OPEN_EXTERNAL_LINKS_INCOGNITO
|
||||
+ // are mutually exclusive
|
||||
+ if((boolean)newValue && ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, false))
|
||||
+ openExternalLinksPref.setChecked(!(boolean)newValue);
|
||||
+ } else if (PREF_OPEN_EXTERNAL_LINKS_INCOGNITO.equals(key)) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, (boolean)newValue);
|
||||
+ sharedPreferencesEditor.apply();
|
||||
+
|
||||
+ // PREF_ALLOW_CUSTOM_TAB_INTENTS and PREF_OPEN_EXTERNAL_LINKS_INCOGNITO
|
||||
+ // are mutually exclusive
|
||||
+ if((boolean)newValue && ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean(PrivacySettings.PREF_ALLOW_CUSTOM_TAB_INTENTS, false))
|
||||
+ allowCustomTabIntentsPref.setChecked(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -192,6 +206,16 @@ public class PrivacySettings
|
||||
@@ -257,6 +283,16 @@ public class PrivacySettings
|
||||
canMakePaymentPref.setChecked(prefService.getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED));
|
||||
}
|
||||
|
||||
@@ -175,26 +145,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
Preference doNotTrackPref = findPreference(PREF_DO_NOT_TRACK);
|
||||
if (doNotTrackPref != null) {
|
||||
doNotTrackPref.setSummary(prefService.getBoolean(Pref.ENABLE_DO_NOT_TRACK)
|
||||
diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAssociatedApp.java b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAssociatedApp.java
|
||||
--- a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAssociatedApp.java
|
||||
+++ b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAssociatedApp.java
|
||||
@@ -84,7 +84,11 @@ public final class TabAssociatedApp extends TabWebContentsUserData implements Im
|
||||
public static boolean isOpenedFromExternalApp(Tab tab) {
|
||||
TabAssociatedApp app = get(tab);
|
||||
if (app == null) return false;
|
||||
-
|
||||
+ if (ContextUtils.getAppSharedPreferences()
|
||||
+ .getBoolean("open_external_links_incognito", false) &&
|
||||
+ tab.isIncognito() &&
|
||||
+ tab.getLaunchType() == TabLaunchType.FROM_EXTERNAL_APP)
|
||||
+ return true;
|
||||
String packageName = ContextUtils.getApplicationContext().getPackageName();
|
||||
return tab.getLaunchType() == TabLaunchType.FROM_EXTERNAL_APP
|
||||
&& !TextUtils.equals(app.getAppId(), packageName);
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -4626,6 +4626,21 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -4496,6 +4496,21 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_NEAR_OOM_REDUCTION_DECLINE" desc="The text of the button letting the user decline the browser's intervention, so that the page can be reloaded.">
|
||||
Show original
|
||||
</message>
|
||||
@@ -216,5 +170,6 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
|
||||
<!-- Autofill Assistant preferences -->
|
||||
<!-- TODO(b/168178344): Move to Assistant settings strings section below. -->
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -5,18 +5,17 @@ Subject: Add exit menu item
|
||||
Corrected Exit functionality
|
||||
---
|
||||
chrome/android/java/res/menu/main_menu.xml | 6 ++++++
|
||||
.../org/chromium/chrome/browser/ApplicationLifetime.java | 2 ++
|
||||
.../org/chromium/chrome/browser/ChromeTabbedActivity.java | 4 ++++
|
||||
.../src/org/chromium/chrome/browser/app/ChromeActivity.java | 6 ++++++
|
||||
.../chrome/browser/init/ChromeLifetimeController.java | 6 +++++-
|
||||
.../browser/ui/android/strings/android_chrome_strings.grd | 3 +++
|
||||
6 files changed, 26 insertions(+), 1 deletion(-)
|
||||
5 files changed, 24 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml
|
||||
--- a/chrome/android/java/res/menu/main_menu.xml
|
||||
+++ b/chrome/android/java/res/menu/main_menu.xml
|
||||
@@ -158,6 +158,9 @@
|
||||
android:icon="@drawable/ic_business" />
|
||||
@@ -124,6 +124,9 @@
|
||||
android:icon="@drawable/gm_filled_cardboard_24" />
|
||||
<item android:id="@+id/managed_by_menu_id"
|
||||
android:title="@string/managed" />
|
||||
+ <item android:id="@+id/exit_id"
|
||||
@@ -25,7 +24,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
|
||||
</group>
|
||||
|
||||
<!-- Items shown only in the tab switcher -->
|
||||
@@ -184,6 +187,9 @@
|
||||
@@ -150,6 +153,9 @@
|
||||
<item android:id="@id/preferences_id"
|
||||
android:title="@string/menu_settings"
|
||||
android:icon="@drawable/settings_cog" />
|
||||
@@ -34,30 +33,11 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
|
||||
+ android:icon="@drawable/ic_exit_to_app_white_24dp" />
|
||||
</group>
|
||||
|
||||
<!-- Items shown only when the tablet has no visible tabs -->
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java b/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java
|
||||
@@ -6,6 +6,7 @@ package org.chromium.chrome.browser;
|
||||
|
||||
import org.chromium.base.ObserverList;
|
||||
import org.chromium.base.annotations.CalledByNative;
|
||||
+import org.chromium.chrome.browser.incognito.IncognitoNotificationManager;
|
||||
|
||||
/**
|
||||
* Watches for when Chrome is told to restart itself.
|
||||
@@ -42,6 +43,7 @@ public class ApplicationLifetime {
|
||||
|
||||
@CalledByNative
|
||||
public static void terminate(boolean restart) {
|
||||
+ IncognitoNotificationManager.dismissIncognitoNotification();
|
||||
for (Observer observer : sObservers) {
|
||||
observer.onTerminate(restart);
|
||||
}
|
||||
<!-- Items shown only in the tab switcher when start surface is enabled -->
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
@@ -215,6 +215,8 @@ import java.util.HashSet;
|
||||
@@ -206,6 +206,8 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -66,19 +46,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
|
||||
/**
|
||||
* This is the main activity for ChromeMobile when not running in document mode. All the tabs
|
||||
* are accessible via a chrome specific tab switching UI.
|
||||
@@ -2137,6 +2139,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
@@ -2008,6 +2010,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
} else if (id == R.id.close_tab) {
|
||||
getCurrentTabModel().closeTab(currentTab, true, false, true);
|
||||
RecordUserAction.record("MobileTabClosed");
|
||||
+ } else if (id == R.id.exit_id) {
|
||||
+ ApplicationLifetime.terminate(false);
|
||||
} else if (id == R.id.close_all_tabs_menu_id) {
|
||||
// Close both incognito and normal tabs.
|
||||
CloseAllTabsDialog.show(this, getModalDialogManagerSupplier(),
|
||||
// Close both incognito and normal tabs
|
||||
getTabModelSelector().closeAllTabs();
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
@@ -65,6 +65,7 @@ import org.chromium.chrome.R;
|
||||
@@ -66,6 +66,7 @@ import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.ActivityTabProvider;
|
||||
import org.chromium.chrome.browser.ActivityUtils;
|
||||
import org.chromium.chrome.browser.AppHooks;
|
||||
@@ -86,7 +66,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
|
||||
import org.chromium.chrome.browser.ChromeActivitySessionTracker;
|
||||
import org.chromium.chrome.browser.ChromeApplicationImpl;
|
||||
import org.chromium.chrome.browser.ChromeKeyboardVisibilityDelegate;
|
||||
@@ -2393,6 +2394,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
@@ -2303,6 +2304,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -117,9 +97,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLife
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -3341,6 +3341,9 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_MENU_AUTO_DARK_WEB_CONTENTS" desc="Menu item in Chrome's overflow/options menu. When Chrome's browser UI is set to dark theme and this option is checked, sites will have a dark theme automatically applied as well. [CHAR_LIMIT=24]">
|
||||
Dark theme
|
||||
@@ -3144,6 +3144,9 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_MENU_REQUEST_DESKTOP_SITE_OFF" desc="Accessibility description for when Request Desktop Site is disabled.">
|
||||
Turn on Request desktop site
|
||||
</message>
|
||||
+ <message name="IDS_MENU_EXIT" desc="Menu item for exit browser. [CHAR-LIMIT=27]">
|
||||
+ Exit
|
||||
@@ -127,5 +107,6 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
<message name="IDS_MENU_READER_MODE_PREFS" desc="Menu item to show reader mode preferences pane, which allows users to change the appearance (font size, theme, etc.) of the page. [CHAR_LIMIT=27]">
|
||||
Appearance
|
||||
</message>
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -5,20 +5,20 @@ Subject: Add flag for omnibox autocomplete filtering
|
||||
Adds a flag that restricts whether search history, clipboard, bookmarks
|
||||
and internal chrome:// pages will be used for the autocomplete results.
|
||||
---
|
||||
chrome/browser/about_flags.cc | 22 ++++++++++++++++++-
|
||||
chrome/browser/about_flags.cc | 21 +++++++++++++++++++
|
||||
.../browser/autocomplete_controller.cc | 11 ++++++++++
|
||||
.../omnibox/browser/history_url_provider.cc | 3 +++
|
||||
components/omnibox/browser/search_provider.cc | 4 ++++
|
||||
components/url_formatter/url_fixer.cc | 4 ++++
|
||||
5 files changed, 43 insertions(+), 1 deletion(-)
|
||||
5 files changed, 43 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -466,6 +466,22 @@ const FeatureEntry::FeatureVariation kReaderModeDiscoverabilityVariations[] = {
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
@@ -449,6 +449,22 @@ const FeatureEntry::FeatureVariation kReaderModeDiscoverabilityVariations[] = {
|
||||
base::size(kReaderModeOfferInSettings), nullptr}};
|
||||
#endif // OS_ANDROID
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
+const FeatureEntry::Choice kOmniboxAutocompleteFiltering[] = {
|
||||
+ {flags_ui::kGenericExperimentChoiceDefault, "", ""},
|
||||
+ {"Search suggestions only",
|
||||
@@ -35,22 +35,21 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
+ "search-bookmarks-chrome"},
|
||||
+};
|
||||
+
|
||||
#if defined(OS_ANDROID)
|
||||
const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNone[] = {
|
||||
{"mode", "always-none"}};
|
||||
const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNewTab[] = {
|
||||
@@ -3868,7 +3884,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kOsMac | kOsLinux | kOsLacros | kOsWin,
|
||||
FEATURE_VALUE_TYPE(features::kSystemNotifications)},
|
||||
#endif // BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
+#if BUILDFLAG(IS_ANDROID) // Bromite autocomplete filtering
|
||||
@@ -4766,6 +4782,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(chrome::android::kReaderModeInCCT)},
|
||||
#endif // !defined(OS_ANDROID)
|
||||
|
||||
+ {"omnibox-autocomplete-filtering",
|
||||
+ "Omnibox Autocomplete Filtering",
|
||||
+ "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages.",
|
||||
+ "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages. ungoogled-chromium flag.",
|
||||
+ kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)},
|
||||
{"adaptive-button-in-top-toolbar",
|
||||
flag_descriptions::kAdaptiveButtonInTopToolbarName,
|
||||
flag_descriptions::kAdaptiveButtonInTopToolbarDescription, kOsAndroid,
|
||||
+
|
||||
#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || \
|
||||
defined(OS_CHROMEOS)
|
||||
{"webui-feedback", flag_descriptions::kWebuiFeedbackName,
|
||||
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc
|
||||
--- a/components/omnibox/browser/autocomplete_controller.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_controller.cc
|
||||
@@ -63,7 +62,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/
|
||||
#include "base/feature_list.h"
|
||||
#include "base/format_macros.h"
|
||||
#include "base/metrics/histogram.h"
|
||||
@@ -292,6 +294,15 @@ AutocompleteController::AutocompleteController(
|
||||
@@ -276,6 +278,15 @@ AutocompleteController::AutocompleteController(
|
||||
search_service_worker_signal_sent_(false),
|
||||
template_url_service_(provider_client_->GetTemplateURLService()) {
|
||||
provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes();
|
||||
@@ -82,7 +81,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/
|
||||
diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
|
||||
--- a/components/omnibox/browser/history_url_provider.cc
|
||||
+++ b/components/omnibox/browser/history_url_provider.cc
|
||||
@@ -472,6 +472,9 @@ void HistoryURLProvider::Start(const AutocompleteInput& input,
|
||||
@@ -553,6 +553,9 @@ void HistoryURLProvider::Start(const AutocompleteInput& input,
|
||||
if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY)
|
||||
matches_.push_back(what_you_typed_match);
|
||||
|
||||
@@ -103,7 +102,7 @@ diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/
|
||||
#include "base/feature_list.h"
|
||||
#include "base/i18n/break_iterator.h"
|
||||
#include "base/i18n/case_conversion.h"
|
||||
@@ -646,6 +647,9 @@ void SearchProvider::Run(bool query_is_private) {
|
||||
@@ -647,6 +648,9 @@ void SearchProvider::Run(bool query_is_private) {
|
||||
}
|
||||
|
||||
void SearchProvider::DoHistoryQuery(bool minimal_changes) {
|
||||
@@ -134,5 +133,6 @@ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/ur
|
||||
url.append(kChromeUIDefaultHost);
|
||||
FixupPort(trimmed, parts.port, &url);
|
||||
FixupPath(trimmed, parts.path, &url);
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -3,33 +3,31 @@ Date: Mon, 1 Feb 2021 19:18:55 +0200
|
||||
Subject: Add flag for save-data-header
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 5 ++++-
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
.../browser/loader/browser_initiated_resource_request.cc | 8 ++++++++
|
||||
services/network/public/cpp/features.cc | 5 +++++
|
||||
services/network/public/cpp/features.h | 3 ++-
|
||||
6 files changed, 26 insertions(+), 2 deletions(-)
|
||||
chrome/browser/about_flags.cc | 3 +++
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
content/browser/loader/browser_initiated_resource_request.cc | 5 +++--
|
||||
services/network/public/cpp/features.cc | 4 ++++
|
||||
services/network/public/cpp/features.h | 2 ++
|
||||
6 files changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -4443,7 +4443,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"force-text-direction", flag_descriptions::kForceTextDirectionName,
|
||||
flag_descriptions::kForceTextDirectionDescription, kOsAll,
|
||||
MULTI_VALUE_TYPE(kForceTextDirectionChoices)},
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
+#if BUILDFLAG(IS_ANDROID) // Bromite save data header
|
||||
@@ -4500,6 +4500,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
+ {"enable-save-data-header", flag_descriptions::kEnableSaveDataHeaderName,
|
||||
+ flag_descriptions::kEnableSaveDataHeaderDescription, kOsAndroid,
|
||||
+ FEATURE_VALUE_TYPE(network::features::kEnableSaveDataHeader)},
|
||||
{"force-update-menu-type", flag_descriptions::kUpdateMenuTypeName,
|
||||
flag_descriptions::kUpdateMenuTypeDescription, kOsAndroid,
|
||||
MULTI_VALUE_TYPE(kForceUpdateMenuTypeChoices)},
|
||||
{"enable-command-line-on-non-rooted-devices",
|
||||
flag_descriptions::kEnableCommandLineOnNonRootedName,
|
||||
flag_descriptions::kEnableCommandLineOnNoRootedDescription, kOsAndroid,
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -1099,6 +1099,10 @@ const char kDisableKeepaliveFetchDescription[] =
|
||||
@@ -1035,6 +1035,10 @@ const char kDisableKeepaliveFetchDescription[] =
|
||||
"Disable fetch with keepalive set "
|
||||
"(https://fetch.spec.whatwg.org/#request-keepalive-flag).";
|
||||
|
||||
@@ -43,7 +41,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -583,6 +583,9 @@ extern const char kDeprecateAltBasedSixPackDescription[];
|
||||
@@ -564,6 +564,9 @@ extern const char kDiagnosticsAppNavigationDescription[];
|
||||
extern const char kDisableKeepaliveFetchName[];
|
||||
extern const char kDisableKeepaliveFetchDescription[];
|
||||
|
||||
@@ -56,57 +54,45 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
||||
diff --git a/content/browser/loader/browser_initiated_resource_request.cc b/content/browser/loader/browser_initiated_resource_request.cc
|
||||
--- a/content/browser/loader/browser_initiated_resource_request.cc
|
||||
+++ b/content/browser/loader/browser_initiated_resource_request.cc
|
||||
@@ -4,6 +4,9 @@
|
||||
@@ -40,9 +40,10 @@ void UpdateAdditionalHeadersForBrowserInitiatedRequest(
|
||||
|
||||
#include "content/browser/loader/browser_initiated_resource_request.h"
|
||||
|
||||
+#include "base/feature_list.h"
|
||||
+#include "services/network/public/cpp/features.h"
|
||||
+
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
@@ -37,8 +40,13 @@ void UpdateAdditionalHeadersForBrowserInitiatedRequest(
|
||||
// Save-Data was previously included in hints for workers, thus we cannot
|
||||
// remove it for the time being. If you're reading this, consider building
|
||||
// permissions policies for workers and/or deprecating this inclusion.
|
||||
+ bool setHeader = false;
|
||||
if (is_for_worker_script &&
|
||||
GetContentClient()->browser()->IsDataSaverEnabled(browser_context)) {
|
||||
+ setHeader = true;
|
||||
+ }
|
||||
+ setHeader |= base::FeatureList::IsEnabled(network::features::kEnableSaveDataHeader);
|
||||
+ if (setHeader) {
|
||||
// Set the Save-Data header if appropriate.
|
||||
// https://tools.ietf.org/html/draft-grigorik-http-client-hints-03#section-7
|
||||
- if (GetContentClient()->browser()->IsDataSaverEnabled(browser_context) &&
|
||||
+ if ((GetContentClient()->browser()->IsDataSaverEnabled(browser_context) &&
|
||||
!base::GetFieldTrialParamByFeatureAsBool(features::kDataSaverHoldback,
|
||||
- "holdback_web", false)) {
|
||||
+ "holdback_web", false)) ||
|
||||
+ base::FeatureList::IsEnabled(network::features::kEnableSaveDataHeader)) {
|
||||
if (should_update_existing_headers) {
|
||||
headers->RemoveHeader("Save-Data");
|
||||
}
|
||||
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
|
||||
--- a/services/network/public/cpp/features.cc
|
||||
+++ b/services/network/public/cpp/features.cc
|
||||
@@ -20,6 +20,11 @@ namespace features {
|
||||
const base::Feature kExpectCTReporting{"ExpectCTReporting",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
@@ -156,6 +156,10 @@ const base::FeatureParam<std::string>
|
||||
"DisabledProviders", ""};
|
||||
|
||||
+
|
||||
+// Enable save-data header separately (without enabled data reduction service).
|
||||
// Disable special treatment on requests with keepalive set (see
|
||||
+// Enable save-data header seprately, without enabled data reduction service
|
||||
+const base::Feature kEnableSaveDataHeader{"EnableSaveDataHeader",
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+
|
||||
const base::Feature kNetworkErrorLogging{"NetworkErrorLogging",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
// https://fetch.spec.whatwg.org/#request-keepalive-flag). This is introduced
|
||||
// for investigation on the memory usage, and should not be enabled widely.
|
||||
const base::Feature kDisableKeepaliveFetch{"DisableKeepaliveFetch",
|
||||
diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h
|
||||
--- a/services/network/public/cpp/features.h
|
||||
+++ b/services/network/public/cpp/features.h
|
||||
@@ -47,7 +47,8 @@ COMPONENT_EXPORT(NETWORK_CPP)
|
||||
extern const base::Feature kDisableKeepaliveFetch;
|
||||
@@ -60,6 +60,8 @@ extern const base::FeatureParam<std::string>
|
||||
COMPONENT_EXPORT(NETWORK_CPP)
|
||||
extern const base::Feature kOpaqueResponseBlockingV01;
|
||||
-
|
||||
+COMPONENT_EXPORT(NETWORK_CPP)
|
||||
extern const base::Feature kDisableKeepaliveFetch;
|
||||
|
||||
+extern const base::Feature kEnableSaveDataHeader;
|
||||
+COMPONENT_EXPORT(NETWORK_CPP)
|
||||
COMPONENT_EXPORT(NETWORK_CPP)
|
||||
extern const base::Feature kTrustTokens;
|
||||
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ with limited CPU/memory resources and it is disabled by default.
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -882,6 +882,11 @@ const FeatureEntry::FeatureVariation
|
||||
std::size(kIsolatedPrerenderPrefetchLimitFifteen), nullptr},
|
||||
@@ -837,6 +837,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
|
||||
net::kEffectiveConnectionType4G},
|
||||
};
|
||||
|
||||
+const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = {
|
||||
@@ -28,10 +28,10 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
+ {features::kMaxConnectionsPerHostChoice15, switches::kMaxConnectionsPerHost, "15"},
|
||||
+};
|
||||
+
|
||||
const FeatureEntry::Choice kMemlogModeChoices[] = {
|
||||
{flags_ui::kGenericExperimentChoiceDisabled, "", ""},
|
||||
{flag_descriptions::kMemlogModeMinimal, heap_profiling::kMemlogMode,
|
||||
@@ -4417,6 +4422,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
// Ensure that all effective connection types returned by Network Quality
|
||||
// Estimator (NQE) are also exposed via flags.
|
||||
static_assert(net::EFFECTIVE_CONNECTION_TYPE_LAST + 2 ==
|
||||
@@ -3792,6 +3797,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kAndroidPictureInPictureAPIName,
|
||||
flag_descriptions::kAndroidPictureInPictureAPIDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(media::kPictureInPictureAPI)},
|
||||
@@ -44,9 +44,9 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -1600,6 +1600,10 @@ const char kUnthrottledNestedTimeoutDescription[] =
|
||||
"websites abusing the API will still eventually have their setTimeouts "
|
||||
"clamped.";
|
||||
@@ -1524,6 +1524,10 @@ const char kMediaHistoryDescription[] =
|
||||
"Enables Media History which records data around media playbacks on "
|
||||
"websites.";
|
||||
|
||||
+const char kMaxConnectionsPerHostName[] = "Maximum connections per host";
|
||||
+const char kMaxConnectionsPerHostDescription[] =
|
||||
@@ -58,9 +58,9 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -903,6 +903,9 @@ extern const char kLogJsConsoleMessagesDescription[];
|
||||
extern const char kUnthrottledNestedTimeoutName[];
|
||||
extern const char kUnthrottledNestedTimeoutDescription[];
|
||||
@@ -877,6 +877,9 @@ extern const char kLogJsConsoleMessagesDescription[];
|
||||
extern const char kMediaHistoryName[];
|
||||
extern const char kMediaHistoryDescription[];
|
||||
|
||||
+extern const char kMaxConnectionsPerHostName[];
|
||||
+extern const char kMaxConnectionsPerHostDescription[];
|
||||
@@ -110,7 +110,7 @@ diff --git a/components/network_session_configurator/common/network_switch_list.
|
||||
diff --git a/components/url_formatter/spoof_checks/top_domains/BUILD.gn b/components/url_formatter/spoof_checks/top_domains/BUILD.gn
|
||||
--- a/components/url_formatter/spoof_checks/top_domains/BUILD.gn
|
||||
+++ b/components/url_formatter/spoof_checks/top_domains/BUILD.gn
|
||||
@@ -89,6 +89,7 @@ executable("make_top_domain_list_variables") {
|
||||
@@ -73,6 +73,7 @@ executable("make_top_domain_list_variables") {
|
||||
"//base:i18n",
|
||||
"//components/url_formatter/spoof_checks/common_words:common",
|
||||
"//third_party/icu",
|
||||
@@ -121,7 +121,7 @@ diff --git a/components/url_formatter/spoof_checks/top_domains/BUILD.gn b/compon
|
||||
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
|
||||
--- a/net/socket/client_socket_pool_manager.cc
|
||||
+++ b/net/socket/client_socket_pool_manager.cc
|
||||
@@ -19,6 +19,10 @@
|
||||
@@ -20,6 +20,10 @@
|
||||
#include "net/socket/client_socket_handle.h"
|
||||
#include "net/socket/client_socket_pool.h"
|
||||
#include "net/socket/connect_job.h"
|
||||
@@ -132,7 +132,7 @@ diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket
|
||||
#include "net/ssl/ssl_config.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#include "url/gurl.h"
|
||||
@@ -172,6 +176,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool(
|
||||
@@ -173,6 +177,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool(
|
||||
int ClientSocketPoolManager::max_sockets_per_group(
|
||||
HttpNetworkSession::SocketPoolType pool_type) {
|
||||
DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);
|
||||
@@ -152,5 +152,6 @@ diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket
|
||||
return g_max_sockets_per_group[pool_type];
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ Disable it by default on Android as it is everywhere else
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
media/base/media_switches.cc | 4 ----
|
||||
4 files changed, 12 insertions(+), 4 deletions(-)
|
||||
media/base/media_switches.cc | 6 +-----
|
||||
4 files changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -3168,6 +3168,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -2708,6 +2708,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kWebRtcRemoteEventLogName,
|
||||
flag_descriptions::kWebRtcRemoteEventLogDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(features::kWebRtcRemoteEventLog)},
|
||||
@@ -27,7 +27,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -1183,6 +1183,11 @@ const char kEnablePenetratingImageSelectionDescription[] =
|
||||
@@ -1120,6 +1120,11 @@ const char kEnablePenetratingImageSelectionDescription[] =
|
||||
"Enables image options to be surfaced in the context menu for nodes "
|
||||
"covered by transparent overlays.";
|
||||
|
||||
@@ -42,7 +42,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -646,6 +646,9 @@ extern const char kEnablePortalsDescription[];
|
||||
@@ -632,6 +632,9 @@ extern const char kEnablePortalsDescription[];
|
||||
extern const char kEnablePortalsCrossOriginName[];
|
||||
extern const char kEnablePortalsCrossOriginDescription[];
|
||||
|
||||
@@ -59,13 +59,15 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
||||
// when in background.
|
||||
const base::Feature kResumeBackgroundVideo {
|
||||
"resume-background-video",
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
-#if defined(OS_ANDROID)
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
-#else
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT
|
||||
-#endif
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||
};
|
||||
|
||||
// Experimental: Try to avoid destroying the media player when transferring a
|
||||
--
|
||||
2.25.1
|
||||
// When enabled, MediaCapabilities will check with GPU Video Accelerator
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ Date: Sun, 18 Nov 2018 13:06:49 +0100
|
||||
Subject: Add flag to disable IPv6 probes
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/about_flags.cc | 5 +++++
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
components/subresource_filter/tools/BUILD.gn | 6 ++++++
|
||||
@@ -11,40 +11,41 @@ Subject: Add flag to disable IPv6 probes
|
||||
net/dns/host_resolver_manager.cc | 9 ++++++++-
|
||||
services/network/public/cpp/features.cc | 4 ++++
|
||||
services/network/public/cpp/features.h | 2 ++
|
||||
8 files changed, 33 insertions(+), 2 deletions(-)
|
||||
8 files changed, 34 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -5333,6 +5333,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-reader-mode-in-cct", flag_descriptions::kReaderModeInCCTName,
|
||||
flag_descriptions::kReaderModeInCCTDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(chrome::android::kReaderModeInCCT)},
|
||||
@@ -4742,6 +4742,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
#endif // defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) ||
|
||||
// defined(OS_CHROMEOS)
|
||||
|
||||
+ {"ipv6-probing",
|
||||
+ flag_descriptions::kIPv6ProbingName,
|
||||
+ flag_descriptions::kIPv6ProbingDescription, kOsAll,
|
||||
+ FEATURE_VALUE_TYPE(network::features::kIPv6Probing)},
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
||||
+
|
||||
#if !defined(OS_ANDROID)
|
||||
{"ntp-cache-one-google-bar", flag_descriptions::kNtpCacheOneGoogleBarName,
|
||||
flag_descriptions::kNtpCacheOneGoogleBarDescription, kOsDesktop,
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -3017,6 +3017,10 @@ const char kCCTResizableForThirdPartiesName[] =
|
||||
const char kCCTResizableForThirdPartiesDescription[] =
|
||||
"Enable bottom sheet Custom Tabs for third party apps.";
|
||||
@@ -3015,6 +3015,10 @@ const char kContextualSearchRankerQueryDescription[] =
|
||||
|
||||
const char kContextualSearchSecondTapName[] =
|
||||
"Contextual Search second tap triggering";
|
||||
+const char kIPv6ProbingName[] = "Enable IPv6 probing.";
|
||||
+const char kIPv6ProbingDescription[] =
|
||||
+ "Send IPv6 probes to a RIPE DNS address to verify IPv6 connectivity.";
|
||||
+
|
||||
const char kChimeAlwaysShowNotificationDescription[] =
|
||||
"A debug flag to always show Chime notification after receiving a payload.";
|
||||
const char kChimeAlwaysShowNotificationName[] =
|
||||
const char kContextualSearchSecondTapDescription[] =
|
||||
"Enables triggering on a second tap gesture even when Ranker would "
|
||||
"normally suppress that tap.";
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -715,6 +715,9 @@ extern const char kEnableWasmLazyCompilationName[];
|
||||
@@ -689,6 +689,9 @@ extern const char kEnableWasmLazyCompilationName[];
|
||||
extern const char kEnableWasmLazyCompilationDescription[];
|
||||
|
||||
extern const char kEnableWasmTieringName[];
|
||||
@@ -87,7 +88,7 @@ diff --git a/components/subresource_filter/tools/BUILD.gn b/components/subresour
|
||||
diff --git a/components/url_formatter/spoof_checks/top_domains/BUILD.gn b/components/url_formatter/spoof_checks/top_domains/BUILD.gn
|
||||
--- a/components/url_formatter/spoof_checks/top_domains/BUILD.gn
|
||||
+++ b/components/url_formatter/spoof_checks/top_domains/BUILD.gn
|
||||
@@ -89,7 +89,8 @@ executable("make_top_domain_list_variables") {
|
||||
@@ -73,7 +73,8 @@ executable("make_top_domain_list_variables") {
|
||||
"//base:i18n",
|
||||
"//components/url_formatter/spoof_checks/common_words:common",
|
||||
"//third_party/icu",
|
||||
@@ -100,7 +101,7 @@ diff --git a/components/url_formatter/spoof_checks/top_domains/BUILD.gn b/compon
|
||||
diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
|
||||
--- a/net/dns/host_resolver_manager.cc
|
||||
+++ b/net/dns/host_resolver_manager.cc
|
||||
@@ -104,6 +104,7 @@
|
||||
@@ -86,6 +86,7 @@
|
||||
#include "net/log/net_log_event_type.h"
|
||||
#include "net/log/net_log_source.h"
|
||||
#include "net/log/net_log_source_type.h"
|
||||
@@ -108,7 +109,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
|
||||
#include "net/log/net_log_with_source.h"
|
||||
#include "net/socket/client_socket_factory.h"
|
||||
#include "net/socket/datagram_client_socket.h"
|
||||
@@ -4129,8 +4130,14 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) {
|
||||
@@ -3512,8 +3513,14 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) {
|
||||
if (last_ipv6_probe_time_.is_null() ||
|
||||
(tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
|
||||
kIPv6ProbePeriodMs) {
|
||||
@@ -127,7 +128,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
|
||||
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
|
||||
--- a/services/network/public/cpp/features.cc
|
||||
+++ b/services/network/public/cpp/features.cc
|
||||
@@ -36,6 +36,10 @@ const base::Feature kReporting{"Reporting", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
@@ -42,6 +42,10 @@ const base::Feature kReporting{"Reporting", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
const base::Feature kThrottleDelayable{"ThrottleDelayable",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
@@ -141,14 +142,15 @@ diff --git a/services/network/public/cpp/features.cc b/services/network/public/c
|
||||
diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h
|
||||
--- a/services/network/public/cpp/features.h
|
||||
+++ b/services/network/public/cpp/features.h
|
||||
@@ -18,6 +18,8 @@ extern const base::Feature kExpectCTReporting;
|
||||
@@ -19,6 +19,8 @@ extern const base::Feature kNetworkErrorLogging;
|
||||
COMPONENT_EXPORT(NETWORK_CPP)
|
||||
extern const base::Feature kNetworkErrorLogging;
|
||||
extern const base::Feature kNetworkService;
|
||||
COMPONENT_EXPORT(NETWORK_CPP)
|
||||
+extern const base::Feature kIPv6Probing;
|
||||
+COMPONENT_EXPORT(NETWORK_CPP)
|
||||
extern const base::Feature kReporting;
|
||||
COMPONENT_EXPORT(NETWORK_CPP)
|
||||
extern const base::Feature kThrottleDelayable;
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 16 Nov 2019 11:18:09 +0100
|
||||
Subject: Add flag to disable WebGL
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 3 +++
|
||||
chrome/browser/flag_descriptions.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -2643,6 +2643,9 @@ const FeatureEntry::FeatureVariation kReadLaterVariations[] = {
|
||||
// When adding a new choice, add it to the end of the list.
|
||||
const FeatureEntry kFeatureEntries[] = {
|
||||
// Include generated flags for flag unexpiry; see //docs/flag_expiry.md and
|
||||
+ {switches::kDisableWebGL, flag_descriptions::kDisableWebGLName,
|
||||
+ flag_descriptions::kDisableWebGLDescription, kOsAll,
|
||||
+ SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebGL)},
|
||||
// //tools/flags/generate_unexpire_flags.py.
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/browser/unexpire_flags_gen.inc"
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -613,6 +613,10 @@ const char kEnableAudioFocusEnforcementName[] = "Audio Focus Enforcement";
|
||||
const char kEnableAudioFocusEnforcementDescription[] =
|
||||
"Enables enforcement of a single media session having audio focus at "
|
||||
"any one time. Requires #enable-media-session-service to be enabled too.";
|
||||
+const char kDisableWebGLName[] = "WebGL";
|
||||
+
|
||||
+const char kDisableWebGLDescription[] = "Enable or disable all versions of WebGL";
|
||||
+
|
||||
|
||||
const char kEnableAutofillAccountWalletStorageName[] =
|
||||
"Enable the account data storage for autofill";
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -341,6 +341,9 @@ extern const char kForceColorProfileSRGB[];
|
||||
extern const char kForceColorProfileP3[];
|
||||
extern const char kForceColorProfileColorSpin[];
|
||||
extern const char kForceColorProfileSCRGBLinear[];
|
||||
+extern const char kDisableWebGLName[];
|
||||
+extern const char kDisableWebGLDescription[];
|
||||
+
|
||||
extern const char kForceColorProfileHDR10[];
|
||||
|
||||
extern const char kForceColorProfileName[];
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -11,10 +11,10 @@ Subject: Add flag to disable external intent requests
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -3148,6 +3148,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName,
|
||||
flag_descriptions::kUiPartialSwapDescription, kOsAll,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
|
||||
@@ -2697,6 +2697,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kWebrtcCaptureMultiChannelApmName,
|
||||
flag_descriptions::kWebrtcCaptureMultiChannelApmDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kWebRtcEnableCaptureMultiChannelApm)},
|
||||
+ {"disable-external-intent-requests", flag_descriptions::kDisableExternalIntentRequestsName,
|
||||
+ flag_descriptions::kDisableExternalIntentRequestsDescription, kOsAll,
|
||||
+ SINGLE_DISABLE_VALUE_TYPE("disable-external-intent-requests")},
|
||||
@@ -24,9 +24,9 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -3391,6 +3391,12 @@ const char kPhotoPickerVideoSupportName[] = "Photo Picker Video Support";
|
||||
const char kPhotoPickerVideoSupportDescription[] =
|
||||
"Enables video files to be shown in the Photo Picker dialog";
|
||||
@@ -3272,6 +3272,12 @@ const char kProcessSharingWithStrictSiteInstancesDescription[] =
|
||||
"separated like strict site isolation, but process selection puts multiple "
|
||||
"site instances in a single process.";
|
||||
|
||||
+const char kDisableExternalIntentRequestsName[] =
|
||||
+ "Never forward URL requests to external intents";
|
||||
@@ -40,9 +40,9 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -1938,6 +1938,9 @@ extern const char kQueryTilesDescription[];
|
||||
extern const char kQueryTilesNTPName[];
|
||||
extern const char kQueryTilesNTPDescription[];
|
||||
@@ -1883,6 +1883,9 @@ extern const char kQueryTilesNTPDescription[];
|
||||
extern const char kQueryTilesOmniboxName[];
|
||||
extern const char kQueryTilesOmniboxDescription[];
|
||||
extern const char kQueryTilesSingleTierName[];
|
||||
+extern const char kDisableExternalIntentRequestsName[];
|
||||
+extern const char kDisableExternalIntentRequestsDescription[];
|
||||
@@ -50,5 +50,6 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
||||
extern const char kQueryTilesSingleTierDescription[];
|
||||
extern const char kQueryTilesEnableQueryEditingName[];
|
||||
extern const char kQueryTilesEnableQueryEditingDescription[];
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 18 Oct 2021 20:50:48 +0200
|
||||
Subject: Add flag to disable pull to refresh effect
|
||||
|
||||
---
|
||||
chrome/browser/about_flags.cc | 6 ++++++
|
||||
chrome/browser/flag_descriptions.cc | 6 ++++++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
3 files changed, 15 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -7477,6 +7477,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kPrivacyReviewDescription, kOsDesktop | kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(features::kPrivacyReview)},
|
||||
|
||||
+#if defined(OS_ANDROID)
|
||||
+ {switches::kDisablePullToRefreshEffect, flag_descriptions::kDisablePullToRefreshEffectName,
|
||||
+ flag_descriptions::kDisablePullToRefreshEffectDescription, kOsAndroid,
|
||||
+ SINGLE_VALUE_TYPE(switches::kDisablePullToRefreshEffect)},
|
||||
+#endif
|
||||
+
|
||||
#if defined(OS_ANDROID)
|
||||
{"google-mobile-services-passwords",
|
||||
flag_descriptions::kUnifiedPasswordManagerAndroidName,
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -1451,6 +1451,12 @@ const char kIncognitoClearBrowsingDataDialogForDesktopDescription[] =
|
||||
"When enabled, clear browsing data option would be enabled in Incognito "
|
||||
"which upon clicking would show a dialog to close all Incognito windows.";
|
||||
|
||||
+const char kDisablePullToRefreshEffectName[] =
|
||||
+ "Disable the pull-to-refresh effect when vertically overscrolling content.";
|
||||
+const char kDisablePullToRefreshEffectDescription[] =
|
||||
+ "Disable the pull-to-refresh effect with the elastic overscroll feature "
|
||||
+ "used to indicate that the user is scrolling beyond the range of the scrollable area.";
|
||||
+
|
||||
const char kUpdateHistoryEntryPointsInIncognitoName[] =
|
||||
"Update history entry points in Incognito.";
|
||||
const char kUpdateHistoryEntryPointsInIncognitoDescription[] =
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -564,6 +564,9 @@ extern const char kDiagnosticsAppDescription[];
|
||||
extern const char kDiagnosticsAppNavigationName[];
|
||||
extern const char kDiagnosticsAppNavigationDescription[];
|
||||
|
||||
+extern const char kDisablePullToRefreshEffectName[];
|
||||
+extern const char kDisablePullToRefreshEffectDescription[];
|
||||
+
|
||||
extern const char kDisableKeepaliveFetchName[];
|
||||
extern const char kDisableKeepaliveFetchDescription[];
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -5,9 +5,9 @@ Subject: Add flag to disable vibration
|
||||
---
|
||||
chrome/browser/about_flags.cc | 4 ++++
|
||||
chrome/browser/flag_descriptions.cc | 3 +++
|
||||
chrome/browser/flag_descriptions.h | 2 ++
|
||||
chrome/browser/flag_descriptions.h | 3 +++
|
||||
content/child/runtime_features.cc | 1 +
|
||||
content/public/common/content_features.cc | 4 ++++
|
||||
content/public/common/content_features.cc | 3 +++
|
||||
content/public/common/content_features.h | 2 ++
|
||||
third_party/blink/public/platform/web_runtime_features.h | 1 +
|
||||
.../blink/renderer/modules/vibration/vibration_controller.cc | 3 +++
|
||||
@@ -18,7 +18,7 @@ Subject: Add flag to disable vibration
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -6670,6 +6670,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -6207,6 +6207,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kNewMacNotificationAPI)},
|
||||
#endif
|
||||
|
||||
@@ -32,69 +32,69 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -5608,6 +5608,9 @@ const char kDefaultCalculatorWebAppDescription[] =
|
||||
"chrome app.";
|
||||
@@ -5127,6 +5127,9 @@ const char kDefaultMeetWebAppDescription[] =
|
||||
"Enables the Meet web app to be installed by default.";
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
|
||||
+const char kEnableVibrationName[] = "Vibration";
|
||||
+const char kEnableVibrationDescription[] = "Enable vibration API; an user gesture will still be needed.";
|
||||
+
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#if defined(OS_CHROMEOS)
|
||||
const char kDeprecateLowUsageCodecsName[] = "Deprecates low usage media codecs";
|
||||
const char kDeprecateLowUsageCodecsDescription[] =
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -3406,6 +3406,8 @@ extern const char kWebUITabStripTabDragIntegrationName[];
|
||||
extern const char kWebUITabStripTabDragIntegrationDescription[];
|
||||
#endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) && BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -2968,6 +2968,9 @@ extern const char kDefaultMeetWebAppName[];
|
||||
extern const char kDefaultMeetWebAppDescription[];
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
|
||||
+extern const char kEnableVibrationName[];
|
||||
+extern const char kEnableVibrationDescription[];
|
||||
#if defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID)
|
||||
|
||||
extern const char kAutofillCreditCardUploadName[];
|
||||
+
|
||||
#if defined(OS_CHROMEOS)
|
||||
extern const char kDeprecateLowUsageCodecsName[];
|
||||
extern const char kDeprecateLowUsageCodecsDescription[];
|
||||
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
|
||||
--- a/content/child/runtime_features.cc
|
||||
+++ b/content/child/runtime_features.cc
|
||||
@@ -100,6 +100,7 @@ void SetRuntimeFeatureDefaultsForPlatform(
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
@@ -102,6 +102,7 @@ void SetRuntimeFeatureDefaultsForPlatform(
|
||||
#if defined(OS_ANDROID)
|
||||
if (command_line.HasSwitch(switches::kDisableMediaSessionAPI))
|
||||
WebRuntimeFeatures::EnableMediaSession(false);
|
||||
+ WebRuntimeFeatures::EnableVibration(base::FeatureList::IsEnabled(features::kVibration));
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#if defined(OS_ANDROID)
|
||||
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
|
||||
--- a/content/public/common/content_features.cc
|
||||
+++ b/content/public/common/content_features.cc
|
||||
@@ -121,6 +121,10 @@ const base::Feature kBackForwardCacheMemoryControls {
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -103,6 +103,9 @@ const base::Feature kBackForwardCacheSameSiteForBots{
|
||||
// BackForwardCacheMemoryControls is enabled only on Android to disable
|
||||
// BackForwardCache for lower memory devices due to memory limiations.
|
||||
#if defined(OS_ANDROID)
|
||||
+// Enables vibration; an user gesture will still be required if enabled.
|
||||
+const base::Feature kVibration{"Vibration",
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+
|
||||
// When this feature is enabled, private network requests initiated from
|
||||
// non-secure contexts in the `public` address space are blocked.
|
||||
//
|
||||
const base::Feature kBackForwardCacheMemoryControls{
|
||||
"BackForwardCacheMemoryControls", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
#else
|
||||
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
|
||||
--- a/content/public/common/content_features.h
|
||||
+++ b/content/public/common/content_features.h
|
||||
@@ -318,6 +318,8 @@ CONTENT_EXPORT extern const base::FeatureParam<base::TimeDelta>
|
||||
kCompositorLockTimeout;
|
||||
@@ -266,6 +266,8 @@ CONTENT_EXPORT extern const base::Feature kWarmUpNetworkProcess;
|
||||
CONTENT_EXPORT extern const base::Feature kWebNfc;
|
||||
#endif // defined(OS_ANDROID)
|
||||
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
+CONTENT_EXPORT extern const base::Feature kVibration;
|
||||
+
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#if defined(OS_MAC)
|
||||
CONTENT_EXPORT extern const base::Feature kDeviceMonitorMac;
|
||||
CONTENT_EXPORT extern const base::Feature kIOSurfaceCapturer;
|
||||
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h
|
||||
--- a/third_party/blink/public/platform/web_runtime_features.h
|
||||
+++ b/third_party/blink/public/platform/web_runtime_features.h
|
||||
@@ -87,6 +87,7 @@ class WebRuntimeFeatures {
|
||||
@@ -90,6 +90,7 @@ class WebRuntimeFeatures {
|
||||
BLINK_PLATFORM_EXPORT static void EnableBlockingFocusWithoutUserActivation(
|
||||
bool);
|
||||
BLINK_PLATFORM_EXPORT static void EnableCacheInlineScriptCode(bool);
|
||||
@@ -125,7 +125,7 @@ diff --git a/third_party/blink/renderer/modules/vibration/vibration_controller.c
|
||||
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
|
||||
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
|
||||
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
|
||||
@@ -164,6 +164,10 @@ void WebRuntimeFeatures::EnableScrollTopLeftInterop(bool enable) {
|
||||
@@ -182,6 +182,10 @@ void WebRuntimeFeatures::EnableScrollTopLeftInterop(bool enable) {
|
||||
RuntimeEnabledFeatures::SetScrollTopLeftInteropEnabled(enable);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.c
|
||||
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -1668,6 +1668,10 @@
|
||||
@@ -1537,6 +1537,10 @@
|
||||
name: "OrientationEvent",
|
||||
status: {"Android": "stable"},
|
||||
},
|
||||
@@ -150,5 +150,6 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
{
|
||||
name: "OriginIsolationHeader",
|
||||
status: "stable",
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,28 +3,28 @@ Date: Thu, 18 Feb 2021 21:22:52 +0100
|
||||
Subject: Add menu item to bookmark all tabs
|
||||
|
||||
---
|
||||
chrome/android/java/res/menu/main_menu.xml | 7 +++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 26 ++++++++
|
||||
.../browser/bookmarks/BookmarkBridge.java | 60 +++++++++++++++++++
|
||||
chrome/android/java/res/menu/main_menu.xml | 7 ++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 26 +++++++
|
||||
.../browser/bookmarks/BookmarkBridge.java | 71 +++++++++++++++++--
|
||||
.../browser/bookmarks/BookmarkUtils.java | 4 ++
|
||||
.../android/bookmarks/bookmark_bridge.cc | 17 ++++++
|
||||
.../android/bookmarks/bookmark_bridge.cc | 17 +++++
|
||||
.../android/bookmarks/bookmark_bridge.h | 4 ++
|
||||
.../browser/bookmarks/bookmark_html_writer.cc | 8 ++-
|
||||
.../bookmarks/chrome_bookmark_client.cc | 2 +
|
||||
.../dialogs/DownloadLocationCustomView.java | 4 +-
|
||||
.../strings/android_chrome_strings.grd | 3 +
|
||||
components/bookmark_bar_strings.grdp | 6 ++
|
||||
.../bookmarks/browser/bookmark_codec.cc | 24 ++++++--
|
||||
components/bookmarks/browser/bookmark_codec.h | 7 ++-
|
||||
.../bookmarks/browser/bookmark_codec.cc | 24 +++++--
|
||||
components/bookmarks/browser/bookmark_codec.h | 7 +-
|
||||
.../browser/bookmark_load_details.cc | 4 ++
|
||||
.../bookmarks/browser/bookmark_load_details.h | 2 +
|
||||
.../bookmarks/browser/bookmark_model.cc | 3 +-
|
||||
components/bookmarks/browser/bookmark_model.h | 7 +++
|
||||
components/bookmarks/browser/bookmark_node.cc | 15 +++++
|
||||
components/bookmarks/browser/bookmark_model.h | 7 ++
|
||||
components/bookmarks/browser/bookmark_node.cc | 15 ++++
|
||||
components/bookmarks/browser/bookmark_node.h | 5 ++
|
||||
components/bookmarks/browser/model_loader.cc | 3 +-
|
||||
.../bookmark_specifics_conversions.cc | 1 +
|
||||
21 files changed, 202 insertions(+), 10 deletions(-)
|
||||
21 files changed, 208 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml
|
||||
--- a/chrome/android/java/res/menu/main_menu.xml
|
||||
@@ -40,7 +40,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
|
||||
<item android:id="@+id/recent_tabs_menu_id"
|
||||
android:title="@string/menu_recent_tabs"
|
||||
android:icon="@drawable/devices_black_24dp" />
|
||||
@@ -181,6 +185,9 @@
|
||||
@@ -147,6 +151,9 @@
|
||||
<item android:id="@+id/menu_group_tabs"
|
||||
android:title="@string/menu_group_tabs"
|
||||
android:icon="@drawable/ic_widgets" />
|
||||
@@ -53,7 +53,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
@@ -69,6 +69,8 @@ import org.chromium.chrome.browser.app.tabmodel.ChromeNextTabPolicySupplier;
|
||||
@@ -68,6 +68,8 @@ import org.chromium.chrome.browser.app.tabmodel.ChromeNextTabPolicySupplier;
|
||||
import org.chromium.chrome.browser.app.tabmodel.TabModelOrchestrator;
|
||||
import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton;
|
||||
import org.chromium.chrome.browser.app.tabmodel.TabbedModeTabModelOrchestrator;
|
||||
@@ -62,16 +62,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkUtils;
|
||||
import org.chromium.chrome.browser.browserservices.intents.WebappConstants;
|
||||
import org.chromium.chrome.browser.compositor.CompositorViewHolder;
|
||||
@@ -2150,6 +2152,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
CloseAllTabsDialog.show(this, getModalDialogManagerSupplier(),
|
||||
() -> getTabModelSelector().closeAllTabs(), /*isIncognito=*/false);
|
||||
@@ -2020,6 +2022,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
// Close both incognito and normal tabs
|
||||
getTabModelSelector().closeAllTabs();
|
||||
RecordUserAction.record("MobileMenuCloseAllTabs");
|
||||
+ } else if (id == R.id.bookmark_all_tabs_menu_id) {
|
||||
+ bookmarkAllTabs();
|
||||
} else if (id == R.id.close_all_incognito_tabs_menu_id) {
|
||||
// Close only incognito tabs
|
||||
CloseAllTabsDialog.show(this, getModalDialogManagerSupplier(),
|
||||
@@ -2202,6 +2206,28 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
getTabModelSelector().getModel(true).closeAllTabs();
|
||||
@@ -2069,6 +2073,28 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
mTabModalHandler.onOmniboxFocusChanged(hasFocus);
|
||||
}
|
||||
|
||||
@@ -103,17 +103,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
|
||||
@@ -29,6 +29,7 @@ import com.google.common.primitives.UnsignedLongs;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
package org.chromium.chrome.browser.bookmarks;
|
||||
|
||||
+import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -24,6 +25,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import org.chromium.base.ContextUtils;
|
||||
+import org.chromium.base.Log;
|
||||
import org.chromium.base.ObserverList;
|
||||
import org.chromium.base.ThreadUtils;
|
||||
import org.chromium.base.annotations.CalledByNative;
|
||||
@@ -46,6 +47,10 @@ import org.chromium.chrome.browser.subscriptions.CommerceSubscription;
|
||||
import org.chromium.chrome.browser.subscriptions.CommerceSubscriptionsServiceFactory;
|
||||
import org.chromium.chrome.browser.subscriptions.SubscriptionsManager;
|
||||
@@ -32,6 +34,10 @@ import org.chromium.base.metrics.RecordHistogram;
|
||||
import org.chromium.chrome.browser.partnerbookmarks.PartnerBookmarksShim;
|
||||
import org.chromium.chrome.browser.profiles.Profile;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
+import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar;
|
||||
+import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
|
||||
@@ -121,16 +129,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+import org.chromium.chrome.R;
|
||||
import org.chromium.components.bookmarks.BookmarkId;
|
||||
import org.chromium.components.bookmarks.BookmarkType;
|
||||
import org.chromium.components.commerce.PriceTracking.ProductPrice;
|
||||
@@ -90,6 +95,7 @@ import java.io.File;
|
||||
import org.chromium.components.url_formatter.SchemeDisplay;
|
||||
@@ -72,6 +78,7 @@ import java.io.File;
|
||||
* bookmark model stored in native.
|
||||
*/
|
||||
public class BookmarkBridge {
|
||||
+ private static final String TAG = "BookmarkBridge";
|
||||
private final Profile mProfile;
|
||||
private boolean mIsDestroyed;
|
||||
private boolean mIsDoingExtensiveChanges;
|
||||
@@ -633,6 +639,16 @@ public class BookmarkBridge {
|
||||
private long mNativeBookmarkBridge;
|
||||
@@ -553,6 +560,16 @@ public class BookmarkBridge {
|
||||
mNativeBookmarkBridge, BookmarkBridge.this);
|
||||
}
|
||||
|
||||
@@ -147,16 +155,36 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
/**
|
||||
* @return Id representing the special "other" folder from bookmark model.
|
||||
*/
|
||||
@@ -1358,6 +1374,49 @@ public class BookmarkBridge {
|
||||
@@ -770,14 +787,14 @@ public class BookmarkBridge {
|
||||
if (mDialogModel != null) return;
|
||||
|
||||
// Actually show the dialog.
|
||||
- mCustomView = (DownloadLocationCustomView) LayoutInflater.from(mContext).inflate(
|
||||
+ mCustomView = (DownloadLocationCustomView) LayoutInflater.from(context).inflate(
|
||||
R.layout.download_location_dialog, null);
|
||||
- mCustomView.initialize(
|
||||
- DownloadLocationDialogType.DEFAULT, new File(standardBoorkmarkName),
|
||||
- /*totalBytes*/ 0, context.getString(R.string.export_bookmarks_alert_title));
|
||||
+ mCustomView.initialize(DownloadLocationDialogType.DEFAULT, /*totalBytes*/ 0);
|
||||
+ mCustomView.setTitle(context.getString(R.string.export_bookmarks_alert_title));
|
||||
+ mCustomView.setFileName(standardBoorkmarkName);
|
||||
mCustomView.mDontShowAgain.setVisibility(View.GONE);
|
||||
|
||||
- Resources resources = mContext.getResources();
|
||||
+ Resources resources = context.getResources();
|
||||
mDialogModel = new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
|
||||
.with(ModalDialogProperties.CONTROLLER, this)
|
||||
.with(ModalDialogProperties.CUSTOM_VIEW, mCustomView)
|
||||
@@ -1099,6 +1116,49 @@ public class BookmarkBridge {
|
||||
mNativeBookmarkBridge, BookmarkBridge.this, title, url);
|
||||
}
|
||||
|
||||
+ // Used to bookmark all tabs in a specific folder, created if not existing
|
||||
+ public BookmarkId addToTabsCollection(Context context, Tab tab) {
|
||||
+ BookmarkId parent = getTabsCollectionFolderId();
|
||||
+ BookmarkId existingId = getUserBookmarkIdForTab(tab);
|
||||
+ if (existingId != null && existingId.getId() != BookmarkId.INVALID_ID) {
|
||||
+ BookmarkId existingBookmarkId = new BookmarkId(existingId.getId(), BookmarkType.NORMAL);
|
||||
+ long existingId = getUserBookmarkIdForTab(tab);
|
||||
+ if (existingId != BookmarkId.INVALID_ID) {
|
||||
+ BookmarkId existingBookmarkId = new BookmarkId(existingId, BookmarkType.NORMAL);
|
||||
+ BookmarkItem existingBookmark = getBookmarkById(existingBookmarkId);
|
||||
+ if (parent.equals(existingBookmark.getParentId())) {
|
||||
+ // bookmark already exists in the tabs collection folder
|
||||
@@ -197,7 +225,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
/**
|
||||
* @param url The URL of the reading list item.
|
||||
* @return The reading list item with the URL, or null if no such reading list item.
|
||||
@@ -1655,6 +1714,7 @@ public class BookmarkBridge {
|
||||
@@ -1355,6 +1415,7 @@ public class BookmarkBridge {
|
||||
void getAllFoldersWithDepths(long nativeBookmarkBridge, BookmarkBridge caller,
|
||||
List<BookmarkId> folderList, List<Integer> depthList);
|
||||
BookmarkId getRootFolderId(long nativeBookmarkBridge, BookmarkBridge caller);
|
||||
@@ -208,7 +236,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java
|
||||
@@ -633,6 +633,7 @@ public class BookmarkUtils {
|
||||
@@ -516,6 +516,7 @@ public class BookmarkUtils {
|
||||
List<BookmarkId> topLevelFolders = new ArrayList<>();
|
||||
BookmarkId desktopNodeId = bookmarkModel.getDesktopFolderId();
|
||||
BookmarkId mobileNodeId = bookmarkModel.getMobileFolderId();
|
||||
@@ -216,7 +244,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
BookmarkId othersNodeId = bookmarkModel.getOtherFolderId();
|
||||
|
||||
List<BookmarkId> specialFoldersIds =
|
||||
@@ -658,6 +659,9 @@ public class BookmarkUtils {
|
||||
@@ -541,6 +542,9 @@ public class BookmarkUtils {
|
||||
if (bookmarkModel.isFolderVisible(mobileNodeId)) {
|
||||
topLevelFolders.add(mobileNodeId);
|
||||
}
|
||||
@@ -229,7 +257,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browser/android/bookmarks/bookmark_bridge.cc
|
||||
--- a/chrome/browser/android/bookmarks/bookmark_bridge.cc
|
||||
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.cc
|
||||
@@ -434,6 +434,11 @@ void BookmarkBridge::GetTopLevelFolderIDs(
|
||||
@@ -424,6 +424,11 @@ void BookmarkBridge::GetTopLevelFolderIDs(
|
||||
top_level_folders.push_back(node.get());
|
||||
}
|
||||
|
||||
@@ -241,7 +269,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
for (const auto& node : bookmark_model_->bookmark_bar_node()->children()) {
|
||||
if (node->is_folder())
|
||||
top_level_folders.push_back(node.get());
|
||||
@@ -482,6 +487,7 @@ void BookmarkBridge::GetAllFoldersWithDepths(
|
||||
@@ -462,6 +467,7 @@ void BookmarkBridge::GetAllFoldersWithDepths(
|
||||
// Vector to temporarily contain all child bookmarks at same level for sorting
|
||||
std::vector<const BookmarkNode*> bookmarks = {
|
||||
bookmark_model_->mobile_node(),
|
||||
@@ -249,7 +277,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
bookmark_model_->bookmark_bar_node(),
|
||||
bookmark_model_->other_node(),
|
||||
};
|
||||
@@ -536,6 +542,17 @@ ScopedJavaLocalRef<jobject> BookmarkBridge::GetMobileFolderId(
|
||||
@@ -516,6 +522,17 @@ ScopedJavaLocalRef<jobject> BookmarkBridge::GetMobileFolderId(
|
||||
return folder_id_obj;
|
||||
}
|
||||
|
||||
@@ -270,7 +298,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser/android/bookmarks/bookmark_bridge.h
|
||||
--- a/chrome/browser/android/bookmarks/bookmark_bridge.h
|
||||
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.h
|
||||
@@ -121,6 +121,10 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -110,6 +110,10 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
JNIEnv* env,
|
||||
const base::android::JavaParamRef<jobject>& obj);
|
||||
|
||||
@@ -284,7 +312,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc
|
||||
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc
|
||||
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc
|
||||
@@ -190,6 +190,8 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
|
||||
@@ -186,6 +186,8 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
|
||||
roots->FindDictKey(BookmarkCodec::kOtherBookmarkFolderNameKey);
|
||||
base::Value* mobile_folder_value =
|
||||
roots->FindDictKey(BookmarkCodec::kMobileBookmarkFolderNameKey);
|
||||
@@ -293,7 +321,7 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b
|
||||
DCHECK(root_folder_value);
|
||||
DCHECK(other_folder_value);
|
||||
DCHECK(mobile_folder_value);
|
||||
@@ -201,7 +203,9 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
|
||||
@@ -197,7 +199,9 @@ class Writer : public base::RefCountedThreadSafe<Writer> {
|
||||
!WriteNode(*static_cast<base::DictionaryValue*>(other_folder_value),
|
||||
BookmarkNode::OTHER_NODE) ||
|
||||
!WriteNode(*static_cast<base::DictionaryValue*>(mobile_folder_value),
|
||||
@@ -304,7 +332,7 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b
|
||||
NotifyOnFinish(BookmarksExportObserver::Result::kCouldNotWriteNodes);
|
||||
return;
|
||||
}
|
||||
@@ -466,6 +470,8 @@ void BookmarkFaviconFetcher::ExportBookmarks() {
|
||||
@@ -464,6 +468,8 @@ void BookmarkFaviconFetcher::ExportBookmarks() {
|
||||
BookmarkModelFactory::GetForBrowserContext(profile_)->other_node());
|
||||
ExtractUrls(
|
||||
BookmarkModelFactory::GetForBrowserContext(profile_)->mobile_node());
|
||||
@@ -316,7 +344,7 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b
|
||||
diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.cc b/chrome/browser/bookmarks/chrome_bookmark_client.cc
|
||||
--- a/chrome/browser/bookmarks/chrome_bookmark_client.cc
|
||||
+++ b/chrome/browser/bookmarks/chrome_bookmark_client.cc
|
||||
@@ -117,6 +117,8 @@ bool ChromeBookmarkClient::IsPermanentNodeVisibleWhenEmpty(
|
||||
@@ -105,6 +105,8 @@ bool ChromeBookmarkClient::IsPermanentNodeVisibleWhenEmpty(
|
||||
return !is_mobile;
|
||||
case bookmarks::BookmarkNode::MOBILE:
|
||||
return is_mobile;
|
||||
@@ -328,7 +356,7 @@ diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.cc b/chrome/browser
|
||||
diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java
|
||||
--- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java
|
||||
+++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java
|
||||
@@ -79,7 +79,7 @@ public class DownloadLocationCustomView
|
||||
@@ -75,7 +75,7 @@ public class DownloadLocationCustomView
|
||||
mDirectoryAdapter.update();
|
||||
}
|
||||
|
||||
@@ -337,7 +365,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
||||
mTitle.setText(title);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class DownloadLocationCustomView
|
||||
@@ -83,7 +83,7 @@ public class DownloadLocationCustomView
|
||||
mSubtitleView.setText(subtitle);
|
||||
}
|
||||
|
||||
@@ -349,7 +377,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -3414,6 +3414,9 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -3224,6 +3224,9 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_MENU_TRACK_PRICES" desc="Menu item for tracking prices on tabs. [CHAR_LIMIT=27]">
|
||||
Track prices
|
||||
</message>
|
||||
@@ -385,7 +413,7 @@ diff --git a/components/bookmark_bar_strings.grdp b/components/bookmark_bar_stri
|
||||
diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmarks/browser/bookmark_codec.cc
|
||||
--- a/components/bookmarks/browser/bookmark_codec.cc
|
||||
+++ b/components/bookmarks/browser/bookmark_codec.cc
|
||||
@@ -34,6 +34,7 @@ const char BookmarkCodec::kBookmarkBarFolderNameKey[] = "bookmark_bar";
|
||||
@@ -33,6 +33,7 @@ const char BookmarkCodec::kRootFolderNameKey[] = "bookmark_bar";
|
||||
const char BookmarkCodec::kOtherBookmarkFolderNameKey[] = "other";
|
||||
// The value is left as 'synced' for historical reasons.
|
||||
const char BookmarkCodec::kMobileBookmarkFolderNameKey[] = "synced";
|
||||
@@ -393,33 +421,33 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar
|
||||
const char BookmarkCodec::kVersionKey[] = "version";
|
||||
const char BookmarkCodec::kChecksumKey[] = "checksum";
|
||||
const char BookmarkCodec::kIdKey[] = "id";
|
||||
@@ -75,7 +76,8 @@ BookmarkCodec::~BookmarkCodec() = default;
|
||||
@@ -62,7 +63,8 @@ BookmarkCodec::~BookmarkCodec() = default;
|
||||
base::Value BookmarkCodec::Encode(BookmarkModel* model,
|
||||
std::string sync_metadata_str) {
|
||||
const std::string& sync_metadata_str) {
|
||||
return Encode(model->bookmark_bar_node(), model->other_node(),
|
||||
- model->mobile_node(), model->root_node()->GetMetaInfoMap(),
|
||||
+ model->mobile_node(), model->tabs_collection_node(),
|
||||
+ model->root_node()->GetMetaInfoMap(),
|
||||
std::move(sync_metadata_str));
|
||||
sync_metadata_str);
|
||||
}
|
||||
|
||||
@@ -83,6 +85,7 @@ base::Value BookmarkCodec::Encode(
|
||||
@@ -70,6 +72,7 @@ base::Value BookmarkCodec::Encode(
|
||||
const BookmarkNode* bookmark_bar_node,
|
||||
const BookmarkNode* other_folder_node,
|
||||
const BookmarkNode* mobile_folder_node,
|
||||
+ const BookmarkNode* tabs_folder_node,
|
||||
const BookmarkNode::MetaInfoMap* model_meta_info_map,
|
||||
std::string sync_metadata_str) {
|
||||
const std::string& sync_metadata_str) {
|
||||
ids_reassigned_ = false;
|
||||
@@ -104,6 +107,7 @@ base::Value BookmarkCodec::Encode(
|
||||
roots.SetKey(kBookmarkBarFolderNameKey, EncodeNode(bookmark_bar_node));
|
||||
@@ -79,6 +82,7 @@ base::Value BookmarkCodec::Encode(
|
||||
roots.SetKey(kRootFolderNameKey, EncodeNode(bookmark_bar_node));
|
||||
roots.SetKey(kOtherBookmarkFolderNameKey, EncodeNode(other_folder_node));
|
||||
roots.SetKey(kMobileBookmarkFolderNameKey, EncodeNode(mobile_folder_node));
|
||||
+ roots.SetKey(kTabsBookmarkFolderNameKey, EncodeNode(tabs_folder_node));
|
||||
if (model_meta_info_map)
|
||||
roots.SetKey(kMetaInfo, EncodeMetaInfo(*model_meta_info_map));
|
||||
FinalizeChecksum();
|
||||
@@ -120,6 +124,7 @@ bool BookmarkCodec::Decode(const base::Value& value,
|
||||
base::Value main(base::Value::Type::DICTIONARY);
|
||||
@@ -102,6 +106,7 @@ bool BookmarkCodec::Decode(const base::Value& value,
|
||||
BookmarkNode* bb_node,
|
||||
BookmarkNode* other_folder_node,
|
||||
BookmarkNode* mobile_folder_node,
|
||||
@@ -427,7 +455,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar
|
||||
int64_t* max_id,
|
||||
std::string* sync_metadata_str) {
|
||||
ids_.clear();
|
||||
@@ -127,7 +132,8 @@ bool BookmarkCodec::Decode(const base::Value& value,
|
||||
@@ -109,7 +114,8 @@ bool BookmarkCodec::Decode(const base::Value& value,
|
||||
base::GUID::ParseLowercase(BookmarkNode::kBookmarkBarNodeGuid),
|
||||
base::GUID::ParseLowercase(BookmarkNode::kOtherBookmarksNodeGuid),
|
||||
base::GUID::ParseLowercase(BookmarkNode::kMobileBookmarksNodeGuid),
|
||||
@@ -437,7 +465,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar
|
||||
ids_reassigned_ = false;
|
||||
guids_reassigned_ = false;
|
||||
ids_valid_ = true;
|
||||
@@ -135,12 +141,13 @@ bool BookmarkCodec::Decode(const base::Value& value,
|
||||
@@ -117,12 +123,13 @@ bool BookmarkCodec::Decode(const base::Value& value,
|
||||
stored_checksum_.clear();
|
||||
InitializeChecksum();
|
||||
bool success = DecodeHelper(bb_node, other_folder_node, mobile_folder_node,
|
||||
@@ -452,7 +480,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar
|
||||
*max_id = maximum_id_ + 1;
|
||||
return success;
|
||||
}
|
||||
@@ -190,6 +197,7 @@ base::Value BookmarkCodec::EncodeMetaInfo(
|
||||
@@ -172,6 +179,7 @@ base::Value BookmarkCodec::EncodeMetaInfo(
|
||||
bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node,
|
||||
BookmarkNode* other_folder_node,
|
||||
BookmarkNode* mobile_folder_node,
|
||||
@@ -460,20 +488,20 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar
|
||||
const base::Value& value,
|
||||
std::string* sync_metadata_str) {
|
||||
if (!value.is_dict())
|
||||
@@ -221,6 +229,12 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node,
|
||||
return false;
|
||||
@@ -203,6 +211,12 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node,
|
||||
DecodeNode(*root_folder_value, nullptr, bb_node);
|
||||
DecodeNode(*other_folder_value, nullptr, other_folder_node);
|
||||
|
||||
DecodeNode(*bb_value, nullptr, bb_node);
|
||||
+ const base::DictionaryValue* tabs_folder_d_value = nullptr;
|
||||
+ const base::Value* tabs_folder_value =
|
||||
+ roots->FindDictKey(kTabsBookmarkFolderNameKey);
|
||||
+ if (tabs_folder_value && tabs_folder_value->GetAsDictionary(&tabs_folder_d_value))
|
||||
+ DecodeNode(*tabs_folder_d_value, nullptr, tabs_folder_node);
|
||||
+
|
||||
DecodeNode(*other_folder_value, nullptr, other_folder_node);
|
||||
DecodeNode(*mobile_folder_value, nullptr, mobile_folder_node);
|
||||
|
||||
@@ -456,11 +470,13 @@ void BookmarkCodec::DecodeMetaInfoHelper(
|
||||
// Fail silently if we can't deserialize mobile bookmarks. We can't require
|
||||
// them to exist in order to be backwards-compatible with older versions of
|
||||
// chrome.
|
||||
@@ -452,11 +466,13 @@ void BookmarkCodec::DecodeMetaInfoHelper(
|
||||
|
||||
void BookmarkCodec::ReassignIDs(BookmarkNode* bb_node,
|
||||
BookmarkNode* other_node,
|
||||
@@ -491,15 +519,15 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar
|
||||
diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmarks/browser/bookmark_codec.h
|
||||
--- a/components/bookmarks/browser/bookmark_codec.h
|
||||
+++ b/components/bookmarks/browser/bookmark_codec.h
|
||||
@@ -48,6 +48,7 @@ class BookmarkCodec {
|
||||
@@ -46,6 +46,7 @@ class BookmarkCodec {
|
||||
base::Value Encode(const BookmarkNode* bookmark_bar_node,
|
||||
const BookmarkNode* other_folder_node,
|
||||
const BookmarkNode* mobile_folder_node,
|
||||
+ const BookmarkNode* tabs_folder_node,
|
||||
const BookmarkNode::MetaInfoMap* model_meta_info_map,
|
||||
std::string sync_metadata_str);
|
||||
const std::string& sync_metadata_str);
|
||||
|
||||
@@ -60,6 +61,7 @@ class BookmarkCodec {
|
||||
@@ -58,6 +59,7 @@ class BookmarkCodec {
|
||||
BookmarkNode* bb_node,
|
||||
BookmarkNode* other_folder_node,
|
||||
BookmarkNode* mobile_folder_node,
|
||||
@@ -507,7 +535,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark
|
||||
int64_t* max_node_id,
|
||||
std::string* sync_metadata_str);
|
||||
|
||||
@@ -105,6 +107,7 @@ class BookmarkCodec {
|
||||
@@ -103,6 +105,7 @@ class BookmarkCodec {
|
||||
// Allows the BookmarkClient to read and a write a string blob from the JSON
|
||||
// file. That string captures the bookmarks sync metadata.
|
||||
static const char kSyncMetadata[];
|
||||
@@ -515,7 +543,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark
|
||||
|
||||
// Possible values for kTypeKey.
|
||||
static const char kTypeURL[];
|
||||
@@ -121,6 +124,7 @@ class BookmarkCodec {
|
||||
@@ -119,6 +122,7 @@ class BookmarkCodec {
|
||||
bool DecodeHelper(BookmarkNode* bb_node,
|
||||
BookmarkNode* other_folder_node,
|
||||
BookmarkNode* mobile_folder_node,
|
||||
@@ -523,7 +551,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark
|
||||
const base::Value& value,
|
||||
std::string* sync_metadata_str);
|
||||
|
||||
@@ -132,7 +136,8 @@ class BookmarkCodec {
|
||||
@@ -130,7 +134,8 @@ class BookmarkCodec {
|
||||
// Reassigns bookmark IDs for all nodes.
|
||||
void ReassignIDs(BookmarkNode* bb_node,
|
||||
BookmarkNode* other_node,
|
||||
@@ -550,7 +578,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/
|
||||
diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/bookmarks/browser/bookmark_load_details.h
|
||||
--- a/components/bookmarks/browser/bookmark_load_details.h
|
||||
+++ b/components/bookmarks/browser/bookmark_load_details.h
|
||||
@@ -43,6 +43,7 @@ class BookmarkLoadDetails {
|
||||
@@ -42,6 +42,7 @@ class BookmarkLoadDetails {
|
||||
BookmarkPermanentNode* bb_node() { return bb_node_; }
|
||||
BookmarkPermanentNode* mobile_folder_node() { return mobile_folder_node_; }
|
||||
BookmarkPermanentNode* other_folder_node() { return other_folder_node_; }
|
||||
@@ -558,10 +586,10 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/b
|
||||
|
||||
TitledUrlIndex* index() { return index_.get(); }
|
||||
std::unique_ptr<TitledUrlIndex> owned_index() { return std::move(index_); }
|
||||
@@ -97,6 +98,7 @@ class BookmarkLoadDetails {
|
||||
raw_ptr<BookmarkPermanentNode> bb_node_ = nullptr;
|
||||
raw_ptr<BookmarkPermanentNode> other_folder_node_ = nullptr;
|
||||
raw_ptr<BookmarkPermanentNode> mobile_folder_node_ = nullptr;
|
||||
@@ -96,6 +97,7 @@ class BookmarkLoadDetails {
|
||||
BookmarkPermanentNode* bb_node_ = nullptr;
|
||||
BookmarkPermanentNode* other_folder_node_ = nullptr;
|
||||
BookmarkPermanentNode* mobile_folder_node_ = nullptr;
|
||||
+ BookmarkPermanentNode* tabs_collection_folder_node_ = nullptr;
|
||||
LoadManagedNodeCallback load_managed_node_callback_;
|
||||
std::unique_ptr<TitledUrlIndex> index_;
|
||||
@@ -569,7 +597,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/b
|
||||
diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc
|
||||
--- a/components/bookmarks/browser/bookmark_model.cc
|
||||
+++ b/components/bookmarks/browser/bookmark_model.cc
|
||||
@@ -565,7 +565,7 @@ bool BookmarkModel::HasBookmarks() {
|
||||
@@ -562,7 +562,7 @@ bool BookmarkModel::HasBookmarks() {
|
||||
bool BookmarkModel::HasNoUserCreatedBookmarksOrFolders() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
return bookmark_bar_node_->children().empty() &&
|
||||
@@ -578,7 +606,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmar
|
||||
}
|
||||
|
||||
bool BookmarkModel::IsBookmarked(const GURL& url) {
|
||||
@@ -807,6 +807,7 @@ void BookmarkModel::DoneLoading(std::unique_ptr<BookmarkLoadDetails> details) {
|
||||
@@ -804,6 +804,7 @@ void BookmarkModel::DoneLoading(std::unique_ptr<BookmarkLoadDetails> details) {
|
||||
bookmark_bar_node_ = details->bb_node();
|
||||
other_node_ = details->other_folder_node();
|
||||
mobile_node_ = details->mobile_folder_node();
|
||||
@@ -589,7 +617,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmar
|
||||
diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h
|
||||
--- a/components/bookmarks/browser/bookmark_model.h
|
||||
+++ b/components/bookmarks/browser/bookmark_model.h
|
||||
@@ -121,6 +121,12 @@ class BookmarkModel : public BookmarkUndoProvider,
|
||||
@@ -116,6 +116,12 @@ class BookmarkModel : public BookmarkUndoProvider,
|
||||
return mobile_node_;
|
||||
}
|
||||
|
||||
@@ -602,11 +630,11 @@ diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmark
|
||||
bool is_root_node(const BookmarkNode* node) const {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
return node == root_;
|
||||
@@ -396,6 +402,7 @@ class BookmarkModel : public BookmarkUndoProvider,
|
||||
raw_ptr<BookmarkPermanentNode> bookmark_bar_node_ = nullptr;
|
||||
raw_ptr<BookmarkPermanentNode> other_node_ = nullptr;
|
||||
raw_ptr<BookmarkPermanentNode> mobile_node_ = nullptr;
|
||||
+ raw_ptr<BookmarkPermanentNode> tabs_collection_node_ = nullptr;
|
||||
@@ -391,6 +397,7 @@ class BookmarkModel : public BookmarkUndoProvider,
|
||||
BookmarkPermanentNode* bookmark_bar_node_ = nullptr;
|
||||
BookmarkPermanentNode* other_node_ = nullptr;
|
||||
BookmarkPermanentNode* mobile_node_ = nullptr;
|
||||
+ BookmarkPermanentNode* tabs_collection_node_ = nullptr;
|
||||
|
||||
// The maximum ID assigned to the bookmark nodes in the model.
|
||||
int64_t next_node_id_ = 1;
|
||||
@@ -645,7 +673,7 @@ diff --git a/components/bookmarks/browser/bookmark_node.cc b/components/bookmark
|
||||
diff --git a/components/bookmarks/browser/bookmark_node.h b/components/bookmarks/browser/bookmark_node.h
|
||||
--- a/components/bookmarks/browser/bookmark_node.h
|
||||
+++ b/components/bookmarks/browser/bookmark_node.h
|
||||
@@ -35,6 +35,7 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode>, public TitledUrlNode {
|
||||
@@ -36,6 +36,7 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode>, public TitledUrlNode {
|
||||
FOLDER,
|
||||
BOOKMARK_BAR,
|
||||
OTHER_NODE,
|
||||
@@ -653,7 +681,7 @@ diff --git a/components/bookmarks/browser/bookmark_node.h b/components/bookmarks
|
||||
MOBILE
|
||||
};
|
||||
|
||||
@@ -52,6 +53,7 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode>, public TitledUrlNode {
|
||||
@@ -53,6 +54,7 @@ class BookmarkNode : public ui::TreeNode<BookmarkNode>, public TitledUrlNode {
|
||||
static const char kBookmarkBarNodeGuid[];
|
||||
static const char kOtherBookmarksNodeGuid[];
|
||||
static const char kMobileBookmarksNodeGuid[];
|
||||
@@ -661,7 +689,7 @@ diff --git a/components/bookmarks/browser/bookmark_node.h b/components/bookmarks
|
||||
static const char kManagedNodeGuid[];
|
||||
|
||||
// A bug in sync caused some problematic GUIDs to be produced.
|
||||
@@ -250,6 +252,9 @@ class BookmarkPermanentNode : public BookmarkNode {
|
||||
@@ -247,6 +249,9 @@ class BookmarkPermanentNode : public BookmarkNode {
|
||||
static std::unique_ptr<BookmarkPermanentNode> CreateMobileBookmarks(
|
||||
int64_t id,
|
||||
bool visible_when_empty);
|
||||
@@ -687,7 +715,7 @@ diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks
|
||||
diff --git a/components/sync_bookmarks/bookmark_specifics_conversions.cc b/components/sync_bookmarks/bookmark_specifics_conversions.cc
|
||||
--- a/components/sync_bookmarks/bookmark_specifics_conversions.cc
|
||||
+++ b/components/sync_bookmarks/bookmark_specifics_conversions.cc
|
||||
@@ -419,6 +419,7 @@ sync_pb::BookmarkSpecifics::Type GetProtoTypeFromBookmarkNode(
|
||||
@@ -400,6 +400,7 @@ sync_pb::BookmarkSpecifics::Type GetProtoTypeFromBookmarkNode(
|
||||
case bookmarks::BookmarkNode::BOOKMARK_BAR:
|
||||
case bookmarks::BookmarkNode::OTHER_NODE:
|
||||
case bookmarks::BookmarkNode::MOBILE:
|
||||
@@ -695,5 +723,6 @@ diff --git a/components/sync_bookmarks/bookmark_specifics_conversions.cc b/compo
|
||||
DCHECK(node->is_folder());
|
||||
return sync_pb::BookmarkSpecifics::FOLDER;
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ diff --git a/chrome/android/java/res/menu/custom_tabs_menu.xml b/chrome/android/
|
||||
diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml
|
||||
--- a/chrome/android/java/res/menu/main_menu.xml
|
||||
+++ b/chrome/android/java/res/menu/main_menu.xml
|
||||
@@ -106,6 +106,9 @@
|
||||
@@ -88,6 +88,9 @@
|
||||
<item android:id="@+id/add_to_homescreen_id"
|
||||
android:title="@string/menu_add_to_homescreen"
|
||||
android:icon="@drawable/ic_add_to_home_screen" />
|
||||
@@ -41,7 +41,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
@@ -2176,6 +2176,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
@@ -2043,6 +2043,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS_MANAGER);
|
||||
}
|
||||
RecordUserAction.record("MobileMenuDownloadManager");
|
||||
@@ -49,11 +49,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
|
||||
+ currentTab.getWebContents().getNavigationController().loadUrl(new LoadUrlParams("view-source:"+currentTab.getUrl().getSpec()));
|
||||
} else if (id == R.id.open_recently_closed_tab) {
|
||||
TabModel currentModel = mTabModelSelector.getCurrentModel();
|
||||
if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosedEntry();
|
||||
if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosedTab();
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
|
||||
@@ -2518,6 +2518,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
@@ -2429,6 +2429,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -68,16 +68,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
@@ -507,6 +507,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
@@ -355,6 +355,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
isChromeScheme, isFileScheme, isContentScheme, isIncognito, url));
|
||||
|
||||
updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */, isChromeScheme);
|
||||
updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */);
|
||||
+ updateViewSourceMenuItem(menu, currentTab);
|
||||
|
||||
updateAutoDarkMenuItem(menu, currentTab, isChromeScheme);
|
||||
|
||||
@@ -1153,6 +1154,19 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
stopPriceTrackingMenuItem.setVisible(priceTrackingEnabled);
|
||||
// Only display reader mode settings menu option if the current page is in reader mode.
|
||||
menu.findItem(R.id.reader_mode_prefs_id).setVisible(shouldShowReaderModePrefs(currentTab));
|
||||
@@ -845,6 +846,19 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
}
|
||||
}
|
||||
|
||||
+ /**
|
||||
@@ -99,10 +99,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java
|
||||
@@ -216,6 +216,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
|
||||
@@ -214,6 +214,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
|
||||
}
|
||||
|
||||
updateRequestDesktopSiteMenuItem(
|
||||
menu, currentTab, requestDesktopSiteVisible, isChromeScheme);
|
||||
updateRequestDesktopSiteMenuItem(menu, currentTab, requestDesktopSiteVisible);
|
||||
+ updateViewSourceMenuItem(menu, currentTab);
|
||||
prepareAddToHomescreenMenuItem(menu, currentTab, addToHomeScreenVisible);
|
||||
}
|
||||
@@ -110,8 +110,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -306,6 +306,10 @@ CHAR_LIMIT guidelines:
|
||||
Chrome tips
|
||||
@@ -299,6 +299,10 @@ CHAR_LIMIT guidelines:
|
||||
Sign-in verifications
|
||||
</message>
|
||||
|
||||
+ <message name="IDS_VIEW_SOURCE" desc="Title for the menu command to view the source of the current page. [CHAR-LIMIT=40]">
|
||||
@@ -121,5 +121,6 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
<message name="IDS_UNSUPPORTED" desc="Message displayed to the user when an attempted action is not supported.">
|
||||
Unsupported
|
||||
</message>
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -3,23 +3,72 @@ Date: Mon, 1 Feb 2021 19:18:55 +0200
|
||||
Subject: Add option to force tablet UI
|
||||
|
||||
---
|
||||
.../preferences/ChromePreferenceKeys.java | 1 +
|
||||
.../preferences/LegacyChromePreferenceKeys.java | 1 +
|
||||
.../browser/omnibox/LocationBarCoordinator.java | 2 +-
|
||||
.../android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
.../toolbar/top/ToolbarControlContainer.java | 16 ----------------
|
||||
components/BUILD.gn | 6 +++---
|
||||
.../java/res/xml/accessibility_preferences.xml | 5 +++++
|
||||
.../accessibility/AccessibilitySettings.java | 10 ++++++++++
|
||||
ui/android/BUILD.gn | 2 ++
|
||||
.../org/chromium/ui/base/DeviceFormFactor.java | 5 +++++
|
||||
10 files changed, 34 insertions(+), 20 deletions(-)
|
||||
.../android/java/res/xml/accessibility_preferences.xml | 5 +++++
|
||||
.../accessibility/settings/AccessibilitySettings.java | 10 ++++++++++
|
||||
.../browser/preferences/ChromePreferenceKeys.java | 1 +
|
||||
.../preferences/LegacyChromePreferenceKeys.java | 1 +
|
||||
.../chrome/browser/omnibox/LocationBarCoordinator.java | 2 +-
|
||||
.../ui/android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
.../browser/toolbar/top/ToolbarControlContainer.java | 2 +-
|
||||
components/BUILD.gn | 4 ++--
|
||||
ui/android/BUILD.gn | 2 ++
|
||||
.../src/org/chromium/ui/base/DeviceFormFactor.java | 5 +++++
|
||||
10 files changed, 34 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/accessibility_preferences.xml b/chrome/android/java/res/xml/accessibility_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/accessibility_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/accessibility_preferences.xml
|
||||
@@ -29,6 +29,11 @@
|
||||
android:key="captions"
|
||||
android:title="@string/accessibility_captions_title"/>
|
||||
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
+ android:key="force_tablet_ui"
|
||||
+ android:summary="@string/force_tablet_ui_summary"
|
||||
+ android:title="@string/force_tablet_ui_title" />
|
||||
+
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.image_descriptions.ImageDescriptionsSettings"
|
||||
android:key="image_descriptions"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
@@ -37,6 +37,7 @@ public class AccessibilitySettings
|
||||
static final String PREF_IMAGE_DESCRIPTIONS = "image_descriptions";
|
||||
static final String PREF_ACCESSIBILITY_PAGE_ZOOM = "accessibility_page_zoom";
|
||||
|
||||
+ static final String PREF_FORCE_TABLET_UI = "force_tablet_ui";
|
||||
private TextScalePreference mTextScalePref;
|
||||
private ChromeBaseCheckBoxPreference mForceEnableZoomPref;
|
||||
private boolean mRecordFontSizeChangeOnStop;
|
||||
@@ -82,6 +83,12 @@ public class AccessibilitySettings
|
||||
.getBoolean(Pref.READER_FOR_ACCESSIBILITY));
|
||||
readerForAccessibilityPref.setOnPreferenceChangeListener(this);
|
||||
|
||||
+ ChromeBaseCheckBoxPreference forceTabletUiPref =
|
||||
+ (ChromeBaseCheckBoxPreference) findPreference(PREF_FORCE_TABLET_UI);
|
||||
+ forceTabletUiPref.setChecked(SharedPreferencesManager.getInstance().readBoolean(
|
||||
+ ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false));
|
||||
+ forceTabletUiPref.setOnPreferenceChangeListener(this);
|
||||
+
|
||||
ChromeBaseCheckBoxPreference mAccessibilityTabSwitcherPref =
|
||||
(ChromeBaseCheckBoxPreference) findPreference(
|
||||
ChromePreferenceKeys.ACCESSIBILITY_TAB_SWITCHER);
|
||||
@@ -137,6 +144,9 @@ public class AccessibilitySettings
|
||||
mFontSizePrefs.setUserFontScaleFactor((Float) newValue);
|
||||
} else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) {
|
||||
mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue);
|
||||
+ } else if (PREF_FORCE_TABLET_UI.equals(preference.getKey())) {
|
||||
+ SharedPreferencesManager.getInstance().writeBoolean(
|
||||
+ ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, (Boolean) newValue);
|
||||
} else if (PREF_READER_FOR_ACCESSIBILITY.equals(preference.getKey())) {
|
||||
UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
.setBoolean(Pref.READER_FOR_ACCESSIBILITY, (Boolean) newValue);
|
||||
diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
@@ -441,6 +441,7 @@ public final class ChromePreferenceKeys {
|
||||
AccessibilityConstants.FONT_USER_SET_FORCE_ENABLE_ZOOM;
|
||||
@@ -536,6 +536,7 @@ public final class ChromePreferenceKeys {
|
||||
public static final String FONT_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable_zoom";
|
||||
|
||||
public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";
|
||||
+ public static final String FLAGS_FORCE_TABLET_UI_ENABLED = "force_tablet_ui_enabled";
|
||||
@@ -29,7 +78,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro
|
||||
diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java
|
||||
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java
|
||||
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java
|
||||
@@ -85,6 +85,7 @@ public class LegacyChromePreferenceKeys {
|
||||
@@ -99,6 +99,7 @@ public class LegacyChromePreferenceKeys {
|
||||
ChromePreferenceKeys.FLAGS_CACHED_SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT,
|
||||
ChromePreferenceKeys.FLAGS_CACHED_TAB_GROUPS_ANDROID_ENABLED,
|
||||
ChromePreferenceKeys.FONT_USER_FONT_SCALE_FACTOR,
|
||||
@@ -40,7 +89,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro
|
||||
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java
|
||||
--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java
|
||||
+++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java
|
||||
@@ -365,7 +365,7 @@ public final class LocationBarCoordinator implements LocationBar, NativeInitObse
|
||||
@@ -348,7 +348,7 @@ public final class LocationBarCoordinator implements LocationBar, NativeInitObse
|
||||
// OmniboxSuggestionsDropdownEmbedder implementation
|
||||
@Override
|
||||
public boolean isTablet() {
|
||||
@@ -52,9 +101,9 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -1359,6 +1359,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_PRIVACY_REVIEW_SB_ENHANCED_ITEM_SEVEN" desc="Seventh bullet point that describes the details of the Safe Browsing control.">
|
||||
Temporarily links this data to your Google Account when you’re signed in, to protect you across Google apps
|
||||
@@ -1200,6 +1200,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_SAFE_BROWSING_NO_PROTECTION_CONFIRMATION_DIALOG_CONFIRM" desc="Message for Safe Browsing no protection confirmation button.">
|
||||
Turn off
|
||||
</message>
|
||||
+ <message name="IDS_FORCE_TABLET_UI_SUMMARY" desc="Summary of the preference that allows the user to force chromium to use tablet UI.">
|
||||
+ Open chromium in Tablet Mode
|
||||
@@ -63,117 +112,45 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
+ Force Tablet Mode
|
||||
+ </message>
|
||||
|
||||
<!-- Safety check -->
|
||||
<message name="IDS_PREFS_SAFETY_CHECK" desc="Title of the Safety check element in settings, allowing the user to check multiple areas of browser safety. [CHAR_LIMIT=32]">
|
||||
<!-- Accessibility preferences -->
|
||||
<message name="IDS_PREFS_ACCESSIBILITY" desc="Title of Accessibility settings, which allows the user to change webpage font sizes. [CHAR_LIMIT=32]">
|
||||
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
|
||||
--- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
|
||||
+++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
|
||||
@@ -106,22 +106,6 @@ public class ToolbarControlContainer extends OptimizedFrameLayout implements Con
|
||||
public void setToolbar(Toolbar toolbar, boolean isIncognito) {
|
||||
mToolbar = toolbar;
|
||||
mToolbarContainer.setToolbar(mToolbar);
|
||||
-
|
||||
- View toolbarView = findViewById(R.id.toolbar);
|
||||
- assert toolbarView != null;
|
||||
-
|
||||
- if (toolbarView instanceof ToolbarTablet) {
|
||||
- // On tablet, draw a fake tab strip and toolbar until the compositor is
|
||||
- // ready to draw the real tab strip. (On phone, the toolbar is made entirely
|
||||
- // of Android views, which are already initialized.)
|
||||
- final Drawable backgroundDrawable =
|
||||
- AppCompatResources.getDrawable(getContext(), R.drawable.toolbar_background)
|
||||
- .mutate();
|
||||
- backgroundDrawable.setTint(
|
||||
- ChromeColors.getDefaultThemeColor(getContext(), isIncognito));
|
||||
- backgroundDrawable.setTintMode(PorterDuff.Mode.MULTIPLY);
|
||||
- setBackground(backgroundDrawable);
|
||||
- }
|
||||
@@ -109,7 +109,7 @@ public class ToolbarControlContainer extends OptimizedFrameLayout implements Con
|
||||
// On tablet, draw a fake tab strip and toolbar until the compositor is
|
||||
// ready to draw the real tab strip. (On phone, the toolbar is made entirely
|
||||
// of Android views, which are already initialized.)
|
||||
- setBackgroundResource(R.drawable.toolbar_background);
|
||||
+// setBackgroundResource(R.drawable.toolbar_background);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/components/BUILD.gn b/components/BUILD.gn
|
||||
--- a/components/BUILD.gn
|
||||
+++ b/components/BUILD.gn
|
||||
@@ -44,7 +44,7 @@ if (is_ios) {
|
||||
@@ -542,7 +542,7 @@ test("components_unittests") {
|
||||
|
||||
# Omit Lacros because it allows //components to depend on //chrome, which in
|
||||
# turn depends on //extensions.
|
||||
-if (!is_chromeos_lacros) {
|
||||
+if (!is_chromeos_lacros && !is_android) {
|
||||
disallowed_extension_deps_ = [
|
||||
# Components should largely not depend on //extensions. Since // extensions
|
||||
# is not a component target and is linked with //chrome, depending on most
|
||||
@@ -630,7 +630,7 @@ test("components_unittests") {
|
||||
# On LaCrOS, tests use ash - chrome as a window manager, thus the dependency.
|
||||
# On other platforms, no components should depend on Chrome.
|
||||
# Since //chrome depends on //extensions, we also only assert_no_deps on
|
||||
# extensions targets for non-lacros builds.
|
||||
- if (!is_chromeos_lacros) {
|
||||
+ if (!is_chromeos_lacros && !is_android) {
|
||||
assert_no_deps = [ "//chrome/*" ]
|
||||
assert_no_deps += disallowed_extension_deps_
|
||||
}
|
||||
@@ -910,7 +910,7 @@ if (!is_ios) {
|
||||
# dependency. On other platforms, no components should depend on Chrome.
|
||||
# Since //chrome depends on //extensions, we also only assert_no_deps on
|
||||
# extensions targets for non-lacros builds.
|
||||
|
||||
@@ -789,7 +789,7 @@ if (!is_ios) {
|
||||
|
||||
# On LaCrOS, tests use ash - chrome as a window manager, thus the dependency.
|
||||
# On other platforms, no components should depend on Chrome.
|
||||
- if (!is_chromeos_lacros) {
|
||||
+ if (!is_chromeos_lacros && !is_android) {
|
||||
assert_no_deps = [ "//chrome/*" ]
|
||||
assert_no_deps += disallowed_extension_deps_
|
||||
}
|
||||
diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
|
||||
--- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
|
||||
+++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
|
||||
@@ -25,6 +25,11 @@
|
||||
android:summary="@string/accessibility_tab_switcher_summary"
|
||||
android:title="@string/accessibility_tab_switcher_title" />
|
||||
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
+ android:key="force_tablet_ui"
|
||||
+ android:summary="@string/force_tablet_ui_summary"
|
||||
+ android:title="@string/force_tablet_ui_title" />
|
||||
+
|
||||
<Preference
|
||||
android:key="captions"
|
||||
android:title="@string/accessibility_captions_title"/>
|
||||
diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
|
||||
--- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
|
||||
+++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
|
||||
@@ -27,6 +27,7 @@ public class AccessibilitySettings
|
||||
public static final String PREF_READER_FOR_ACCESSIBILITY = "reader_for_accessibility";
|
||||
public static final String PREF_CAPTIONS = "captions";
|
||||
|
||||
+ static final String PREF_FORCE_TABLET_UI = "force_tablet_ui";
|
||||
private TextScalePreference mTextScalePref;
|
||||
private ChromeBaseCheckBoxPreference mForceEnableZoomPref;
|
||||
private boolean mRecordFontSizeChangeOnStop;
|
||||
@@ -85,6 +86,12 @@ public class AccessibilitySettings
|
||||
getPreferenceScreen().removePreference(readerForAccessibilityPref);
|
||||
}
|
||||
|
||||
+ ChromeBaseCheckBoxPreference forceTabletUiPref =
|
||||
+ (ChromeBaseCheckBoxPreference) findPreference(PREF_FORCE_TABLET_UI);
|
||||
+ forceTabletUiPref.setChecked(SharedPreferencesManager.getInstance().readBoolean(
|
||||
+ ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false));
|
||||
+ forceTabletUiPref.setOnPreferenceChangeListener(this);
|
||||
+
|
||||
ChromeBaseCheckBoxPreference accessibilityTabSwitcherPref =
|
||||
(ChromeBaseCheckBoxPreference) findPreference(
|
||||
AccessibilityConstants.ACCESSIBILITY_TAB_SWITCHER);
|
||||
@@ -133,6 +140,9 @@ public class AccessibilitySettings
|
||||
mFontSizePrefs.setUserFontScaleFactor((Float) newValue);
|
||||
} else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) {
|
||||
mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue);
|
||||
+ } else if (PREF_FORCE_TABLET_UI.equals(preference.getKey())) {
|
||||
+ SharedPreferencesManager.getInstance().writeBoolean(
|
||||
+ ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, (Boolean) newValue);
|
||||
} else if (PREF_READER_FOR_ACCESSIBILITY.equals(preference.getKey())) {
|
||||
if (mReaderForAccessibilityDelegate != null) {
|
||||
mReaderForAccessibilityDelegate.setEnabled((Boolean) newValue);
|
||||
}
|
||||
diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn
|
||||
--- a/ui/android/BUILD.gn
|
||||
+++ b/ui/android/BUILD.gn
|
||||
@@ -362,6 +362,8 @@ android_library("ui_no_recycler_view_java") {
|
||||
@@ -370,6 +370,8 @@ android_library("ui_no_recycler_view_java") {
|
||||
":ui_java_resources",
|
||||
":ui_utils_java",
|
||||
"//base:base_java",
|
||||
@@ -204,5 +181,6 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui
|
||||
return detectScreenWidthBucket(context) >= SCREEN_BUCKET_TABLET;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ Subject: Add option to not persist tabs across sessions
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -42,6 +42,11 @@
|
||||
android:title="@string/incognito_settings_title"
|
||||
android:summary="@string/incognito_settings_summary"
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.IncognitoSettings"/>
|
||||
@@ -33,6 +33,11 @@
|
||||
android:title="@string/always_incognito_title"
|
||||
android:summary="@string/always_incognito_summary"
|
||||
android:defaultValue="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="close_tabs_on_exit"
|
||||
+ android:title="@string/close_tabs_on_exit_title"
|
||||
@@ -27,7 +27,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
|
||||
@@ -1263,8 +1263,10 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
@@ -1188,8 +1188,10 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
boolean hadCipherData =
|
||||
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
|
||||
|
||||
@@ -50,7 +50,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.view.Menu;
|
||||
@@ -16,6 +17,8 @@ import androidx.preference.Preference;
|
||||
@@ -15,6 +16,8 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
|
||||
|
||||
@@ -60,15 +60,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
@@ -59,6 +62,8 @@ public class PrivacySettings
|
||||
private static final String PREF_INCOGNITO_LOCK = "incognito_lock";
|
||||
private static final String PREF_PHONE_AS_A_SECURITY_KEY = "phone_as_a_security_key";
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
|
||||
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
+
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
private IncognitoLockSettings mIncognitoLockSettings;
|
||||
private ViewGroup mDialogContainer;
|
||||
@@ -134,7 +139,11 @@ public class PrivacySettings
|
||||
|
||||
@Override
|
||||
@@ -137,7 +142,11 @@ public class PrivacySettings
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
String key = preference.getKey();
|
||||
@@ -80,23 +80,23 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
+ } else if (PREF_CAN_MAKE_PAYMENT.equals(key)) {
|
||||
UserPrefs.get(Profile.getLastUsedRegularProfile())
|
||||
.setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
|
||||
} else if (PREF_HTTPS_FIRST_MODE.equals(key)) {
|
||||
@@ -175,6 +184,11 @@ public class PrivacySettings
|
||||
PreloadPagesSettingsFragment.getPreloadPagesSummaryString(getContext()));
|
||||
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
|
||||
@@ -189,6 +198,11 @@ public class PrivacySettings
|
||||
privacySandboxPreference.setSummary(
|
||||
PrivacySandboxSettingsFragment.getStatusString(getContext()));
|
||||
}
|
||||
|
||||
+
|
||||
+ ChromeSwitchPreference closeTabsOnExitPref =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_CLOSE_TABS_ON_EXIT);
|
||||
+ closeTabsOnExitPref.setOnPreferenceChangeListener(this);
|
||||
+ closeTabsOnExitPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
+
|
||||
Preference secureDnsPref = findPreference(PREF_SECURE_DNS);
|
||||
if (secureDnsPref != null && secureDnsPref.isVisible()) {
|
||||
secureDnsPref.setSummary(SecureDnsSettings.getSummary(getContext()));
|
||||
}
|
||||
|
||||
private ChromeManagedPreferenceDelegate createManagedPreferenceDelegate() {
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -4314,6 +4314,12 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
@@ -4032,6 +4032,12 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
|
||||
IMAGE
|
||||
</message>
|
||||
@@ -109,5 +109,6 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
<message name="IDS_CONTEXTMENU_LINK_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the link.">
|
||||
LINK
|
||||
</message>
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,205 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 20 Nov 2021 15:36:54 +0000
|
||||
Subject: Add option to use home page as NTP
|
||||
|
||||
And allow use about:blank as default homepage
|
||||
---
|
||||
.../java/res/xml/homepage_preferences.xml | 5 +++++
|
||||
.../chrome/browser/homepage/HomepageManager.java | 16 ++++++++++++++++
|
||||
.../homepage/settings/HomepageSettings.java | 12 ++++++++++++
|
||||
.../chrome/browser/metrics/LaunchMetrics.java | 1 -
|
||||
.../browser/tabmodel/ChromeTabCreator.java | 7 +++++++
|
||||
.../preferences/ChromePreferenceKeys.java | 1 +
|
||||
.../preferences/LegacyChromePreferenceKeys.java | 1 +
|
||||
.../android/strings/android_chrome_strings.grd | 3 +++
|
||||
chrome/browser/ui/browser_ui_prefs.cc | 2 ++
|
||||
chrome/common/pref_names.cc | 4 ++++
|
||||
chrome/common/pref_names.h | 1 +
|
||||
11 files changed, 52 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/homepage_preferences.xml b/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
@@ -12,6 +12,11 @@
|
||||
android:summaryOn="@string/text_on"
|
||||
android:summaryOff="@string/text_off" />
|
||||
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="ntp_is_homepage_switch"
|
||||
+ android:summaryOn="@string/options_ntp_is_homepage_label"
|
||||
+ android:summaryOff="@string/options_ntp_is_homepage_label" />
|
||||
+
|
||||
<org.chromium.chrome.browser.homepage.settings.RadioButtonGroupHomepagePreference
|
||||
android:key="homepage_radio_group"
|
||||
android:selectable="false"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java
|
||||
@@ -214,6 +214,22 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat
|
||||
notifyHomepageUpdated();
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Returns the user preference for whether the New Tab Page is the homepage or not.
|
||||
+ *
|
||||
+ */
|
||||
+ public boolean getPrefNTPIsHomepageEnabled() {
|
||||
+ return mSharedPreferencesManager.readBoolean(ChromePreferenceKeys.HOMEPAGE_NTP_IS_HOMEPAGE, false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the user preference for whether the new tab page is the homepage or not.
|
||||
+ */
|
||||
+ public void setPrefNTPIsHomepageEnabled(boolean enabled) {
|
||||
+ mSharedPreferencesManager.writeBoolean(ChromePreferenceKeys.HOMEPAGE_NTP_IS_HOMEPAGE, enabled);
|
||||
+ notifyHomepageUpdated();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* @return User specified homepage custom URI string.
|
||||
*/
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/settings/HomepageSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/homepage/settings/HomepageSettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/homepage/settings/HomepageSettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/homepage/settings/HomepageSettings.java
|
||||
@@ -22,6 +22,7 @@ import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
|
||||
import org.chromium.components.browser_ui.settings.SettingsUtils;
|
||||
import org.chromium.components.embedder_support.util.UrlUtilities;
|
||||
import org.chromium.components.url_formatter.UrlFormatter;
|
||||
+import org.chromium.components.embedder_support.util.UrlConstants;
|
||||
|
||||
/**
|
||||
* Fragment that allows the user to configure homepage related preferences.
|
||||
@@ -32,6 +33,8 @@ public class HomepageSettings extends PreferenceFragmentCompat {
|
||||
@VisibleForTesting
|
||||
public static final String PREF_HOMEPAGE_RADIO_GROUP = "homepage_radio_group";
|
||||
|
||||
+ private static final String PREF_NTP_HOMEPAGE_SWITCH = "ntp_is_homepage_switch";
|
||||
+
|
||||
/**
|
||||
* Delegate used to mark that the homepage is being managed.
|
||||
* Created for {@link org.chromium.chrome.browser.settings.HomepagePreferences}
|
||||
@@ -72,6 +75,15 @@ public class HomepageSettings extends PreferenceFragmentCompat {
|
||||
});
|
||||
mRadioButtons.setupPreferenceValues(createPreferenceValuesForRadioGroup());
|
||||
|
||||
+ ChromeSwitchPreference mNTPIsHomepageSwitch =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_NTP_HOMEPAGE_SWITCH);
|
||||
+ boolean isHomepageNTPEnabled = mHomepageManager.getPrefNTPIsHomepageEnabled();
|
||||
+ mNTPIsHomepageSwitch.setChecked(isHomepageNTPEnabled);
|
||||
+ mNTPIsHomepageSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
+ mHomepageManager.setPrefNTPIsHomepageEnabled((boolean) newValue);
|
||||
+ return true;
|
||||
+ });
|
||||
+
|
||||
RecordUserAction.record("Settings.Homepage.Opened");
|
||||
}
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java
|
||||
@@ -103,7 +103,6 @@ public class LaunchMetrics {
|
||||
boolean showHomeButton, boolean homepageIsNtp, String homepageUrl) {
|
||||
if (homepageUrl == null) {
|
||||
homepageUrl = "";
|
||||
- assert !showHomeButton : "Homepage should be disabled for a null URL";
|
||||
}
|
||||
LaunchMetricsJni.get().recordHomePageLaunchMetrics(
|
||||
showHomeButton, homepageIsNtp, homepageUrl);
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
|
||||
@@ -20,6 +20,7 @@ import org.chromium.chrome.browser.ServiceTabLauncher;
|
||||
import org.chromium.chrome.browser.app.tab_activity_glue.ReparentingDelegateFactory;
|
||||
import org.chromium.chrome.browser.app.tab_activity_glue.ReparentingTask;
|
||||
import org.chromium.chrome.browser.compositor.CompositorViewHolder;
|
||||
+import org.chromium.chrome.browser.homepage.HomepageManager;
|
||||
import org.chromium.chrome.browser.init.StartupTabPreloader;
|
||||
import org.chromium.chrome.browser.ntp.NewTabPageLaunchOrigin;
|
||||
import org.chromium.chrome.browser.ntp.NewTabPageUtils;
|
||||
@@ -321,6 +322,12 @@ public class ChromeTabCreator extends TabCreator {
|
||||
* @return the created tab.
|
||||
*/
|
||||
public Tab launchUrl(String url, @TabLaunchType int type, Intent intent, long intentTimestamp) {
|
||||
+ if (!mIncognito && url.equals(UrlConstants.NTP_URL)) {
|
||||
+ if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) {
|
||||
+ url = HomepageManager.getInstance().getHomepageUri();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
LoadUrlParams loadUrlParams = new LoadUrlParams(url);
|
||||
loadUrlParams.setIntentReceivedTimestamp(intentTimestamp);
|
||||
return createNewTab(loadUrlParams, type, null, intent);
|
||||
diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
@@ -449,6 +449,7 @@ public final class ChromePreferenceKeys {
|
||||
public static final String HOMEPAGE_USE_DEFAULT_URI = "homepage_partner_enabled";
|
||||
public static final String HOMEPAGE_PARTNER_CUSTOMIZED_DEFAULT_URI =
|
||||
"Chrome.Homepage.PartnerCustomizedDefaultUri";
|
||||
+ public static final String HOMEPAGE_NTP_IS_HOMEPAGE = "newtabpage_is_homepage";
|
||||
|
||||
/**
|
||||
* Key used to save homepage location set by enterprise policy
|
||||
diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java
|
||||
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java
|
||||
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java
|
||||
@@ -90,6 +90,7 @@ public class LegacyChromePreferenceKeys {
|
||||
ChromePreferenceKeys.HOMEPAGE_CUSTOM_URI,
|
||||
ChromePreferenceKeys.HOMEPAGE_ENABLED,
|
||||
ChromePreferenceKeys.HOMEPAGE_USE_DEFAULT_URI,
|
||||
+ ChromePreferenceKeys.HOMEPAGE_NTP_IS_HOMEPAGE,
|
||||
ChromePreferenceKeys.INCOGNITO_SHORTCUT_ADDED,
|
||||
ChromePreferenceKeys.LATEST_UNSUPPORTED_VERSION,
|
||||
ChromePreferenceKeys.LOCALE_MANAGER_AUTO_SWITCH,
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -1174,6 +1174,9 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_CLEAR_BROWSING_DATA_TAB_PERIOD_HOUR" desc="The option to delete browsing data from the last hour.">
|
||||
Last hour
|
||||
</message>
|
||||
+ <message name="IDS_OPTIONS_NTP_IS_HOMEPAGE_LABEL" desc="The label for switch that allows the user to toggle whether opening a new tab leads to the new tab page or the home page.">
|
||||
+ Use for new tabs
|
||||
+ </message>
|
||||
<message name="IDS_CLEAR_BROWSING_DATA_TAB_PERIOD_24_HOURS" desc="The option to delete browsing data from the last 24 hours.">
|
||||
Last 24 hours
|
||||
</message>
|
||||
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -65,6 +65,8 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
GetHomeButtonAndHomePageIsNewTabPageFlags());
|
||||
registry->RegisterBooleanPref(prefs::kShowHomeButton, false,
|
||||
GetHomeButtonAndHomePageIsNewTabPageFlags());
|
||||
+ registry->RegisterBooleanPref(prefs::kNewTabPageIsHomePage, false,
|
||||
+ GetHomeButtonAndHomePageIsNewTabPageFlags());
|
||||
|
||||
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
|
||||
bool reset_check_default = false;
|
||||
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
|
||||
--- a/chrome/common/pref_names.cc
|
||||
+++ b/chrome/common/pref_names.cc
|
||||
@@ -60,6 +60,10 @@ const char kForceEphemeralProfiles[] = "profile.ephemeral_mode";
|
||||
// A boolean specifying whether the New Tab page is the home page or not.
|
||||
const char kHomePageIsNewTabPage[] = "homepage_is_newtabpage";
|
||||
|
||||
+// A boolean specifying whether opening a new tab should open the Home page
|
||||
+// instead of the New Tab page.
|
||||
+const char kNewTabPageIsHomePage[] = "newtabpage_is_homepage";
|
||||
+
|
||||
// This is the URL of the page to load when opening new tabs.
|
||||
const char kHomePage[] = "homepage";
|
||||
|
||||
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -368,6 +368,7 @@ extern const char kSettingsShowOSBanner[];
|
||||
extern const char kUsedPolicyCertificates[];
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
extern const char kShowHomeButton[];
|
||||
+extern const char kNewTabPageIsHomePage[];
|
||||
extern const char kSpeechRecognitionFilterProfanities[];
|
||||
extern const char kAllowDeletingBrowserHistory[];
|
||||
extern const char kForceGoogleSafeSearch[];
|
||||
--
|
||||
2.25.1
|
||||
@@ -1,183 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Mon, 2 May 2022 11:48:03 +0000
|
||||
Subject: Add site engagement flag
|
||||
|
||||
Enabled by default.
|
||||
---
|
||||
chrome/browser/about_flags.cc | 6 ++++
|
||||
chrome/browser/flag_descriptions.cc | 5 +++
|
||||
chrome/browser/flag_descriptions.h | 3 ++
|
||||
.../content/site_engagement_score.cc | 5 +++
|
||||
components/site_engagement/core/BUILD.gn | 6 ++++
|
||||
components/site_engagement/core/features.cc | 29 ++++++++++++++++
|
||||
components/site_engagement/core/features.h | 34 +++++++++++++++++++
|
||||
7 files changed, 88 insertions(+)
|
||||
create mode 100644 components/site_engagement/core/features.cc
|
||||
create mode 100644 components/site_engagement/core/features.h
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -132,6 +132,7 @@
|
||||
#include "components/security_state/core/security_state.h"
|
||||
#include "components/send_tab_to_self/features.h"
|
||||
#include "components/services/heap_profiling/public/cpp/switches.h"
|
||||
+#include "components/site_engagement/core/features.h"
|
||||
#include "components/shared_highlighting/core/common/shared_highlighting_features.h"
|
||||
#include "components/signin/core/browser/dice_account_reconcilor_delegate.h"
|
||||
#include "components/signin/public/base/signin_buildflags.h"
|
||||
@@ -8495,6 +8496,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kReduceUserAgentMinorVersionDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(blink::features::kReduceUserAgentMinorVersion)},
|
||||
|
||||
+ {"site-engagement",
|
||||
+ flag_descriptions::kSiteEngagementName,
|
||||
+ flag_descriptions::kSiteEngagementDescription, kOsAll,
|
||||
+ FEATURE_VALUE_TYPE(site_engagement::features::kSiteEngagement)},
|
||||
+
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
{"enable-variable-refresh-rate",
|
||||
flag_descriptions::kEnableVariableRefreshRateName,
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -2953,6 +2953,11 @@ const char kReduceUserAgentMinorVersionDescription[] =
|
||||
"The Chrome version in the User-Agent string will be reported as "
|
||||
"Chrome/<major_version>.0.0.0.";
|
||||
|
||||
+const char kSiteEngagementName[] =
|
||||
+ "Enable site engagement feature";
|
||||
+const char kSiteEngagementDescription[] =
|
||||
+ "Site Engagement Service provides information about how engaged a user is with a origin; this affects which NTP tiles are automatically created.";
|
||||
+
|
||||
const char kWebSQLAccessName[] = "Allows access to WebSQL APIs";
|
||||
const char kWebSQLAccessDescription[] =
|
||||
"The WebSQL API is enabled by default, but can be disabled here.";
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -1680,6 +1680,9 @@ extern const char kDurableClientHintsCacheDescription[];
|
||||
extern const char kReduceUserAgentMinorVersionName[];
|
||||
extern const char kReduceUserAgentMinorVersionDescription[];
|
||||
|
||||
+extern const char kSiteEngagementName[];
|
||||
+extern const char kSiteEngagementDescription[];
|
||||
+
|
||||
extern const char kWebSQLAccessName[];
|
||||
extern const char kWebSQLAccessDescription[];
|
||||
|
||||
diff --git a/components/site_engagement/content/site_engagement_score.cc b/components/site_engagement/content/site_engagement_score.cc
|
||||
--- a/components/site_engagement/content/site_engagement_score.cc
|
||||
+++ b/components/site_engagement/content/site_engagement_score.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "components/content_settings/core/common/content_settings.h"
|
||||
#include "components/content_settings/core/common/content_settings_types.h"
|
||||
#include "components/content_settings/core/common/content_settings_utils.h"
|
||||
+#include "components/site_engagement/core/features.h"
|
||||
#include "components/site_engagement/content/engagement_type.h"
|
||||
#include "components/site_engagement/content/site_engagement_metrics.h"
|
||||
#include "components/variations/variations_associated_data.h"
|
||||
@@ -277,6 +278,10 @@ void SiteEngagementScore::Commit() {
|
||||
if (!UpdateScoreDict(score_dict_.get()))
|
||||
return;
|
||||
|
||||
+ if (!base::FeatureList::IsEnabled(features::kSiteEngagement)) {
|
||||
+ score_dict_.reset();
|
||||
+ return;
|
||||
+ }
|
||||
settings_map_->SetWebsiteSettingDefaultScope(
|
||||
origin_, GURL(), ContentSettingsType::SITE_ENGAGEMENT,
|
||||
base::Value::FromUniquePtrValue(std::move(score_dict_)));
|
||||
diff --git a/components/site_engagement/core/BUILD.gn b/components/site_engagement/core/BUILD.gn
|
||||
--- a/components/site_engagement/core/BUILD.gn
|
||||
+++ b/components/site_engagement/core/BUILD.gn
|
||||
@@ -4,8 +4,14 @@
|
||||
|
||||
static_library("core") {
|
||||
sources = [
|
||||
+ "features.cc",
|
||||
+ "features.h",
|
||||
"pref_names.cc",
|
||||
"pref_names.h",
|
||||
"site_engagement_score_provider.h",
|
||||
]
|
||||
+
|
||||
+ deps = [
|
||||
+ "//base",
|
||||
+ ]
|
||||
}
|
||||
diff --git a/components/site_engagement/core/features.cc b/components/site_engagement/core/features.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/site_engagement/core/features.cc
|
||||
@@ -0,0 +1,29 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
+ Bromite is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation, either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ Bromite is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with Bromite. If not, see <https://www.gnu.org/licenses/>.
|
||||
+*/
|
||||
+
|
||||
+#include "components/site_engagement/core/features.h"
|
||||
+
|
||||
+#include "base/feature_list.h"
|
||||
+
|
||||
+namespace site_engagement {
|
||||
+namespace features {
|
||||
+
|
||||
+const base::Feature kSiteEngagement{"SiteEngagement",
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+
|
||||
+} // namespace features
|
||||
+} // namespace site_engagement
|
||||
diff --git a/components/site_engagement/core/features.h b/components/site_engagement/core/features.h
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/site_engagement/core/features.h
|
||||
@@ -0,0 +1,34 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
+ Bromite is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation, either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ Bromite is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with Bromite. If not, see <https://www.gnu.org/licenses/>.
|
||||
+*/
|
||||
+
|
||||
+#ifndef SITE_ENGAGEMENT_CORE_FEATURES_H_
|
||||
+#define SITE_ENGAGEMENT_CORE_FEATURES_H_
|
||||
+
|
||||
+#include <string>
|
||||
+
|
||||
+#include "base/feature_list.h"
|
||||
+
|
||||
+namespace site_engagement {
|
||||
+namespace features {
|
||||
+
|
||||
+// Enable site engagement
|
||||
+extern const base::Feature kSiteEngagement;
|
||||
+
|
||||
+} // namespace features
|
||||
+} // namespace site_engagement
|
||||
+
|
||||
+#endif // SITE_ENGAGEMENT_CORE_FEATURES_H_
|
||||
--
|
||||
2.25.1
|
||||
@@ -10,15 +10,15 @@ Subject: Add support for ISupportHelpAndFeedback
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
@@ -69,6 +69,7 @@ import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
|
||||
import org.chromium.components.browser_ui.bottomsheet.BottomSheetControllerFactory;
|
||||
@@ -56,6 +56,7 @@ import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
|
||||
import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarManageable;
|
||||
import org.chromium.components.browser_ui.settings.FragmentSettingsLauncher;
|
||||
import org.chromium.components.browser_ui.settings.SettingsLauncher;
|
||||
+import org.chromium.components.browser_ui.settings.SettingsUtils;
|
||||
import org.chromium.components.browser_ui.site_settings.SiteSettingsPreferenceFragment;
|
||||
import org.chromium.components.browser_ui.widget.displaystyle.UiConfig;
|
||||
import org.chromium.components.browser_ui.widget.displaystyle.ViewResizer;
|
||||
@@ -333,9 +334,13 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
|
||||
import org.chromium.ui.UiUtils;
|
||||
|
||||
@@ -252,9 +253,13 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
|
||||
finish();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.menu_id_general_help) {
|
||||
@@ -38,14 +38,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin
|
||||
diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
|
||||
--- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
|
||||
+++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java
|
||||
@@ -97,4 +97,8 @@ public class SettingsUtils {
|
||||
ToolbarUtils.setOverflowMenuVisibility(toolbar, visibility);
|
||||
return true;
|
||||
@@ -126,4 +126,8 @@ public class SettingsUtils {
|
||||
ImageView imageButton = (ImageView) button;
|
||||
return imageButton.getDrawable() == parentMenu.getOverflowIcon();
|
||||
}
|
||||
+
|
||||
+ public interface ISupportHelpAndFeedback {
|
||||
+ void onHelpAndFeebackPressed();
|
||||
+ }
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Tue, 12 Apr 2022 15:58:01 +0000
|
||||
Subject: Add support for writing URIs
|
||||
|
||||
Allows native-side URI file writing
|
||||
---
|
||||
base/android/content_uri_utils.cc | 10 ++++++
|
||||
base/android/content_uri_utils.h | 4 +++
|
||||
.../org/chromium/base/ContentUriUtils.java | 33 +++++++++++++++++++
|
||||
3 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils.cc
|
||||
--- a/base/android/content_uri_utils.cc
|
||||
+++ b/base/android/content_uri_utils.cc
|
||||
@@ -30,6 +30,16 @@ File OpenContentUriForRead(const FilePath& content_uri) {
|
||||
return File(fd);
|
||||
}
|
||||
|
||||
+File OpenContentUriForWrite(const FilePath& content_uri) {
|
||||
+ JNIEnv* env = base::android::AttachCurrentThread();
|
||||
+ ScopedJavaLocalRef<jstring> j_uri =
|
||||
+ ConvertUTF8ToJavaString(env, content_uri.value());
|
||||
+ jint fd = Java_ContentUriUtils_openContentUriForWrite(env, j_uri);
|
||||
+ if (fd < 0)
|
||||
+ return File();
|
||||
+ return File(fd);
|
||||
+}
|
||||
+
|
||||
std::string GetContentUriMimeType(const FilePath& content_uri) {
|
||||
JNIEnv* env = base::android::AttachCurrentThread();
|
||||
ScopedJavaLocalRef<jstring> j_uri =
|
||||
diff --git a/base/android/content_uri_utils.h b/base/android/content_uri_utils.h
|
||||
--- a/base/android/content_uri_utils.h
|
||||
+++ b/base/android/content_uri_utils.h
|
||||
@@ -18,6 +18,10 @@ namespace base {
|
||||
// Returns -1 if the URI is invalid.
|
||||
BASE_EXPORT File OpenContentUriForRead(const FilePath& content_uri);
|
||||
|
||||
+// Opens a content URI for write and returns the file descriptor to the caller.
|
||||
+// Returns -1 if the URI is invalid.
|
||||
+BASE_EXPORT File OpenContentUriForWrite(const FilePath& content_uri);
|
||||
+
|
||||
// Check whether a content URI exists.
|
||||
BASE_EXPORT bool ContentUriExists(const FilePath& content_uri);
|
||||
|
||||
diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
--- a/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
+++ b/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
@@ -23,6 +23,9 @@ import org.chromium.base.annotations.CalledByNative;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
+import android.system.Os;
|
||||
+import android.content.ContentProviderClient;
|
||||
+
|
||||
/**
|
||||
* This class provides methods to access content URI schemes.
|
||||
*/
|
||||
@@ -89,6 +92,36 @@ public abstract class ContentUriUtils {
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ @CalledByNative
|
||||
+ public static int openContentUriForWrite(String uriString) {
|
||||
+ try {
|
||||
+ Uri uri = Uri.parse(uriString);
|
||||
+ ContentResolver resolver = ContextUtils.getApplicationContext().getContentResolver();
|
||||
+ ContentProviderClient client = resolver.acquireContentProviderClient(
|
||||
+ uri.getAuthority());
|
||||
+ ParcelFileDescriptor pfd = client.openFile(uri, "rw");
|
||||
+ int fd = pfd.detachFd();
|
||||
+ client.close();
|
||||
+ return fd;
|
||||
+ } catch (Exception e) {
|
||||
+ Log.e(TAG, "Cannot open intermediate URI", e);
|
||||
+ }
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ public static String getFilePathFromContentUri(Uri uri) {
|
||||
+ String path = null;
|
||||
+ try {
|
||||
+ ContentResolver resolver = ContextUtils.getApplicationContext().getContentResolver();
|
||||
+ ParcelFileDescriptor pfd = resolver.openFileDescriptor(uri, "r");
|
||||
+ path = Os.readlink("/proc/self/fd/" + pfd.getFd());
|
||||
+ pfd.close();
|
||||
+ } catch (Exception e) {
|
||||
+ Log.e(TAG, "Cannot get file path from content URI", e);
|
||||
+ }
|
||||
+ return path;
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Check whether a content URI exists.
|
||||
*
|
||||
--
|
||||
2.25.1
|
||||
@@ -1,494 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Tue, 3 May 2022 14:44:11 +0000
|
||||
Subject: Add webGL site setting
|
||||
|
||||
Do not provide any device information when serving context creation errors.
|
||||
|
||||
Requires patch: Content-settings-infrastructure.patch
|
||||
---
|
||||
.../browser_ui/site_settings/android/BUILD.gn | 3 +
|
||||
.../BromiteCustomContentSettingImpl.java | 1 +
|
||||
.../BromiteWebGLContentSetting.java | 85 +++++++++++++++++++
|
||||
.../site_settings/SiteSettingsCategory.java | 5 +-
|
||||
.../strings/android/browser_ui_strings.grd | 1 +
|
||||
.../browser_ui/strings/android/webgl.grdp | 18 ++++
|
||||
components/components_strings.grd | 1 +
|
||||
.../core/browser/content_settings_registry.cc | 14 +++
|
||||
.../core/browser/content_settings_utils.cc | 2 +
|
||||
.../core/common/content_settings.cc | 3 +-
|
||||
.../core/common/content_settings.h | 1 +
|
||||
.../core/common/content_settings.mojom | 1 +
|
||||
.../common/content_settings_mojom_traits.cc | 3 +-
|
||||
.../common/content_settings_mojom_traits.h | 5 ++
|
||||
.../core/common/content_settings_types.h | 2 +
|
||||
.../renderer/content_settings_agent_impl.cc | 9 ++
|
||||
.../renderer/content_settings_agent_impl.h | 1 +
|
||||
.../platform/web_content_settings_client.h | 2 +
|
||||
.../execution_context/execution_context.cc | 23 +++++
|
||||
.../execution_context/execution_context.h | 5 ++
|
||||
.../webgl/webgl_rendering_context_base.cc | 32 +++----
|
||||
.../webgl/webgl_rendering_context_base.h | 2 +
|
||||
22 files changed, 196 insertions(+), 23 deletions(-)
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteWebGLContentSetting.java
|
||||
create mode 100644 components/browser_ui/strings/android/webgl.grdp
|
||||
|
||||
diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn
|
||||
--- a/components/browser_ui/site_settings/android/BUILD.gn
|
||||
+++ b/components/browser_ui/site_settings/android/BUILD.gn
|
||||
@@ -72,6 +72,9 @@ android_library("java") {
|
||||
"java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java",
|
||||
"java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting.java",
|
||||
]
|
||||
+ sources += [
|
||||
+ "java/src/org/chromium/components/browser_ui/site_settings/BromiteWebGLContentSetting.java",
|
||||
+ ]
|
||||
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
|
||||
resources_package = "org.chromium.components.browser_ui.site_settings"
|
||||
deps = [
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
@@ -43,6 +43,7 @@ public abstract class BromiteCustomContentSettingImpl {
|
||||
|
||||
static {
|
||||
mItemList = new ArrayList<BromiteCustomContentSetting>();
|
||||
+ mItemList.add(new BromiteWebGLContentSetting());
|
||||
}
|
||||
|
||||
public static SiteSettingsCategory createFromType(
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteWebGLContentSetting.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteWebGLContentSetting.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteWebGLContentSetting.java
|
||||
@@ -0,0 +1,85 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
+ Bromite is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation, either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ Bromite is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with Bromite. If not, see <https://www.gnu.org/licenses/>.
|
||||
+*/
|
||||
+
|
||||
+package org.chromium.components.browser_ui.site_settings;
|
||||
+
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
+import androidx.annotation.Nullable;
|
||||
+import androidx.preference.Preference;
|
||||
+import androidx.preference.PreferenceScreen;
|
||||
+
|
||||
+import java.util.ArrayList;
|
||||
+
|
||||
+public class BromiteWebGLContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteWebGLContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.WEBGL,
|
||||
+ /*siteSettingsCategory*/ SiteSettingsCategory.Type.WEBGL,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "webgl",
|
||||
+ /*profilePrefKey*/ "webgl");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public ContentSettingsResources.ResourceItem getResourceItem() {
|
||||
+ return new ContentSettingsResources.ResourceItem(
|
||||
+ /*icon*/ R.drawable.web_asset,
|
||||
+ /*title*/ R.string.webgl_permission_title,
|
||||
+ /*defaultEnabledValue*/ getDefaultEnabledValue(),
|
||||
+ /*defaultDisabledValue*/ getDefaultDisabledValue(),
|
||||
+ /*enabledSummary*/ R.string.website_settings_category_webgl_enabled,
|
||||
+ /*disabledSummary*/ R.string.website_settings_category_webgl_disabled);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ return R.string.website_settings_category_webgl_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ return R.string.website_settings_category_webgl_disabled;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean requiresTriStateContentSetting() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showOnlyDescriptions() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getAddExceptionDialogMessage() {
|
||||
+ return R.string.website_settings_category_webgl_enabled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
@@ -44,7 +44,7 @@ public class SiteSettingsCategory {
|
||||
Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY,
|
||||
Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE,
|
||||
Type.FEDERATED_IDENTITY_API, Type.TIMEZONE_OVERRIDE, Type.AUTOPLAY, Type.JAVASCRIPT_JIT,
|
||||
- Type.IMAGES})
|
||||
+ Type.IMAGES, Type.WEBGL})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Type {
|
||||
// All updates here must also be reflected in {@link #preferenceKey(int)
|
||||
@@ -79,10 +79,11 @@ public class SiteSettingsCategory {
|
||||
int AUTOPLAY = 27;
|
||||
int JAVASCRIPT_JIT = 28;
|
||||
int IMAGES = 29;
|
||||
+ int WEBGL = 30;
|
||||
/**
|
||||
* Number of handled categories used for calculating array sizes.
|
||||
*/
|
||||
- int NUM_ENTRIES = 30;
|
||||
+ int NUM_ENTRIES = 31;
|
||||
}
|
||||
|
||||
private final BrowserContextHandle mBrowserContextHandle;
|
||||
diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/components/browser_ui/strings/android/browser_ui_strings.grd
|
||||
--- a/components/browser_ui/strings/android/browser_ui_strings.grd
|
||||
+++ b/components/browser_ui/strings/android/browser_ui_strings.grd
|
||||
@@ -174,6 +174,7 @@
|
||||
<release seq="1">
|
||||
<messages fallback_to_english="true">
|
||||
<part file="site_settings.grdp" />
|
||||
+ <part file="webgl.grdp" />
|
||||
|
||||
<message name="IDS_GOT_IT" desc="Button for the user to accept a disclosure/message">
|
||||
Got it
|
||||
diff --git a/components/browser_ui/strings/android/webgl.grdp b/components/browser_ui/strings/android/webgl.grdp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/strings/android/webgl.grdp
|
||||
@@ -0,0 +1,18 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<grit-part>
|
||||
+ <message name="IDS_SITE_SETTINGS_TYPE_WEBGL" desc="The label used for webgl site settings controls.">
|
||||
+ Webgl
|
||||
+ </message>
|
||||
+ <message name="IDS_SITE_SETTINGS_TYPE_WEBGL_MID_SENTENCE" desc="The label used for webgl site settings controls when used mid-sentence.">
|
||||
+ webgl
|
||||
+ </message>
|
||||
+ <message name="IDS_WEBGL_PERMISSION_TITLE" desc="Title of the permission to use webgl [CHAR-LIMIT=32]">
|
||||
+ Webgl
|
||||
+ </message>
|
||||
+ <message name="IDS_WEBSITE_SETTINGS_CATEGORY_WEBGL_ENABLED" desc="Summary text explaining that webgl is full enabled.">
|
||||
+ Enabled
|
||||
+ </message>
|
||||
+ <message name="IDS_WEBSITE_SETTINGS_CATEGORY_WEBGL_DISABLED" desc="Summary text explaining that webgl is full disabled.">
|
||||
+ Disabled
|
||||
+ </message>
|
||||
+</grit-part>
|
||||
diff --git a/components/components_strings.grd b/components/components_strings.grd
|
||||
--- a/components/components_strings.grd
|
||||
+++ b/components/components_strings.grd
|
||||
@@ -336,6 +336,7 @@
|
||||
<part file="version_ui_strings.grdp" />
|
||||
<part file="webapps_strings.grdp" />
|
||||
<part file="user_scripts/strings/userscripts_strings.grdp" />
|
||||
+ <part file="browser_ui/strings/android/webgl.grdp" />
|
||||
|
||||
<if expr="not is_ios">
|
||||
<part file="management_strings.grdp" />
|
||||
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
--- a/components/content_settings/core/browser/content_settings_registry.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
@@ -677,6 +677,20 @@ void ContentSettingsRegistry::Init() {
|
||||
ContentSettingsInfo::INHERIT_IN_INCOGNITO,
|
||||
ContentSettingsInfo::PERSISTENT,
|
||||
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY);
|
||||
+
|
||||
+ Register(ContentSettingsType::WEBGL, "webgl", CONTENT_SETTING_BLOCK,
|
||||
+ WebsiteSettingsInfo::SYNCABLE,
|
||||
+ AllowlistedSchemes(),
|
||||
+ ValidSettings(CONTENT_SETTING_ALLOW,
|
||||
+ CONTENT_SETTING_BLOCK),
|
||||
+ WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
|
||||
+ WebsiteSettingsRegistry::PLATFORM_ANDROID,
|
||||
+ ContentSettingsInfo::INHERIT_IN_INCOGNITO,
|
||||
+ ContentSettingsInfo::PERSISTENT,
|
||||
+ ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS,
|
||||
+ /*show_into_info_page*/ true,
|
||||
+ /*permission_type_ui*/ IDS_SITE_SETTINGS_TYPE_WEBGL,
|
||||
+ /*permission_type_ui_mid_sentence*/ IDS_SITE_SETTINGS_TYPE_WEBGL_MID_SENTENCE);
|
||||
}
|
||||
|
||||
void ContentSettingsRegistry::Register(
|
||||
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
--- a/components/content_settings/core/browser/content_settings_utils.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
@@ -155,6 +155,8 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
|
||||
std::string timezone;
|
||||
map->GetTimezoneOverrideValue(timezone);
|
||||
rules->timezone_override_value = timezone;
|
||||
+ map->GetSettingsForOneType(ContentSettingsType::WEBGL,
|
||||
+ &(rules->webgl_rules));
|
||||
}
|
||||
|
||||
bool IsMorePermissive(ContentSetting a, ContentSetting b) {
|
||||
diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
|
||||
--- a/components/content_settings/core/common/content_settings.cc
|
||||
+++ b/components/content_settings/core/common/content_settings.cc
|
||||
@@ -204,7 +204,8 @@ bool RendererContentSettingRules::IsRendererContentSetting(
|
||||
content_type == ContentSettingsType::AUTOPLAY ||
|
||||
content_type == ContentSettingsType::MIXEDSCRIPT ||
|
||||
content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT ||
|
||||
- content_type == ContentSettingsType::TIMEZONE_OVERRIDE;
|
||||
+ content_type == ContentSettingsType::TIMEZONE_OVERRIDE ||
|
||||
+ content_type == ContentSettingsType::WEBGL;
|
||||
}
|
||||
|
||||
void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
|
||||
diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h
|
||||
--- a/components/content_settings/core/common/content_settings.h
|
||||
+++ b/components/content_settings/core/common/content_settings.h
|
||||
@@ -97,6 +97,7 @@ struct RendererContentSettingRules {
|
||||
ContentSettingsForOneType auto_dark_content_rules;
|
||||
ContentSettingsForOneType timezone_override_rules;
|
||||
std::string timezone_override_value;
|
||||
+ ContentSettingsForOneType webgl_rules;
|
||||
};
|
||||
|
||||
namespace content_settings {
|
||||
diff --git a/components/content_settings/core/common/content_settings.mojom b/components/content_settings/core/common/content_settings.mojom
|
||||
--- a/components/content_settings/core/common/content_settings.mojom
|
||||
+++ b/components/content_settings/core/common/content_settings.mojom
|
||||
@@ -81,4 +81,5 @@ struct RendererContentSettingRules {
|
||||
array<ContentSettingPatternSource> auto_dark_content_rules;
|
||||
array<ContentSettingPatternSource> timezone_override_rules;
|
||||
string timezone_override_value;
|
||||
+ array<ContentSettingPatternSource> webgl_rules;
|
||||
};
|
||||
diff --git a/components/content_settings/core/common/content_settings_mojom_traits.cc b/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
--- a/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
+++ b/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
@@ -104,7 +104,8 @@ bool StructTraits<content_settings::mojom::RendererContentSettingRulesDataView,
|
||||
data.ReadMixedContentRules(&out->mixed_content_rules) &&
|
||||
data.ReadAutoDarkContentRules(&out->auto_dark_content_rules) &&
|
||||
data.ReadTimezoneOverrideRules(&out->timezone_override_rules) &&
|
||||
- data.ReadTimezoneOverrideValue(&out->timezone_override_value);
|
||||
+ data.ReadTimezoneOverrideValue(&out->timezone_override_value) &&
|
||||
+ data.ReadWebglRules(&out->webgl_rules);
|
||||
}
|
||||
|
||||
} // namespace mojo
|
||||
diff --git a/components/content_settings/core/common/content_settings_mojom_traits.h b/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
--- a/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
+++ b/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
@@ -165,6 +165,11 @@ struct StructTraits<
|
||||
return r.timezone_override_value;
|
||||
}
|
||||
|
||||
+ static const std::vector<ContentSettingPatternSource>& webgl_rules(
|
||||
+ const RendererContentSettingRules& r) {
|
||||
+ return r.webgl_rules;
|
||||
+ }
|
||||
+
|
||||
static bool Read(
|
||||
content_settings::mojom::RendererContentSettingRulesDataView data,
|
||||
RendererContentSettingRules* out);
|
||||
diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h
|
||||
--- a/components/content_settings/core/common/content_settings_types.h
|
||||
+++ b/components/content_settings/core/common/content_settings_types.h
|
||||
@@ -287,6 +287,8 @@ enum class ContentSettingsType : int32_t {
|
||||
// site instead of the mobile one.
|
||||
REQUEST_DESKTOP_SITE,
|
||||
|
||||
+ WEBGL,
|
||||
+
|
||||
// Setting to indicate whether browser should allow signing into a website via
|
||||
// the browser FedCM API.
|
||||
FEDERATED_IDENTITY_API,
|
||||
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
@@ -455,6 +455,15 @@ void ContentSettingsAgentImpl::ClearBlockedContentSettings() {
|
||||
cached_script_permissions_.clear();
|
||||
}
|
||||
|
||||
+bool ContentSettingsAgentImpl::AllowWebgl(bool enabled_per_settings) {
|
||||
+ if (!content_setting_rules_)
|
||||
+ return false;
|
||||
+ blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
+ return CONTENT_SETTING_ALLOW == GetContentSettingFromRules(
|
||||
+ content_setting_rules_->webgl_rules,
|
||||
+ url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL());
|
||||
+}
|
||||
+
|
||||
bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
|
||||
if (should_allowlist_)
|
||||
return true;
|
||||
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
--- a/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
@@ -94,6 +94,7 @@ class ContentSettingsAgentImpl
|
||||
bool AllowAutoplay(bool default_value) override;
|
||||
bool AllowPopupsAndRedirects(bool default_value) override;
|
||||
bool ShouldAutoupgradeMixedContent() override;
|
||||
+ bool AllowWebgl(bool enabled_per_settings) override;
|
||||
|
||||
bool allow_running_insecure_content() const {
|
||||
return allow_running_insecure_content_;
|
||||
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
|
||||
--- a/third_party/blink/public/platform/web_content_settings_client.h
|
||||
+++ b/third_party/blink/public/platform/web_content_settings_client.h
|
||||
@@ -99,6 +99,8 @@ class WebContentSettingsClient {
|
||||
return default_value;
|
||||
}
|
||||
|
||||
+ virtual bool AllowWebgl(bool default_value) { return default_value; }
|
||||
+
|
||||
// Reports that passive mixed content was found at the provided URL.
|
||||
virtual void PassiveInsecureContentFound(const WebURL&) {}
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc
|
||||
--- a/third_party/blink/renderer/core/execution_context/execution_context.cc
|
||||
+++ b/third_party/blink/renderer/core/execution_context/execution_context.cc
|
||||
@@ -64,6 +64,29 @@
|
||||
|
||||
namespace blink {
|
||||
|
||||
+blink::WebContentSettingsClient* GetContentSettingsClientFor(
|
||||
+ ExecutionContext* context) {
|
||||
+ blink::WebContentSettingsClient* settings = nullptr;
|
||||
+ if (!context)
|
||||
+ return settings;
|
||||
+ if (auto* window = blink::DynamicTo<blink::LocalDOMWindow>(context)) {
|
||||
+ auto* frame = window->GetFrame();
|
||||
+ if (frame)
|
||||
+ settings = frame->GetContentSettingsClient();
|
||||
+ } else if (context->IsWorkerGlobalScope()) {
|
||||
+ settings =
|
||||
+ blink::To<blink::WorkerGlobalScope>(context)->ContentSettingsClient();
|
||||
+ }
|
||||
+ return settings;
|
||||
+}
|
||||
+
|
||||
+bool AllowWebgl(ExecutionContext* context) {
|
||||
+ blink::WebContentSettingsClient* settings = GetContentSettingsClientFor(context);
|
||||
+ if (settings)
|
||||
+ return settings->AllowWebgl(false);
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
ExecutionContext::ExecutionContext(v8::Isolate* isolate, Agent* agent)
|
||||
: isolate_(isolate),
|
||||
security_context_(this),
|
||||
diff --git a/third_party/blink/renderer/core/execution_context/execution_context.h b/third_party/blink/renderer/core/execution_context/execution_context.h
|
||||
--- a/third_party/blink/renderer/core/execution_context/execution_context.h
|
||||
+++ b/third_party/blink/renderer/core/execution_context/execution_context.h
|
||||
@@ -97,6 +97,7 @@ class SecurityOrigin;
|
||||
class ScriptState;
|
||||
class ScriptWrappable;
|
||||
class TrustedTypePolicyFactory;
|
||||
+class WebContentSettingsClient;
|
||||
|
||||
enum ReasonForCallingCanExecuteScripts {
|
||||
kAboutToExecuteScript,
|
||||
@@ -105,6 +106,10 @@ enum ReasonForCallingCanExecuteScripts {
|
||||
|
||||
enum ReferrerPolicySource { kPolicySourceHttpHeader, kPolicySourceMetaTag };
|
||||
|
||||
+CORE_EXPORT bool AllowWebgl(ExecutionContext* context);
|
||||
+CORE_EXPORT WebContentSettingsClient* GetContentSettingsClientFor(
|
||||
+ ExecutionContext* context);
|
||||
+
|
||||
// An environment in which script can execute. This class exposes the common
|
||||
// properties of script execution environments on the web (i.e, common between
|
||||
// script executing in a window and script executing in a worker), such as:
|
||||
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
|
||||
--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
|
||||
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
|
||||
@@ -242,6 +242,13 @@ void WebGLRenderingContextBase::InitializeWebGLContextLimits(
|
||||
}
|
||||
}
|
||||
|
||||
+bool WebGLRenderingContextBase::AllowWebglForHost(blink::CanvasRenderingContextHost* host) {
|
||||
+ if (!host)
|
||||
+ return false;
|
||||
+ blink::ExecutionContext* context = host->GetTopExecutionContext();
|
||||
+ return blink::AllowWebgl(context);
|
||||
+}
|
||||
+
|
||||
unsigned WebGLRenderingContextBase::CurrentMaxGLContexts() {
|
||||
MutexLocker locker(WebGLContextLimitMutex());
|
||||
DCHECK(webgl_context_limits_initialized_);
|
||||
@@ -488,25 +495,6 @@ static String ExtractWebGLContextCreationError(
|
||||
const Platform::GraphicsInfo& info) {
|
||||
StringBuilder builder;
|
||||
builder.Append("Could not create a WebGL context");
|
||||
- FormatWebGLStatusString(
|
||||
- "VENDOR",
|
||||
- info.vendor_id ? String::Format("0x%04x", info.vendor_id) : "0xffff",
|
||||
- builder);
|
||||
- FormatWebGLStatusString(
|
||||
- "DEVICE",
|
||||
- info.device_id ? String::Format("0x%04x", info.device_id) : "0xffff",
|
||||
- builder);
|
||||
- FormatWebGLStatusString("GL_VENDOR", info.vendor_info, builder);
|
||||
- FormatWebGLStatusString("GL_RENDERER", info.renderer_info, builder);
|
||||
- FormatWebGLStatusString("GL_VERSION", info.driver_version, builder);
|
||||
- FormatWebGLStatusString("Sandboxed", info.sandboxed ? "yes" : "no", builder);
|
||||
- FormatWebGLStatusString("Optimus", info.optimus ? "yes" : "no", builder);
|
||||
- FormatWebGLStatusString("AMD switchable", info.amd_switchable ? "yes" : "no",
|
||||
- builder);
|
||||
- FormatWebGLStatusString(
|
||||
- "Reset notification strategy",
|
||||
- String::Format("0x%04x", info.reset_notification_strategy).Utf8().c_str(),
|
||||
- builder);
|
||||
FormatWebGLStatusString("ErrorMessage", info.error_message.Utf8().c_str(),
|
||||
builder);
|
||||
builder.Append('.');
|
||||
@@ -574,6 +562,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider(
|
||||
const CanvasContextCreationAttributesCore& attributes,
|
||||
Platform::ContextType context_type,
|
||||
Platform::GraphicsInfo* graphics_info) {
|
||||
+ if (!AllowWebglForHost(host)) {
|
||||
+ host->HostDispatchEvent(WebGLContextEvent::Create(
|
||||
+ event_type_names::kWebglcontextcreationerror,
|
||||
+ "disabled by site settings policy."));
|
||||
+ return nullptr;
|
||||
+ }
|
||||
if ((context_type == Platform::kWebGL1ContextType &&
|
||||
!host->IsWebGL1Enabled()) ||
|
||||
(context_type == Platform::kWebGL2ContextType &&
|
||||
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
|
||||
--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
|
||||
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
|
||||
@@ -1771,6 +1771,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
|
||||
DOMArrayBufferView* pixels,
|
||||
int64_t offset);
|
||||
|
||||
+ static bool AllowWebglForHost(blink::CanvasRenderingContextHost* host);
|
||||
+
|
||||
// Record Canvas/OffscreenCanvas.RenderingContextDrawnTo at the first draw
|
||||
// call.
|
||||
void RecordUKMCanvasDrawnToAtFirstDrawCall();
|
||||
--
|
||||
2.25.1
|
||||
@@ -1,382 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Fri, 6 May 2022 14:27:17 +0000
|
||||
Subject: Add webRTC site settings
|
||||
|
||||
Requires patch: Content-settings-infrastructure.patch
|
||||
---
|
||||
.../browser_ui/site_settings/android/BUILD.gn | 3 +
|
||||
.../BromiteCustomContentSettingImpl.java | 1 +
|
||||
.../BromiteWebRTCContentSetting.java | 86 +++++++++++++++++++
|
||||
.../site_settings/SiteSettingsCategory.java | 5 +-
|
||||
.../strings/android/browser_ui_strings.grd | 1 +
|
||||
.../browser_ui/strings/android/webrtc.grdp | 18 ++++
|
||||
components/components_strings.grd | 1 +
|
||||
.../core/browser/content_settings_registry.cc | 14 +++
|
||||
.../core/browser/content_settings_utils.cc | 2 +
|
||||
.../core/common/content_settings.cc | 3 +-
|
||||
.../core/common/content_settings.h | 1 +
|
||||
.../core/common/content_settings.mojom | 1 +
|
||||
.../common/content_settings_mojom_traits.cc | 3 +-
|
||||
.../common/content_settings_mojom_traits.h | 5 ++
|
||||
.../core/common/content_settings_types.h | 2 +
|
||||
.../renderer/content_settings_agent_impl.cc | 9 ++
|
||||
.../renderer/content_settings_agent_impl.h | 1 +
|
||||
.../platform/web_content_settings_client.h | 2 +
|
||||
.../peer_connection_dependency_factory.cc | 5 ++
|
||||
19 files changed, 159 insertions(+), 4 deletions(-)
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteWebRTCContentSetting.java
|
||||
create mode 100644 components/browser_ui/strings/android/webrtc.grdp
|
||||
|
||||
diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn
|
||||
--- a/components/browser_ui/site_settings/android/BUILD.gn
|
||||
+++ b/components/browser_ui/site_settings/android/BUILD.gn
|
||||
@@ -75,6 +75,9 @@ android_library("java") {
|
||||
sources += [
|
||||
"java/src/org/chromium/components/browser_ui/site_settings/BromiteWebGLContentSetting.java",
|
||||
]
|
||||
+ sources += [
|
||||
+ "java/src/org/chromium/components/browser_ui/site_settings/BromiteWebRTCContentSetting.java",
|
||||
+ ]
|
||||
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
|
||||
resources_package = "org.chromium.components.browser_ui.site_settings"
|
||||
deps = [
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java
|
||||
@@ -44,6 +44,7 @@ public abstract class BromiteCustomContentSettingImpl {
|
||||
static {
|
||||
mItemList = new ArrayList<BromiteCustomContentSetting>();
|
||||
mItemList.add(new BromiteWebGLContentSetting());
|
||||
+ mItemList.add(new BromiteWebRTCContentSetting());
|
||||
}
|
||||
|
||||
public static SiteSettingsCategory createFromType(
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteWebRTCContentSetting.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteWebRTCContentSetting.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteWebRTCContentSetting.java
|
||||
@@ -0,0 +1,86 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
+ Bromite is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation, either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ Bromite is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with Bromite. If not, see <https://www.gnu.org/licenses/>.
|
||||
+*/
|
||||
+
|
||||
+package org.chromium.components.browser_ui.site_settings;
|
||||
+
|
||||
+import org.chromium.components.browser_ui.site_settings.ContentSettingsResources;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory;
|
||||
+import org.chromium.components.content_settings.ContentSettingValues;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.content_public.browser.BrowserContextHandle;
|
||||
+
|
||||
+import androidx.annotation.Nullable;
|
||||
+import androidx.preference.Preference;
|
||||
+import androidx.preference.PreferenceScreen;
|
||||
+
|
||||
+import java.util.ArrayList;
|
||||
+
|
||||
+public class BromiteWebRTCContentSetting extends BromiteCustomContentSetting {
|
||||
+ public BromiteWebRTCContentSetting() {
|
||||
+ super(/*contentSettingsType*/ ContentSettingsType.WEBRTC,
|
||||
+ /*siteSettingsCategory*/ SiteSettingsCategory.Type.WEBRTC,
|
||||
+ /*defaultEnabledValue*/ ContentSettingValues.ALLOW,
|
||||
+ /*defaultDisabledValue*/ ContentSettingValues.BLOCK,
|
||||
+ /*allowException*/ true,
|
||||
+ /*preferenceKey*/ "webrtc",
|
||||
+ /*profilePrefKey*/ "webrtc");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public ContentSettingsResources.ResourceItem getResourceItem() {
|
||||
+ return new ContentSettingsResources.ResourceItem(
|
||||
+ /*icon*/ R.drawable.web_asset,
|
||||
+ /*title*/ R.string.webrtc_permission_title,
|
||||
+ /*defaultEnabledValue*/ getDefaultEnabledValue(),
|
||||
+ /*defaultDisabledValue*/ getDefaultDisabledValue(),
|
||||
+ /*enabledSummary*/ R.string.website_settings_category_webrtc_enabled,
|
||||
+ /*disabledSummary*/ R.string.website_settings_category_webrtc_disabled);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getCategorySummary(@Nullable @ContentSettingValues int value) {
|
||||
+ switch (value) {
|
||||
+ case ContentSettingValues.ALLOW:
|
||||
+ return R.string.website_settings_category_webrtc_enabled;
|
||||
+ case ContentSettingValues.BLOCK:
|
||||
+ return R.string.website_settings_category_webrtc_disabled;
|
||||
+ default:
|
||||
+ // this will cause a runtime exception
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean requiresTriStateContentSetting() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showOnlyDescriptions() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getAddExceptionDialogMessage() {
|
||||
+ return R.string.website_settings_category_webrtc_enabled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Boolean considerException(SiteSettingsCategory category, @ContentSettingValues int value) {
|
||||
+ return value != ContentSettingValues.BLOCK;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java
|
||||
@@ -44,7 +44,7 @@ public class SiteSettingsCategory {
|
||||
Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY,
|
||||
Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE,
|
||||
Type.FEDERATED_IDENTITY_API, Type.TIMEZONE_OVERRIDE, Type.AUTOPLAY, Type.JAVASCRIPT_JIT,
|
||||
- Type.IMAGES, Type.WEBGL})
|
||||
+ Type.IMAGES, Type.WEBGL, Type.WEBRTC})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Type {
|
||||
// All updates here must also be reflected in {@link #preferenceKey(int)
|
||||
@@ -80,10 +80,11 @@ public class SiteSettingsCategory {
|
||||
int JAVASCRIPT_JIT = 28;
|
||||
int IMAGES = 29;
|
||||
int WEBGL = 30;
|
||||
+ int WEBRTC = 31;
|
||||
/**
|
||||
* Number of handled categories used for calculating array sizes.
|
||||
*/
|
||||
- int NUM_ENTRIES = 31;
|
||||
+ int NUM_ENTRIES = 32;
|
||||
}
|
||||
|
||||
private final BrowserContextHandle mBrowserContextHandle;
|
||||
diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/components/browser_ui/strings/android/browser_ui_strings.grd
|
||||
--- a/components/browser_ui/strings/android/browser_ui_strings.grd
|
||||
+++ b/components/browser_ui/strings/android/browser_ui_strings.grd
|
||||
@@ -175,6 +175,7 @@
|
||||
<messages fallback_to_english="true">
|
||||
<part file="site_settings.grdp" />
|
||||
<part file="webgl.grdp" />
|
||||
+ <part file="webrtc.grdp" />
|
||||
|
||||
<message name="IDS_GOT_IT" desc="Button for the user to accept a disclosure/message">
|
||||
Got it
|
||||
diff --git a/components/browser_ui/strings/android/webrtc.grdp b/components/browser_ui/strings/android/webrtc.grdp
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/browser_ui/strings/android/webrtc.grdp
|
||||
@@ -0,0 +1,18 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<grit-part>
|
||||
+ <message name="IDS_SITE_SETTINGS_TYPE_WEBRTC" desc="The label used for webrtc site settings controls.">
|
||||
+ WebRTC
|
||||
+ </message>
|
||||
+ <message name="IDS_SITE_SETTINGS_TYPE_WEBRTC_MID_SENTENCE" desc="The label used for webrtc site settings controls when used mid-sentence.">
|
||||
+ webRTC
|
||||
+ </message>
|
||||
+ <message name="IDS_WEBRTC_PERMISSION_TITLE" desc="Title of the permission to use webrtc [CHAR-LIMIT=32]">
|
||||
+ WebRTC
|
||||
+ </message>
|
||||
+ <message name="IDS_WEBSITE_SETTINGS_CATEGORY_WEBRTC_ENABLED" desc="Summary text explaining that webrtc is full enabled.">
|
||||
+ Enabled
|
||||
+ </message>
|
||||
+ <message name="IDS_WEBSITE_SETTINGS_CATEGORY_WEBRTC_DISABLED" desc="Summary text explaining that webrtc is full disabled.">
|
||||
+ Disabled
|
||||
+ </message>
|
||||
+</grit-part>
|
||||
diff --git a/components/components_strings.grd b/components/components_strings.grd
|
||||
--- a/components/components_strings.grd
|
||||
+++ b/components/components_strings.grd
|
||||
@@ -337,6 +337,7 @@
|
||||
<part file="webapps_strings.grdp" />
|
||||
<part file="user_scripts/strings/userscripts_strings.grdp" />
|
||||
<part file="browser_ui/strings/android/webgl.grdp" />
|
||||
+ <part file="browser_ui/strings/android/webrtc.grdp" />
|
||||
|
||||
<if expr="not is_ios">
|
||||
<part file="management_strings.grdp" />
|
||||
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
--- a/components/content_settings/core/browser/content_settings_registry.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
@@ -691,6 +691,20 @@ void ContentSettingsRegistry::Init() {
|
||||
/*show_into_info_page*/ true,
|
||||
/*permission_type_ui*/ IDS_SITE_SETTINGS_TYPE_WEBGL,
|
||||
/*permission_type_ui_mid_sentence*/ IDS_SITE_SETTINGS_TYPE_WEBGL_MID_SENTENCE);
|
||||
+
|
||||
+ Register(ContentSettingsType::WEBRTC, "webrtc", CONTENT_SETTING_BLOCK,
|
||||
+ WebsiteSettingsInfo::SYNCABLE,
|
||||
+ AllowlistedSchemes(),
|
||||
+ ValidSettings(CONTENT_SETTING_ALLOW,
|
||||
+ CONTENT_SETTING_BLOCK),
|
||||
+ WebsiteSettingsInfo::SINGLE_ORIGIN_WITH_EMBEDDED_EXCEPTIONS_SCOPE,
|
||||
+ WebsiteSettingsRegistry::PLATFORM_ANDROID,
|
||||
+ ContentSettingsInfo::INHERIT_IN_INCOGNITO,
|
||||
+ ContentSettingsInfo::PERSISTENT,
|
||||
+ ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS,
|
||||
+ /*show_into_info_page*/ true,
|
||||
+ /*permission_type_ui*/ IDS_SITE_SETTINGS_TYPE_WEBRTC,
|
||||
+ /*permission_type_ui_mid_sentence*/ IDS_SITE_SETTINGS_TYPE_WEBRTC_MID_SENTENCE);
|
||||
}
|
||||
|
||||
void ContentSettingsRegistry::Register(
|
||||
diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
--- a/components/content_settings/core/browser/content_settings_utils.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_utils.cc
|
||||
@@ -157,6 +157,8 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map,
|
||||
rules->timezone_override_value = timezone;
|
||||
map->GetSettingsForOneType(ContentSettingsType::WEBGL,
|
||||
&(rules->webgl_rules));
|
||||
+ map->GetSettingsForOneType(ContentSettingsType::WEBRTC,
|
||||
+ &(rules->webrtc_rules));
|
||||
}
|
||||
|
||||
bool IsMorePermissive(ContentSetting a, ContentSetting b) {
|
||||
diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
|
||||
--- a/components/content_settings/core/common/content_settings.cc
|
||||
+++ b/components/content_settings/core/common/content_settings.cc
|
||||
@@ -205,7 +205,8 @@ bool RendererContentSettingRules::IsRendererContentSetting(
|
||||
content_type == ContentSettingsType::MIXEDSCRIPT ||
|
||||
content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT ||
|
||||
content_type == ContentSettingsType::TIMEZONE_OVERRIDE ||
|
||||
- content_type == ContentSettingsType::WEBGL;
|
||||
+ content_type == ContentSettingsType::WEBGL ||
|
||||
+ content_type == ContentSettingsType::WEBRTC;
|
||||
}
|
||||
|
||||
void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
|
||||
diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h
|
||||
--- a/components/content_settings/core/common/content_settings.h
|
||||
+++ b/components/content_settings/core/common/content_settings.h
|
||||
@@ -98,6 +98,7 @@ struct RendererContentSettingRules {
|
||||
ContentSettingsForOneType timezone_override_rules;
|
||||
std::string timezone_override_value;
|
||||
ContentSettingsForOneType webgl_rules;
|
||||
+ ContentSettingsForOneType webrtc_rules;
|
||||
};
|
||||
|
||||
namespace content_settings {
|
||||
diff --git a/components/content_settings/core/common/content_settings.mojom b/components/content_settings/core/common/content_settings.mojom
|
||||
--- a/components/content_settings/core/common/content_settings.mojom
|
||||
+++ b/components/content_settings/core/common/content_settings.mojom
|
||||
@@ -82,4 +82,5 @@ struct RendererContentSettingRules {
|
||||
array<ContentSettingPatternSource> timezone_override_rules;
|
||||
string timezone_override_value;
|
||||
array<ContentSettingPatternSource> webgl_rules;
|
||||
+ array<ContentSettingPatternSource> webrtc_rules;
|
||||
};
|
||||
diff --git a/components/content_settings/core/common/content_settings_mojom_traits.cc b/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
--- a/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
+++ b/components/content_settings/core/common/content_settings_mojom_traits.cc
|
||||
@@ -105,7 +105,8 @@ bool StructTraits<content_settings::mojom::RendererContentSettingRulesDataView,
|
||||
data.ReadAutoDarkContentRules(&out->auto_dark_content_rules) &&
|
||||
data.ReadTimezoneOverrideRules(&out->timezone_override_rules) &&
|
||||
data.ReadTimezoneOverrideValue(&out->timezone_override_value) &&
|
||||
- data.ReadWebglRules(&out->webgl_rules);
|
||||
+ data.ReadWebglRules(&out->webgl_rules) &&
|
||||
+ data.ReadWebrtcRules(&out->webrtc_rules);
|
||||
}
|
||||
|
||||
} // namespace mojo
|
||||
diff --git a/components/content_settings/core/common/content_settings_mojom_traits.h b/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
--- a/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
+++ b/components/content_settings/core/common/content_settings_mojom_traits.h
|
||||
@@ -170,6 +170,11 @@ struct StructTraits<
|
||||
return r.webgl_rules;
|
||||
}
|
||||
|
||||
+ static const std::vector<ContentSettingPatternSource>& webrtc_rules(
|
||||
+ const RendererContentSettingRules& r) {
|
||||
+ return r.webrtc_rules;
|
||||
+ }
|
||||
+
|
||||
static bool Read(
|
||||
content_settings::mojom::RendererContentSettingRulesDataView data,
|
||||
RendererContentSettingRules* out);
|
||||
diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h
|
||||
--- a/components/content_settings/core/common/content_settings_types.h
|
||||
+++ b/components/content_settings/core/common/content_settings_types.h
|
||||
@@ -289,6 +289,8 @@ enum class ContentSettingsType : int32_t {
|
||||
|
||||
WEBGL,
|
||||
|
||||
+ WEBRTC,
|
||||
+
|
||||
// Setting to indicate whether browser should allow signing into a website via
|
||||
// the browser FedCM API.
|
||||
FEDERATED_IDENTITY_API,
|
||||
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
@@ -464,6 +464,15 @@ bool ContentSettingsAgentImpl::AllowWebgl(bool enabled_per_settings) {
|
||||
url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL());
|
||||
}
|
||||
|
||||
+bool ContentSettingsAgentImpl::AllowWebRTC(bool enabled_per_settings) {
|
||||
+ if (!content_setting_rules_)
|
||||
+ return false;
|
||||
+ blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
+ return CONTENT_SETTING_ALLOW == GetContentSettingFromRules(
|
||||
+ content_setting_rules_->webrtc_rules,
|
||||
+ url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL());
|
||||
+}
|
||||
+
|
||||
bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const {
|
||||
if (should_allowlist_)
|
||||
return true;
|
||||
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
--- a/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
+++ b/components/content_settings/renderer/content_settings_agent_impl.h
|
||||
@@ -95,6 +95,7 @@ class ContentSettingsAgentImpl
|
||||
bool AllowPopupsAndRedirects(bool default_value) override;
|
||||
bool ShouldAutoupgradeMixedContent() override;
|
||||
bool AllowWebgl(bool enabled_per_settings) override;
|
||||
+ bool AllowWebRTC(bool enabled_per_settings) override;
|
||||
|
||||
bool allow_running_insecure_content() const {
|
||||
return allow_running_insecure_content_;
|
||||
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h
|
||||
--- a/third_party/blink/public/platform/web_content_settings_client.h
|
||||
+++ b/third_party/blink/public/platform/web_content_settings_client.h
|
||||
@@ -101,6 +101,8 @@ class WebContentSettingsClient {
|
||||
|
||||
virtual bool AllowWebgl(bool default_value) { return default_value; }
|
||||
|
||||
+ virtual bool AllowWebRTC(bool default_value) { return default_value; }
|
||||
+
|
||||
// Reports that passive mixed content was found at the provided URL.
|
||||
virtual void PassiveInsecureContentFound(const WebURL&) {}
|
||||
|
||||
diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
|
||||
--- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
|
||||
+++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
|
||||
@@ -762,6 +762,11 @@ PeerConnectionDependencyFactory::CreatePortAllocator(
|
||||
// origin.
|
||||
WebRTCIPHandlingPolicy policy =
|
||||
GetWebRTCIPHandlingPolicy(webrtc_ip_handling_policy);
|
||||
+ blink::WebContentSettingsClient* settings = web_frame->GetContentSettingsClient();
|
||||
+ if (settings && settings->AllowWebRTC(false)) {
|
||||
+ policy = kDefault;
|
||||
+ }
|
||||
+
|
||||
switch (policy) {
|
||||
// TODO(guoweis): specify the flag of disabling local candidate
|
||||
// collection when webrtc is updated.
|
||||
--
|
||||
2.25.1
|
||||
@@ -3,212 +3,39 @@ Date: Fri, 22 May 2020 22:43:27 -0400
|
||||
Subject: Allow building without enable_reporting
|
||||
|
||||
---
|
||||
.../browser/devtools/protocol/network_handler.cc | 2 ++
|
||||
.../net/cross_origin_embedder_policy_reporter.cc | 4 +++-
|
||||
.../net/cross_origin_opener_policy_reporter.cc | 16 +++++++---------
|
||||
content/browser/net/reporting_service_proxy.cc | 3 +++
|
||||
.../renderer_host/render_frame_host_impl.cc | 2 ++
|
||||
.../web_package/signed_exchange_reporter.cc | 2 ++
|
||||
...content_switch_dependent_feature_overrides.cc | 1 +
|
||||
net/reporting/reporting_service.cc | 6 ++++++
|
||||
services/network/network_context.h | 4 ++--
|
||||
services/network/public/mojom/BUILD.gn | 1 -
|
||||
.../network/public/mojom/network_context.mojom | 2 ++
|
||||
.../blink/renderer/core/frame/local_frame.cc | 3 +++
|
||||
.../blink/renderer/core/frame/local_frame.h | 6 +++---
|
||||
.../renderer/core/frame/reporting_context.cc | 9 +++++++++
|
||||
.../renderer/core/frame/reporting_context.h | 7 +++++--
|
||||
15 files changed, 50 insertions(+), 18 deletions(-)
|
||||
content/browser/BUILD.gn | 8 ++++----
|
||||
.../common/content_switch_dependent_feature_overrides.cc | 3 +++
|
||||
third_party/blink/renderer/core/frame/local_frame.cc | 3 +++
|
||||
third_party/blink/renderer/core/frame/local_frame.h | 6 +++---
|
||||
.../blink/renderer/core/frame/reporting_context.cc | 9 +++++++++
|
||||
.../blink/renderer/core/frame/reporting_context.h | 7 +++++--
|
||||
6 files changed, 27 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/content/browser/devtools/protocol/network_handler.cc b/content/browser/devtools/protocol/network_handler.cc
|
||||
--- a/content/browser/devtools/protocol/network_handler.cc
|
||||
+++ b/content/browser/devtools/protocol/network_handler.cc
|
||||
@@ -1289,6 +1289,7 @@ String BuildReportStatus(const net::ReportingReport::Status status) {
|
||||
}
|
||||
}
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -1240,6 +1240,10 @@ source_set("browser") {
|
||||
"net/browser_online_state_observer.cc",
|
||||
"net/browser_online_state_observer.h",
|
||||
"net/cookie_store_factory.cc",
|
||||
+ "net/cross_origin_embedder_policy_reporter.cc",
|
||||
+ "net/cross_origin_embedder_policy_reporter.h",
|
||||
+ "net/cross_origin_opener_policy_reporter.cc",
|
||||
+ "net/cross_origin_opener_policy_reporter.h",
|
||||
"net/network_errors_listing_ui.cc",
|
||||
"net/network_errors_listing_ui.h",
|
||||
"net/network_quality_observer_impl.cc",
|
||||
@@ -2989,10 +2993,6 @@ source_set("browser") {
|
||||
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
std::vector<GURL> ComputeReportingURLs(RenderFrameHostImpl* frame_host) {
|
||||
std::vector<GURL> urls;
|
||||
base::queue<FrameTreeNode*> queue;
|
||||
@@ -1306,6 +1307,7 @@ std::vector<GURL> ComputeReportingURLs(RenderFrameHostImpl* frame_host) {
|
||||
}
|
||||
return urls;
|
||||
}
|
||||
+#endif // BUILDFLAG(ENABLE_REPORTING)
|
||||
|
||||
} // namespace
|
||||
|
||||
diff --git a/content/browser/net/cross_origin_embedder_policy_reporter.cc b/content/browser/net/cross_origin_embedder_policy_reporter.cc
|
||||
--- a/content/browser/net/cross_origin_embedder_policy_reporter.cc
|
||||
+++ b/content/browser/net/cross_origin_embedder_policy_reporter.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "content/browser/net/cross_origin_embedder_policy_reporter.h"
|
||||
|
||||
+#include "net/base/features.h"
|
||||
#include "base/strings/string_piece.h"
|
||||
#include "base/values.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
@@ -112,6 +113,7 @@ void CrossOriginEmbedderPolicyReporter::QueueAndNotify(
|
||||
kType, context_url_, blink::mojom::ReportBody::New(std::move(list))));
|
||||
}
|
||||
if (endpoint) {
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
base::DictionaryValue body_to_pass;
|
||||
for (const auto& pair : body) {
|
||||
body_to_pass.SetString(pair.first, pair.second);
|
||||
@@ -123,7 +125,7 @@ void CrossOriginEmbedderPolicyReporter::QueueAndNotify(
|
||||
kType, *endpoint, context_url_, reporting_source_,
|
||||
network_isolation_key_,
|
||||
/*user_agent=*/absl::nullopt, std::move(body_to_pass));
|
||||
- }
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/content/browser/net/cross_origin_opener_policy_reporter.cc b/content/browser/net/cross_origin_opener_policy_reporter.cc
|
||||
--- a/content/browser/net/cross_origin_opener_policy_reporter.cc
|
||||
+++ b/content/browser/net/cross_origin_opener_policy_reporter.cc
|
||||
@@ -17,25 +17,17 @@
|
||||
#include "services/network/public/mojom/network_context.mojom.h"
|
||||
#include "services/network/public/mojom/source_location.mojom.h"
|
||||
#include "url/origin.h"
|
||||
+#include "build/build_config.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
namespace {
|
||||
|
||||
// Report attribute names (camelCase):
|
||||
-constexpr char kColumnNumber[] = "columnNumber";
|
||||
constexpr char kDisposition[] = "disposition";
|
||||
-constexpr char kEffectivePolicy[] = "effectivePolicy";
|
||||
-constexpr char kInitialPopupURL[] = "initialPopupURL";
|
||||
-constexpr char kLineNumber[] = "lineNumber";
|
||||
constexpr char kNextURL[] = "nextResponseURL";
|
||||
-constexpr char kOpeneeURL[] = "openeeURL";
|
||||
-constexpr char kOpenerURL[] = "openerURL";
|
||||
-constexpr char kOtherDocumentURL[] = "otherDocumentURL";
|
||||
constexpr char kPreviousURL[] = "previousResponseURL";
|
||||
-constexpr char kProperty[] = "property";
|
||||
constexpr char kReferrer[] = "referrer";
|
||||
-constexpr char kSourceFile[] = "sourceFile";
|
||||
constexpr char kType[] = "type";
|
||||
|
||||
// Report attribute values:
|
||||
@@ -44,6 +36,7 @@ constexpr char kDispositionReporting[] = "reporting";
|
||||
constexpr char kTypeFromResponse[] = "navigation-from-response";
|
||||
constexpr char kTypeToResponse[] = "navigation-to-response";
|
||||
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
std::string ToString(network::mojom::CrossOriginOpenerPolicyValue coop_value) {
|
||||
switch (coop_value) {
|
||||
case network::mojom::CrossOriginOpenerPolicyValue::kUnsafeNone:
|
||||
@@ -59,6 +52,7 @@ std::string ToString(network::mojom::CrossOriginOpenerPolicyValue coop_value) {
|
||||
return "same-origin-allow-popups-plus-coep";
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
FrameTreeNode* TopLevelOpener(FrameTreeNode* frame) {
|
||||
FrameTreeNode* opener = frame->original_opener();
|
||||
@@ -229,6 +223,7 @@ void CrossOriginOpenerPolicyReporter::QueueAccessReport(
|
||||
network::mojom::SourceLocationPtr source_location,
|
||||
const std::string& reported_window_url,
|
||||
const std::string& initial_popup_url) const {
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
// Cross-Origin-Opener-Policy-Report-Only is not required to provide
|
||||
// endpoints.
|
||||
if (!coop_.report_only_reporting_endpoint)
|
||||
@@ -277,12 +272,14 @@ void CrossOriginOpenerPolicyReporter::QueueAccessReport(
|
||||
storage_partition_->GetNetworkContext()->QueueReport(
|
||||
"coop", endpoint, context_url_, reporting_source_, network_isolation_key_,
|
||||
absl::nullopt, std::move(body));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void CrossOriginOpenerPolicyReporter::QueueNavigationReport(
|
||||
base::DictionaryValue body,
|
||||
const std::string& endpoint,
|
||||
bool is_report_only) {
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
body.SetString(kDisposition,
|
||||
is_report_only ? kDispositionReporting : kDispositionEnforce);
|
||||
body.SetString(
|
||||
@@ -291,6 +288,7 @@ void CrossOriginOpenerPolicyReporter::QueueNavigationReport(
|
||||
storage_partition_->GetNetworkContext()->QueueReport(
|
||||
"coop", endpoint, context_url_, reporting_source_, network_isolation_key_,
|
||||
/*user_agent=*/absl::nullopt, std::move(body));
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace content
|
||||
diff --git a/content/browser/net/reporting_service_proxy.cc b/content/browser/net/reporting_service_proxy.cc
|
||||
--- a/content/browser/net/reporting_service_proxy.cc
|
||||
+++ b/content/browser/net/reporting_service_proxy.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/unguessable_token.h"
|
||||
#include "base/values.h"
|
||||
+#include "net/base/features.h"
|
||||
#include "content/browser/service_worker/service_worker_host.h"
|
||||
#include "content/browser/worker_host/dedicated_worker_host.h"
|
||||
#include "content/browser/worker_host/shared_worker_host.h"
|
||||
@@ -173,6 +174,7 @@ class ReportingServiceProxyImpl : public blink::mojom::ReportingServiceProxy {
|
||||
const std::string& group,
|
||||
const std::string& type,
|
||||
std::unique_ptr<base::Value> body) {
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
auto* rph = RenderProcessHost::FromID(render_process_id_);
|
||||
if (!rph)
|
||||
return;
|
||||
@@ -180,6 +182,7 @@ class ReportingServiceProxyImpl : public blink::mojom::ReportingServiceProxy {
|
||||
type, group, url, reporting_source_, network_isolation_key_,
|
||||
/*user_agent=*/absl::nullopt,
|
||||
base::Value::FromUniquePtrValue(std::move(body)));
|
||||
+#endif
|
||||
}
|
||||
|
||||
const int render_process_id_;
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -11437,6 +11437,7 @@ void RenderFrameHostImpl::OnSameDocumentCommitProcessed(
|
||||
void RenderFrameHostImpl::MaybeGenerateCrashReport(
|
||||
base::TerminationStatus status,
|
||||
int exit_code) {
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
if (!last_committed_url_.SchemeIsHTTPOrHTTPS())
|
||||
return;
|
||||
|
||||
@@ -11486,6 +11487,7 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport(
|
||||
/*type=*/"crash", /*group=*/"default", last_committed_url_,
|
||||
GetReportingSource(), isolation_info_.network_isolation_key(),
|
||||
absl::nullopt /* user_agent */, std::move(body));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void RenderFrameHostImpl::SendCommitNavigation(
|
||||
diff --git a/content/browser/web_package/signed_exchange_reporter.cc b/content/browser/web_package/signed_exchange_reporter.cc
|
||||
--- a/content/browser/web_package/signed_exchange_reporter.cc
|
||||
+++ b/content/browser/web_package/signed_exchange_reporter.cc
|
||||
@@ -127,6 +127,7 @@ bool ShouldDowngradeReport(const char* result_string,
|
||||
void ReportResult(int frame_tree_node_id,
|
||||
network::mojom::SignedExchangeReportPtr report,
|
||||
const net::NetworkIsolationKey& network_isolation_key) {
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
FrameTreeNode* frame_tree_node =
|
||||
FrameTreeNode::GloballyFindByID(frame_tree_node_id);
|
||||
if (!frame_tree_node)
|
||||
@@ -141,6 +142,7 @@ void ReportResult(int frame_tree_node_id,
|
||||
DCHECK(partition);
|
||||
partition->GetNetworkContext()->QueueSignedExchangeReport(
|
||||
std::move(report), network_isolation_key);
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
if (enable_reporting) {
|
||||
sources += [
|
||||
- "net/cross_origin_embedder_policy_reporter.cc",
|
||||
- "net/cross_origin_embedder_policy_reporter.h",
|
||||
- "net/cross_origin_opener_policy_reporter.cc",
|
||||
- "net/cross_origin_opener_policy_reporter.h",
|
||||
"net/reporting_service_proxy.cc",
|
||||
"net/reporting_service_proxy.h",
|
||||
]
|
||||
diff --git a/content/public/common/content_switch_dependent_feature_overrides.cc b/content/public/common/content_switch_dependent_feature_overrides.cc
|
||||
--- a/content/public/common/content_switch_dependent_feature_overrides.cc
|
||||
+++ b/content/public/common/content_switch_dependent_feature_overrides.cc
|
||||
@@ -220,80 +47,30 @@ diff --git a/content/public/common/content_switch_dependent_feature_overrides.cc
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc
|
||||
--- a/net/reporting/reporting_service.cc
|
||||
+++ b/net/reporting/reporting_service.cc
|
||||
@@ -212,6 +212,12 @@ class ReportingServiceImpl : public ReportingService {
|
||||
std::unique_ptr<const base::Value> body,
|
||||
int depth,
|
||||
base::TimeTicks queued_ticks) {
|
||||
@@ -46,9 +47,11 @@ GetSwitchDependentFeatureOverrides(const base::CommandLine& command_line) {
|
||||
{switches::kEnableExperimentalWebPlatformFeatures,
|
||||
std::cref(features::kDocumentPolicyNegotiation),
|
||||
base::FeatureList::OVERRIDE_ENABLE_FEATURE},
|
||||
+#if BUILDFLAG(ENABLE_REPORTING)
|
||||
+ if ((true))
|
||||
+ return;
|
||||
+#else
|
||||
+#error Attempting to build with enable_reporting
|
||||
{switches::kEnableExperimentalWebPlatformFeatures,
|
||||
std::cref(net::features::kDocumentReporting),
|
||||
base::FeatureList::OVERRIDE_ENABLE_FEATURE},
|
||||
+#endif
|
||||
DCHECK(initialized_);
|
||||
context_->cache()->AddReport(
|
||||
reporting_source, network_isolation_key, sanitized_url, user_agent,
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -459,10 +459,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
const absl::optional<base::UnguessableToken>& reporting_source,
|
||||
const net::NetworkIsolationKey& network_isolation_key,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
- base::Value body) override;
|
||||
+ base::Value body);
|
||||
void QueueSignedExchangeReport(
|
||||
mojom::SignedExchangeReportPtr report,
|
||||
- const net::NetworkIsolationKey& network_isolation_key) override;
|
||||
+ const net::NetworkIsolationKey& network_isolation_key);
|
||||
void AddDomainReliabilityContextForTesting(
|
||||
const GURL& origin,
|
||||
const GURL& upload_url,
|
||||
diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mojom/BUILD.gn
|
||||
--- a/services/network/public/mojom/BUILD.gn
|
||||
+++ b/services/network/public/mojom/BUILD.gn
|
||||
@@ -963,7 +963,6 @@ mojom("mojom") {
|
||||
export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
|
||||
export_header_blink = "third_party/blink/public/platform/web_common.h"
|
||||
if (enable_reporting) {
|
||||
- enabled_features += [ "enable_reporting" ]
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1043,6 +1043,7 @@ interface NetworkContext {
|
||||
// provided |network_isolation_key|.
|
||||
//
|
||||
// Spec: https://w3c.github.io/reporting/#concept-reports
|
||||
+ [EnableIf=enable_reporting]
|
||||
QueueReport(string type,
|
||||
string group,
|
||||
url.mojom.Url url,
|
||||
@@ -1056,6 +1057,7 @@ interface NetworkContext {
|
||||
// Note that this queued report will never be delivered if no reporting
|
||||
// endpoint matching is registered for with the provided
|
||||
// |network_isolation_key|.
|
||||
+ [EnableIf=enable_reporting]
|
||||
QueueSignedExchangeReport(SignedExchangeReport report,
|
||||
NetworkIsolationKey network_isolation_key);
|
||||
|
||||
{switches::kEnableExperimentalWebPlatformFeatures,
|
||||
std::cref(features::kExperimentalContentSecurityPolicyFeatures),
|
||||
base::FeatureList::OVERRIDE_ENABLE_FEATURE},
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "build/build_config.h"
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "base/values.h"
|
||||
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
|
||||
#include "mojo/public/cpp/system/message_pipe.h"
|
||||
+#include "net/net_buildflags.h"
|
||||
#include "services/data_decoder/public/mojom/resource_snapshot_for_web_bundle.mojom-blink.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/mojom/content_security_policy.mojom-blink.h"
|
||||
@@ -2334,9 +2335,11 @@ const base::UnguessableToken& LocalFrame::GetAgentClusterId() const {
|
||||
@@ -2282,9 +2283,11 @@ const base::UnguessableToken& LocalFrame::GetAgentClusterId() const {
|
||||
return base::UnguessableToken::Null();
|
||||
}
|
||||
|
||||
@@ -308,9 +85,9 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
@@ -35,9 +35,9 @@
|
||||
@@ -33,9 +33,9 @@
|
||||
|
||||
#include "base/time/default_tick_clock.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/unguessable_token.h"
|
||||
-#include "build/build_config.h"
|
||||
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"
|
||||
@@ -319,7 +96,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/b
|
||||
#include "services/device/public/mojom/device_posture_provider.mojom-blink-forward.h"
|
||||
#include "services/network/public/mojom/fetch_api.mojom-blink-forward.h"
|
||||
#include "third_party/blink/public/common/frame/frame_ad_evidence.h"
|
||||
@@ -561,9 +561,9 @@ class CORE_EXPORT LocalFrame final
|
||||
@@ -543,9 +543,9 @@ class CORE_EXPORT LocalFrame final : public Frame,
|
||||
}
|
||||
|
||||
SmoothScrollSequencer& GetSmoothScrollSequencer();
|
||||
@@ -342,7 +119,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_
|
||||
#include "third_party/blink/public/common/browser_interface_broker_proxy.h"
|
||||
#include "third_party/blink/public/platform/platform.h"
|
||||
#include "third_party/blink/public/platform/task_type.h"
|
||||
@@ -53,7 +54,9 @@ const char ReportingContext::kSupplementName[] = "ReportingContext";
|
||||
@@ -54,7 +55,9 @@ const char ReportingContext::kSupplementName[] = "ReportingContext";
|
||||
ReportingContext::ReportingContext(ExecutionContext& context)
|
||||
: Supplement<ExecutionContext>(context),
|
||||
execution_context_(context),
|
||||
@@ -352,7 +129,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_
|
||||
receiver_(this, &context) {}
|
||||
|
||||
// static
|
||||
@@ -117,7 +120,9 @@ void ReportingContext::Trace(Visitor* visitor) const {
|
||||
@@ -118,7 +121,9 @@ void ReportingContext::Trace(Visitor* visitor) const {
|
||||
visitor->Trace(observers_);
|
||||
visitor->Trace(report_buffer_);
|
||||
visitor->Trace(execution_context_);
|
||||
@@ -362,7 +139,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_
|
||||
visitor->Trace(receiver_);
|
||||
Supplement<ExecutionContext>::Trace(visitor);
|
||||
}
|
||||
@@ -139,6 +144,7 @@ void ReportingContext::CountReport(Report* report) {
|
||||
@@ -140,6 +145,7 @@ void ReportingContext::CountReport(Report* report) {
|
||||
UseCounter::Count(execution_context_, feature);
|
||||
}
|
||||
|
||||
@@ -370,7 +147,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_
|
||||
const HeapMojoRemote<mojom::blink::ReportingServiceProxy>&
|
||||
ReportingContext::GetReportingService() const {
|
||||
if (!reporting_service_.is_bound()) {
|
||||
@@ -148,6 +154,7 @@ ReportingContext::GetReportingService() const {
|
||||
@@ -149,6 +155,7 @@ ReportingContext::GetReportingService() const {
|
||||
}
|
||||
return reporting_service_;
|
||||
}
|
||||
@@ -378,7 +155,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_
|
||||
|
||||
void ReportingContext::NotifyInternal(Report* report) {
|
||||
// Buffer the report.
|
||||
@@ -170,6 +177,7 @@ void ReportingContext::NotifyInternal(Report* report) {
|
||||
@@ -171,6 +178,7 @@ void ReportingContext::NotifyInternal(Report* report) {
|
||||
|
||||
void ReportingContext::SendToReportingAPI(Report* report,
|
||||
const String& endpoint) const {
|
||||
@@ -386,7 +163,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_
|
||||
const String& type = report->type();
|
||||
if (!(type == ReportType::kCSPViolation || type == ReportType::kDeprecation ||
|
||||
type == ReportType::kPermissionsPolicyViolation ||
|
||||
@@ -227,6 +235,7 @@ void ReportingContext::SendToReportingAPI(Report* report,
|
||||
@@ -226,6 +234,7 @@ void ReportingContext::SendToReportingAPI(Report* report,
|
||||
url, endpoint, body->featureId(), body->disposition(), body->message(),
|
||||
body->sourceFile(), line_number, column_number);
|
||||
}
|
||||
@@ -405,7 +182,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.h b/third_p
|
||||
#include "third_party/blink/public/mojom/frame/reporting_observer.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/reporting/reporting.mojom-blink.h"
|
||||
#include "third_party/blink/renderer/core/core_export.h"
|
||||
@@ -55,10 +56,10 @@ class CORE_EXPORT ReportingContext : public GarbageCollected<ReportingContext>,
|
||||
@@ -53,10 +54,10 @@ class CORE_EXPORT ReportingContext : public GarbageCollected<ReportingContext>,
|
||||
private:
|
||||
// Counts the use of a report type via UseCounter.
|
||||
void CountReport(Report*);
|
||||
@@ -418,7 +195,7 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.h b/third_p
|
||||
void NotifyInternal(Report* report);
|
||||
// Send |report| via the Reporting API to |endpoint|.
|
||||
void SendToReportingAPI(Report* report, const String& endpoint) const;
|
||||
@@ -69,8 +70,10 @@ class CORE_EXPORT ReportingContext : public GarbageCollected<ReportingContext>,
|
||||
@@ -67,8 +68,10 @@ class CORE_EXPORT ReportingContext : public GarbageCollected<ReportingContext>,
|
||||
|
||||
// This is declared mutable so that the service endpoint can be cached by
|
||||
// const methods.
|
||||
@@ -429,5 +206,6 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_context.h b/third_p
|
||||
|
||||
HeapMojoReceiver<mojom::blink::ReportingObserver, ReportingContext> receiver_;
|
||||
};
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 21 Feb 2022 01:24:11 +0100
|
||||
Subject: Allow building without supervised users
|
||||
|
||||
---
|
||||
.../browser/childaccounts/ChildAccountService.java | 11 -----------
|
||||
chrome/browser/startup_data.cc | 3 ---
|
||||
.../child_accounts/child_account_service_android.cc | 9 ---------
|
||||
3 files changed, 23 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
|
||||
@@ -31,21 +31,10 @@ public class ChildAccountService {
|
||||
ThreadUtils.assertOnUiThread();
|
||||
final Activity activity = windowAndroid.getActivity().get();
|
||||
if (activity == null) {
|
||||
- PostTask.postTask(UiThreadTaskTraits.DEFAULT, () -> {
|
||||
- ChildAccountServiceJni.get().onReauthenticationFailed(nativeOnFailureCallback);
|
||||
- });
|
||||
return;
|
||||
}
|
||||
Account account = AccountUtils.createAccountFromName(accountName);
|
||||
AccountManagerFacadeProvider.getInstance().updateCredentials(account, activity, success -> {
|
||||
- if (!success) {
|
||||
- ChildAccountServiceJni.get().onReauthenticationFailed(nativeOnFailureCallback);
|
||||
- }
|
||||
});
|
||||
}
|
||||
-
|
||||
- @NativeMethods
|
||||
- interface Natives {
|
||||
- void onReauthenticationFailed(long onFailureCallbackPtr);
|
||||
- }
|
||||
}
|
||||
diff --git a/chrome/browser/startup_data.cc b/chrome/browser/startup_data.cc
|
||||
--- a/chrome/browser/startup_data.cc
|
||||
+++ b/chrome/browser/startup_data.cc
|
||||
@@ -32,9 +32,6 @@
|
||||
#include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h"
|
||||
#include "chrome/browser/profiles/pref_service_builder_utils.h"
|
||||
#include "chrome/browser/profiles/profile_key.h"
|
||||
-#include "chrome/browser/supervised_user/supervised_user_pref_store.h"
|
||||
-#include "chrome/browser/supervised_user/supervised_user_settings_service.h"
|
||||
-#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "components/keyed_service/content/browser_context_dependency_manager.h"
|
||||
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
|
||||
--- a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
|
||||
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
|
||||
@@ -39,12 +39,3 @@ void ReauthenticateChildAccount(
|
||||
env, window_android->GetJavaObject(), ConvertUTF8ToJavaString(env, email),
|
||||
reinterpret_cast<jlong>(callback_copy.release()));
|
||||
}
|
||||
-
|
||||
-void JNI_ChildAccountService_OnReauthenticationFailed(JNIEnv* env,
|
||||
- jlong jcallbackPtr) {
|
||||
- // Cast the pointer value back to a Callback and take ownership of it.
|
||||
- std::unique_ptr<base::RepeatingCallback<void()>> callback(
|
||||
- reinterpret_cast<base::RepeatingCallback<void()>*>(jcallbackPtr));
|
||||
-
|
||||
- callback->Run();
|
||||
-}
|
||||
--
|
||||
2.25.1
|
||||
@@ -3,14 +3,27 @@ Date: Thu, 2 Nov 2017 18:21:16 +0200
|
||||
Subject: Allow playing audio in background
|
||||
|
||||
---
|
||||
.../public/platform/media/web_media_player_impl.h | 3 +++
|
||||
.../renderer/platform/media/web_media_player_impl.cc | 12 +++++++++++-
|
||||
.../renderer/platform/media/web_media_player_impl.h | 3 +++
|
||||
2 files changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/third_party/blink/public/platform/media/web_media_player_impl.h b/third_party/blink/public/platform/media/web_media_player_impl.h
|
||||
--- a/third_party/blink/public/platform/media/web_media_player_impl.h
|
||||
+++ b/third_party/blink/public/platform/media/web_media_player_impl.h
|
||||
@@ -159,6 +159,9 @@ class BLINK_PLATFORM_EXPORT WebMediaPlayerImpl
|
||||
bool HasVideo() const override;
|
||||
bool HasAudio() const override;
|
||||
|
||||
+ // True is has video and it's frame size is not zero
|
||||
+ bool HasVideoNonEmptySize() const;
|
||||
+
|
||||
void EnabledAudioTracksChanged(
|
||||
const WebVector<WebMediaPlayer::TrackId>& enabledTrackIds) override;
|
||||
void SelectedVideoTrackChanged(
|
||||
diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
|
||||
--- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc
|
||||
+++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
|
||||
@@ -1214,6 +1214,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
|
||||
@@ -1118,6 +1118,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
|
||||
return pipeline_metadata_.has_audio;
|
||||
}
|
||||
|
||||
@@ -23,7 +36,7 @@ diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc
|
||||
void WebMediaPlayerImpl::EnabledAudioTracksChanged(
|
||||
const WebVector<WebMediaPlayer::TrackId>& enabledTrackIds) {
|
||||
DCHECK(main_task_runner_->BelongsToCurrentThread());
|
||||
@@ -3586,7 +3592,11 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const {
|
||||
@@ -3490,7 +3496,11 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const {
|
||||
// Audio only stream is allowed to play when in background.
|
||||
// TODO: We should check IsBackgroundOptimizationCandidate here. But we need
|
||||
// to move the logic of checking video frames out of that function.
|
||||
@@ -36,18 +49,6 @@ diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc
|
||||
return false;
|
||||
|
||||
if (using_media_player_renderer_ &&
|
||||
diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.h b/third_party/blink/renderer/platform/media/web_media_player_impl.h
|
||||
--- a/third_party/blink/renderer/platform/media/web_media_player_impl.h
|
||||
+++ b/third_party/blink/renderer/platform/media/web_media_player_impl.h
|
||||
@@ -191,6 +191,9 @@ class PLATFORM_EXPORT WebMediaPlayerImpl
|
||||
bool HasVideo() const override;
|
||||
bool HasAudio() const override;
|
||||
|
||||
+ // True is has video and it's frame size is not zero
|
||||
+ bool HasVideoNonEmptySize() const;
|
||||
+
|
||||
void EnabledAudioTracksChanged(
|
||||
const WebVector<WebMediaPlayer::TrackId>& enabledTrackIds) override;
|
||||
void SelectedVideoTrackChanged(
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -10,14 +10,15 @@ Disable prefs::kSigninAllowedOnNextStartup by default. The setting can be found
|
||||
diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/browser/signin/account_consistency_mode_manager.cc
|
||||
--- a/chrome/browser/signin/account_consistency_mode_manager.cc
|
||||
+++ b/chrome/browser/signin/account_consistency_mode_manager.cc
|
||||
@@ -112,7 +112,7 @@ AccountConsistencyModeManager::~AccountConsistencyModeManager() {}
|
||||
// static
|
||||
void AccountConsistencyModeManager::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -127,7 +127,7 @@ void AccountConsistencyModeManager::RegisterProfilePrefs(
|
||||
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
registry->RegisterBooleanPref(kDiceMigrationCompletePref, false);
|
||||
#endif
|
||||
- registry->RegisterBooleanPref(prefs::kSigninAllowedOnNextStartup, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kSigninAllowedOnNextStartup, false);
|
||||
}
|
||||
|
||||
// static
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From: samartnik <artem@brave.com>
|
||||
Date: Thu, 14 Dec 2017 16:19:50 +0200
|
||||
Subject: Always allow partner customisation
|
||||
|
||||
---
|
||||
.../PartnerBrowserCustomizations.java | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java
|
||||
@@ -324,14 +324,14 @@ public class PartnerBrowserCustomizations {
|
||||
@Override
|
||||
protected Void doInBackground() {
|
||||
try {
|
||||
- boolean systemOrPreStable =
|
||||
- (context.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) == 1
|
||||
- || !ChromeVersionInfo.isStableBuild();
|
||||
- if (!systemOrPreStable) {
|
||||
- // Only allow partner customization if this browser is a system package, or
|
||||
- // is in pre-stable channels.
|
||||
- return null;
|
||||
- }
|
||||
+ //boolean systemOrPreStable =
|
||||
+ // (context.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) == 1
|
||||
+ // || !ChromeVersionInfo.isStableBuild();
|
||||
+ //if (!systemOrPreStable) {
|
||||
+ // // Only allow partner customization if this browser is a system package, or
|
||||
+ // // is in pre-stable channels.
|
||||
+ // return null;
|
||||
+ //}
|
||||
|
||||
if (isCancelled()) return null;
|
||||
Provider provider = AppHooks.get().getCustomizationProvider();
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Tue, 5 Jun 2018 13:46:40 +0200
|
||||
Subject: Always respect async dns flag (regardless of SDK version)
|
||||
|
||||
Do not read experiment value for cronet async DNS configuration
|
||||
---
|
||||
chrome/browser/net/system_network_context_manager.cc | 2 +-
|
||||
components/cronet/url_request_context_config.cc | 3 ++-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
||||
--- a/chrome/browser/net/system_network_context_manager.cc
|
||||
+++ b/chrome/browser/net/system_network_context_manager.cc
|
||||
@@ -157,7 +157,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams(
|
||||
local_state->GetBoolean(prefs::kNtlmV2Enabled);
|
||||
#endif // defined(OS_POSIX)
|
||||
|
||||
-#if defined(OS_ANDROID)
|
||||
+#if 0
|
||||
auth_dynamic_params->android_negotiate_account_type =
|
||||
local_state->GetString(prefs::kAuthAndroidNegotiateAccountType);
|
||||
#endif // defined(OS_ANDROID)
|
||||
diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc
|
||||
--- a/components/cronet/url_request_context_config.cc
|
||||
+++ b/components/cronet/url_request_context_config.cc
|
||||
@@ -592,7 +592,8 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions(
|
||||
effective_experimental_options->RemoveKey(it.key());
|
||||
continue;
|
||||
}
|
||||
- async_dns_args->GetBoolean(kAsyncDnsEnable, &async_dns_enable);
|
||||
+ bool ignored;
|
||||
+ async_dns_args->GetBoolean(kAsyncDnsEnable, &ignored);
|
||||
} else if (it.key() == kStaleDnsFieldTrialName) {
|
||||
const base::DictionaryValue* stale_dns_args = nullptr;
|
||||
if (!it.value().GetAsDictionary(&stale_dns_args)) {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -17,8 +17,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/Homepa
|
||||
- if (PartnerBrowserCustomizations.getInstance().isHomepageProviderAvailableAndEnabled()) {
|
||||
- return PartnerBrowserCustomizations.getInstance().getHomePageUrl();
|
||||
- }
|
||||
return UrlConstants.NTP_NON_NATIVE_URL;
|
||||
}
|
||||
|
||||
String homepagePartnerDefaultUri = SharedPreferencesManager.getInstance().readString(
|
||||
ChromePreferenceKeys.HOMEPAGE_PARTNER_CUSTOMIZED_DEFAULT_URI, "");
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Sat, 20 Nov 2021 17:42:41 +0000
|
||||
Subject: Ask user before closing all tabs
|
||||
|
||||
---
|
||||
chrome/browser/flags/android/chrome_feature_list.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -454,8 +454,8 @@ const base::Feature kConditionalTabStripAndroid{
|
||||
const base::Feature kCastDeviceFilter{"CastDeviceFilter",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
-const base::Feature kCloseAllTabsModalDialog{"CloseAllTabsModalDialog",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+const base::Feature kCloseAllTabsModalDialog{"CloseAllTabsModalDialog", // Enabled by default in Bromite
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT}; // ^
|
||||
|
||||
const base::Feature kCloseTabSuggestions{"CloseTabSuggestions",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
--
|
||||
2.25.1
|
||||
@@ -46,7 +46,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/thir
|
||||
diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc
|
||||
--- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
|
||||
+++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
|
||||
@@ -492,7 +492,9 @@ double AudioContext::baseLatency() const {
|
||||
@@ -458,7 +458,9 @@ double AudioContext::baseLatency() const {
|
||||
DCHECK(IsMainThread());
|
||||
DCHECK(destination());
|
||||
|
||||
@@ -56,6 +56,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/thir
|
||||
+ return double(l)/100;
|
||||
}
|
||||
|
||||
double AudioContext::outputLatency() const {
|
||||
--
|
||||
2.25.1
|
||||
MediaElementAudioSourceNode* AudioContext::createMediaElementSource(
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@ Include @thestinger's fix for correct charging/unknown values
|
||||
diff --git a/third_party/blink/renderer/modules/battery/battery_manager.cc b/third_party/blink/renderer/modules/battery/battery_manager.cc
|
||||
--- a/third_party/blink/renderer/modules/battery/battery_manager.cc
|
||||
+++ b/third_party/blink/renderer/modules/battery/battery_manager.cc
|
||||
@@ -84,46 +84,28 @@ ScriptPromise BatteryManager::StartRequest(ScriptState* script_state) {
|
||||
@@ -70,46 +70,28 @@ ScriptPromise BatteryManager::StartRequest(ScriptState* script_state) {
|
||||
}
|
||||
|
||||
bool BatteryManager::charging() {
|
||||
@@ -19,12 +19,12 @@ diff --git a/third_party/blink/renderer/modules/battery/battery_manager.cc b/thi
|
||||
}
|
||||
|
||||
double BatteryManager::chargingTime() {
|
||||
- return battery_status_.charging_time().InSecondsF();
|
||||
- return battery_status_.charging_time();
|
||||
+ return 0.0;
|
||||
}
|
||||
|
||||
double BatteryManager::dischargingTime() {
|
||||
- return battery_status_.discharging_time().InSecondsF();
|
||||
- return battery_status_.discharging_time();
|
||||
+ return std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
@@ -61,5 +61,6 @@ diff --git a/third_party/blink/renderer/modules/battery/battery_manager.cc b/thi
|
||||
}
|
||||
|
||||
void BatteryManager::RegisterWithDispatcher() {
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -2,61 +2,22 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Tue, 28 Jul 2020 12:28:58 +0200
|
||||
Subject: Block gateway attacks via websockets
|
||||
|
||||
This approach is not comprehensive, see also:
|
||||
* https://bugs.chromium.org/p/chromium/issues/detail?id=590714
|
||||
---
|
||||
.../execution_context/execution_context.cc | 16 ++++++++++
|
||||
.../execution_context/execution_context.h | 1 +
|
||||
.../renderer/core/loader/base_fetch_context.h | 1 +
|
||||
.../core/loader/frame_fetch_context.cc | 20 ++++++++++++
|
||||
.../core/loader/frame_fetch_context.cc | 18 +++++++++++++
|
||||
.../core/loader/frame_fetch_context.h | 1 +
|
||||
.../core/loader/worker_fetch_context.cc | 21 +++++++++++++
|
||||
.../core/loader/worker_fetch_context.cc | 19 +++++++++++++
|
||||
.../core/loader/worker_fetch_context.h | 1 +
|
||||
.../background_fetch_manager.cc | 31 +++++++++++++++++++
|
||||
.../websockets/websocket_channel_impl.cc | 5 +++
|
||||
.../modules/websockets/websocket_common.cc | 29 +++++++++++++++++
|
||||
.../background_fetch_manager.cc | 2 --
|
||||
.../websockets/websocket_channel_impl.cc | 5 ++++
|
||||
.../modules/websockets/websocket_common.cc | 27 +++++++++++++++++++
|
||||
.../modules/websockets/websocket_common.h | 4 +++
|
||||
11 files changed, 130 insertions(+)
|
||||
9 files changed, 76 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc
|
||||
--- a/third_party/blink/renderer/core/execution_context/execution_context.cc
|
||||
+++ b/third_party/blink/renderer/core/execution_context/execution_context.cc
|
||||
@@ -672,4 +672,20 @@ bool ExecutionContext::RequireTrustedTypes() const {
|
||||
RuntimeEnabledFeatures::TrustedDOMTypesEnabled(this);
|
||||
}
|
||||
|
||||
+String ExecutionContext::addressSpaceForBindings() const {
|
||||
+ switch (AddressSpace()) {
|
||||
+ case network::mojom::IPAddressSpace::kPublic:
|
||||
+ case network::mojom::IPAddressSpace::kUnknown:
|
||||
+ return "public";
|
||||
+
|
||||
+ case network::mojom::IPAddressSpace::kPrivate:
|
||||
+ return "private";
|
||||
+
|
||||
+ case network::mojom::IPAddressSpace::kLocal:
|
||||
+ return "local";
|
||||
+ }
|
||||
+ NOTREACHED();
|
||||
+ return "public";
|
||||
+}
|
||||
+
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/execution_context/execution_context.h b/third_party/blink/renderer/core/execution_context/execution_context.h
|
||||
--- a/third_party/blink/renderer/core/execution_context/execution_context.h
|
||||
+++ b/third_party/blink/renderer/core/execution_context/execution_context.h
|
||||
@@ -374,6 +374,7 @@ class CORE_EXPORT ExecutionContext : public Supplementable<ExecutionContext>,
|
||||
const String& message = g_empty_string,
|
||||
const String& source_file = g_empty_string) const {}
|
||||
|
||||
+ String addressSpaceForBindings() const;
|
||||
network::mojom::IPAddressSpace AddressSpace() const;
|
||||
void SetAddressSpace(network::mojom::blink::IPAddressSpace ip_address_space);
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third_party/blink/renderer/core/loader/base_fetch_context.h
|
||||
--- a/third_party/blink/renderer/core/loader/base_fetch_context.h
|
||||
+++ b/third_party/blink/renderer/core/loader/base_fetch_context.h
|
||||
@@ -83,6 +83,7 @@ class CORE_EXPORT BaseFetchContext : public FetchContext {
|
||||
@@ -82,6 +82,7 @@ class CORE_EXPORT BaseFetchContext : public FetchContext {
|
||||
|
||||
virtual SubresourceFilter* GetSubresourceFilter() const = 0;
|
||||
virtual bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const = 0;
|
||||
@@ -67,7 +28,7 @@ diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third
|
||||
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
|
||||
--- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc
|
||||
@@ -546,6 +546,26 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const {
|
||||
@@ -568,6 +568,24 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const {
|
||||
return should_block_request;
|
||||
}
|
||||
|
||||
@@ -75,8 +36,6 @@ diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/thi
|
||||
+ // TODO(mkwst): This only checks explicit IP addresses. We'll have to move
|
||||
+ // all this up to //net and //content in order to have any real impact on
|
||||
+ // gateway attacks. That turns out to be a TON of work (crbug.com/378566).
|
||||
+ if (requestor_space == network::mojom::IPAddressSpace::kUnknown)
|
||||
+ requestor_space = network::mojom::IPAddressSpace::kPublic;
|
||||
+ network::mojom::IPAddressSpace target_space =
|
||||
+ network::mojom::IPAddressSpace::kPublic;
|
||||
+ if (network_utils::IsReservedIPAddress(request_url.Host()))
|
||||
@@ -97,7 +56,7 @@ diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/thi
|
||||
diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.h b/third_party/blink/renderer/core/loader/frame_fetch_context.h
|
||||
--- a/third_party/blink/renderer/core/loader/frame_fetch_context.h
|
||||
+++ b/third_party/blink/renderer/core/loader/frame_fetch_context.h
|
||||
@@ -171,6 +171,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext,
|
||||
@@ -165,6 +165,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext,
|
||||
bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const override;
|
||||
std::unique_ptr<WebSocketHandshakeThrottle> CreateWebSocketHandshakeThrottle()
|
||||
override;
|
||||
@@ -116,7 +75,7 @@ diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.cc b/th
|
||||
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
#include "third_party/blink/renderer/platform/supplementable.h"
|
||||
#include "third_party/blink/renderer/platform/weborigin/security_policy.h"
|
||||
@@ -90,6 +91,26 @@ bool WorkerFetchContext::ShouldBlockRequestByInspector(const KURL& url) const {
|
||||
@@ -90,6 +91,24 @@ bool WorkerFetchContext::ShouldBlockRequestByInspector(const KURL& url) const {
|
||||
return should_block_request;
|
||||
}
|
||||
|
||||
@@ -124,8 +83,6 @@ diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.cc b/th
|
||||
+ // TODO(mkwst): This only checks explicit IP addresses. We'll have to move
|
||||
+ // all this up to //net and //content in order to have any real impact on
|
||||
+ // gateway attacks. That turns out to be a TON of work (crbug.com/378566).
|
||||
+ if (requestor_space == network::mojom::IPAddressSpace::kUnknown)
|
||||
+ requestor_space = network::mojom::IPAddressSpace::kPublic;
|
||||
+ network::mojom::IPAddressSpace target_space =
|
||||
+ network::mojom::IPAddressSpace::kPublic;
|
||||
+ if (network_utils::IsReservedIPAddress(request_url.Host()))
|
||||
@@ -157,51 +114,22 @@ diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.h b/thi
|
||||
diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc b/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
|
||||
--- a/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
|
||||
+++ b/third_party/blink/renderer/modules/background_fetch/background_fetch_manager.cc
|
||||
@@ -101,6 +101,30 @@ bool ShouldBlockDanglingMarkup(const KURL& request_url) {
|
||||
request_url.ProtocolIsInHTTPFamily();
|
||||
@@ -103,7 +103,6 @@ bool ShouldBlockDanglingMarkup(const KURL& request_url) {
|
||||
|
||||
bool ShouldBlockGateWayAttacks(ExecutionContext* execution_context,
|
||||
const KURL& request_url) {
|
||||
- if (RuntimeEnabledFeatures::CorsRFC1918Enabled()) {
|
||||
network::mojom::IPAddressSpace requestor_space =
|
||||
execution_context->AddressSpace();
|
||||
|
||||
@@ -120,7 +119,6 @@ bool ShouldBlockGateWayAttacks(ExecutionContext* execution_context,
|
||||
bool is_external_request = requestor_space > target_space;
|
||||
if (is_external_request)
|
||||
return true;
|
||||
- }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
+bool ShouldBlockGateWayAttacks(ExecutionContext* execution_context,
|
||||
+ const KURL& request_url) {
|
||||
+ network::mojom::IPAddressSpace requestor_space =
|
||||
+ execution_context->AddressSpace();
|
||||
+ if (requestor_space == network::mojom::IPAddressSpace::kUnknown)
|
||||
+ requestor_space = network::mojom::IPAddressSpace::kPublic;
|
||||
+
|
||||
+ // TODO(mkwst): This only checks explicit IP addresses. We'll have to move
|
||||
+ // all this up to //net and //content in order to have any real impact on
|
||||
+ // gateway attacks. That turns out to be a TON of work (crbug.com/378566).
|
||||
+ network::mojom::IPAddressSpace target_space =
|
||||
+ network::mojom::IPAddressSpace::kPublic;
|
||||
+ if (network_utils::IsReservedIPAddress(request_url.Host()))
|
||||
+ target_space = network::mojom::IPAddressSpace::kPrivate;
|
||||
+ if (SecurityOrigin::Create(request_url)->IsLocalhost())
|
||||
+ target_space = network::mojom::IPAddressSpace::kLocal;
|
||||
+
|
||||
+ bool is_external_request = requestor_space > target_space;
|
||||
+ if (is_external_request)
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
scoped_refptr<BlobDataHandle> ExtractBlobHandle(
|
||||
Request* request,
|
||||
ExceptionState& exception_state) {
|
||||
@@ -222,6 +246,13 @@ ScriptPromise BackgroundFetchManager::fetch(
|
||||
exception_state);
|
||||
}
|
||||
|
||||
+ if (ShouldBlockGateWayAttacks(execution_context, request_url)) {
|
||||
+ return RejectWithTypeError(script_state, request_url,
|
||||
+ "Requestor IP address space doesn't match the "
|
||||
+ "target address space.",
|
||||
+ exception_state);
|
||||
+ }
|
||||
+
|
||||
kurls.insert(request_url);
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
|
||||
--- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
|
||||
+++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
|
||||
@@ -220,7 +148,7 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_imp
|
||||
diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.cc b/third_party/blink/renderer/modules/websockets/websocket_common.cc
|
||||
--- a/third_party/blink/renderer/modules/websockets/websocket_common.cc
|
||||
+++ b/third_party/blink/renderer/modules/websockets/websocket_common.cc
|
||||
@@ -124,9 +124,38 @@ WebSocketCommon::ConnectResult WebSocketCommon::Connect(
|
||||
@@ -124,9 +124,36 @@ WebSocketCommon::ConnectResult WebSocketCommon::Connect(
|
||||
return ConnectResult::kException;
|
||||
}
|
||||
|
||||
@@ -240,8 +168,6 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.cc b
|
||||
+ // TODO(mkwst): This only checks explicit IP addresses. We'll have to move
|
||||
+ // all this up to //net and //content in order to have any real impact on
|
||||
+ // gateway attacks. That turns out to be a TON of work (crbug.com/378566).
|
||||
+ if (requestor_space == network::mojom::IPAddressSpace::kUnknown)
|
||||
+ requestor_space = network::mojom::IPAddressSpace::kPublic;
|
||||
+ network::mojom::IPAddressSpace target_space =
|
||||
+ network::mojom::IPAddressSpace::kPublic;
|
||||
+ if (network_utils::IsReservedIPAddress(request_url.Host()))
|
||||
@@ -262,16 +188,16 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.cc b
|
||||
diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.h b/third_party/blink/renderer/modules/websockets/websocket_common.h
|
||||
--- a/third_party/blink/renderer/modules/websockets/websocket_common.h
|
||||
+++ b/third_party/blink/renderer/modules/websockets/websocket_common.h
|
||||
@@ -7,6 +7,8 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBSOCKETS_WEBSOCKET_COMMON_H_
|
||||
@@ -8,6 +8,8 @@
|
||||
#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBSOCKETS_WEBSOCKET_COMMON_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
+#include "services/network/public/mojom/ip_address_space.mojom.h"
|
||||
+#include "third_party/blink/renderer/platform/network/network_utils.h"
|
||||
#include "third_party/blink/renderer/modules/modules_export.h"
|
||||
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
||||
@@ -54,6 +56,8 @@ class MODULES_EXPORT WebSocketCommon {
|
||||
@@ -51,6 +53,8 @@ class MODULES_EXPORT WebSocketCommon {
|
||||
void SetState(State state) { state_ = state; }
|
||||
const KURL& Url() const { return url_; }
|
||||
|
||||
@@ -280,5 +206,6 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.h b/
|
||||
// The following methods are public for testing.
|
||||
|
||||
// Returns true if |protocol| is a valid WebSocket subprotocol name.
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -7,26 +7,26 @@ This patch is based on Iridium's 'net: add "trk:" scheme and help identify URLs
|
||||
---
|
||||
.../chrome_autocomplete_scheme_classifier.cc | 1 +
|
||||
chrome/browser/history/history_utils.cc | 1 +
|
||||
chrome/browser/ui/singleton_tabs.cc | 5 ++++
|
||||
chrome/browser/ui/singleton_tabs.cc | 3 +-
|
||||
.../omnibox/browser/autocomplete_input.cc | 8 ++++-
|
||||
components/url_formatter/url_fixer.cc | 4 +++
|
||||
.../child_process_security_policy_impl.cc | 1 +
|
||||
net/BUILD.gn | 2 ++
|
||||
net/url_request/trk_protocol_handler.cc | 25 ++++++++++++++++
|
||||
net/url_request/trk_protocol_handler.h | 30 +++++++++++++++++++
|
||||
net/url_request/trk_protocol_handler.cc | 25 +++++++++++++++
|
||||
net/url_request/trk_protocol_handler.h | 31 +++++++++++++++++++
|
||||
net/url_request/url_request.cc | 8 +++++
|
||||
.../url_request_context_builder.cc | 3 ++
|
||||
url/url_constants.cc | 1 +
|
||||
url/url_constants.h | 1 +
|
||||
url/url_util.cc | 2 ++
|
||||
14 files changed, 91 insertions(+), 1 deletion(-)
|
||||
14 files changed, 89 insertions(+), 2 deletions(-)
|
||||
create mode 100644 net/url_request/trk_protocol_handler.cc
|
||||
create mode 100644 net/url_request/trk_protocol_handler.h
|
||||
|
||||
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
|
||||
--- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
|
||||
+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
|
||||
@@ -58,6 +58,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme(
|
||||
@@ -56,6 +56,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme(
|
||||
if (base::IsStringASCII(scheme) &&
|
||||
(ProfileIOData::IsHandledProtocol(scheme) ||
|
||||
base::LowerCaseEqualsASCII(scheme, content::kViewSourceScheme) ||
|
||||
@@ -48,22 +48,20 @@ diff --git a/chrome/browser/history/history_utils.cc b/chrome/browser/history/hi
|
||||
diff --git a/chrome/browser/ui/singleton_tabs.cc b/chrome/browser/ui/singleton_tabs.cc
|
||||
--- a/chrome/browser/ui/singleton_tabs.cc
|
||||
+++ b/chrome/browser/ui/singleton_tabs.cc
|
||||
@@ -106,6 +106,11 @@ int GetIndexOfExistingTab(Browser* browser, const NavigateParams& params) {
|
||||
continue;
|
||||
}
|
||||
@@ -99,7 +99,8 @@ int GetIndexOfExistingTab(Browser* browser, const NavigateParams& params) {
|
||||
|
||||
// Skip view-source tabs. This is needed because RewriteURLIfNecessary
|
||||
// removes the "view-source:" scheme which leads to incorrect matching.
|
||||
- if (tab_url.SchemeIs(content::kViewSourceScheme))
|
||||
+ if (tab_url.SchemeIs(content::kViewSourceScheme) ||
|
||||
+ tab_url.SchemeIs(url::kTraceScheme))
|
||||
continue;
|
||||
|
||||
+ // trk: URLs must not be rewritten
|
||||
+ if (tab_url.SchemeIs(url::kTraceScheme)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
GURL rewritten_tab_url = tab_url;
|
||||
content::BrowserURLHandler::GetInstance()->RewriteURLIfNecessary(
|
||||
&rewritten_tab_url, browser->profile());
|
||||
diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnibox/browser/autocomplete_input.cc
|
||||
--- a/components/omnibox/browser/autocomplete_input.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_input.cc
|
||||
@@ -89,10 +89,15 @@ void OffsetComponentsExcludingScheme(url::Parsed* parts, int offset) {
|
||||
@@ -81,10 +81,15 @@ void OffsetComponentsExcludingScheme(url::Parsed* parts, int offset) {
|
||||
bool HasScheme(const std::u16string& input, const char* scheme) {
|
||||
std::string utf8_input(base::UTF16ToUTF8(input));
|
||||
url::Component view_source_scheme;
|
||||
@@ -79,7 +77,7 @@ diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnib
|
||||
return url::FindAndCompareScheme(utf8_input, scheme, nullptr);
|
||||
}
|
||||
|
||||
@@ -560,7 +565,8 @@ void AutocompleteInput::ParseForEmphasizeComponents(
|
||||
@@ -532,7 +537,8 @@ void AutocompleteInput::ParseForEmphasizeComponents(
|
||||
// For the view-source and blob schemes, we should emphasize the host of the
|
||||
// URL qualified by the view-source or blob prefix.
|
||||
if ((base::LowerCaseEqualsASCII(scheme_str, kViewSourceScheme) ||
|
||||
@@ -106,18 +104,18 @@ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/ur
|
||||
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
|
||||
--- a/content/browser/child_process_security_policy_impl.cc
|
||||
+++ b/content/browser/child_process_security_policy_impl.cc
|
||||
@@ -747,6 +747,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl()
|
||||
RegisterPseudoScheme(url::kJavaScriptScheme);
|
||||
RegisterPseudoScheme(kViewSourceScheme);
|
||||
RegisterPseudoScheme(kGoogleChromeScheme);
|
||||
@@ -819,6 +819,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl()
|
||||
#endif // BUILDFLAG(ENABLE_WEBSOCKETS)
|
||||
RegisterWebSafeScheme(url::kFtpScheme);
|
||||
RegisterWebSafeScheme(url::kDataScheme);
|
||||
+ RegisterWebSafeScheme(url::kTraceScheme);
|
||||
}
|
||||
RegisterWebSafeScheme("feed");
|
||||
|
||||
ChildProcessSecurityPolicyImpl::~ChildProcessSecurityPolicyImpl() {
|
||||
// TODO(nick): https://crbug.com/651534 blob: and filesystem: schemes embed
|
||||
diff --git a/net/BUILD.gn b/net/BUILD.gn
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -1033,6 +1033,8 @@ component("net") {
|
||||
@@ -1042,6 +1042,8 @@ component("net") {
|
||||
"url_request/url_request_http_job.cc",
|
||||
"url_request/url_request_http_job.h",
|
||||
"url_request/url_request_interceptor.cc",
|
||||
@@ -160,7 +158,7 @@ diff --git a/net/url_request/trk_protocol_handler.h b/net/url_request/trk_protoc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/net/url_request/trk_protocol_handler.h
|
||||
@@ -0,0 +1,30 @@
|
||||
@@ -0,0 +1,31 @@
|
||||
+// Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
@@ -169,6 +167,7 @@ new file mode 100644
|
||||
+#define NET_URL_REQUEST_TRK_PROTOCOL_HANDLER_H_
|
||||
+
|
||||
+#include "base/compiler_specific.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "net/base/net_export.h"
|
||||
+#include "net/url_request/url_request_job_factory.h"
|
||||
+
|
||||
@@ -180,12 +179,12 @@ new file mode 100644
|
||||
+class NET_EXPORT TrkProtocolHandler
|
||||
+ : public URLRequestJobFactory::ProtocolHandler {
|
||||
+ public:
|
||||
+ TrkProtocolHandler(const TrkProtocolHandler&) = delete;
|
||||
+ TrkProtocolHandler& operator=(const TrkProtocolHandler&) = delete;
|
||||
+
|
||||
+ TrkProtocolHandler();
|
||||
+ std::unique_ptr<URLRequestJob> CreateJob(URLRequest* request) const override;
|
||||
+ bool IsSafeRedirectTarget(const GURL& location) const override;
|
||||
+
|
||||
+ private:
|
||||
+ DISALLOW_COPY_AND_ASSIGN(TrkProtocolHandler);
|
||||
+};
|
||||
+
|
||||
+} // namespace net
|
||||
@@ -202,7 +201,7 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/values.h"
|
||||
@@ -45,6 +46,7 @@
|
||||
@@ -44,6 +45,7 @@
|
||||
#include "net/url_request/url_request_redirect_job.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -210,7 +209,7 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
|
||||
|
||||
using base::Time;
|
||||
using std::string;
|
||||
@@ -609,6 +611,12 @@ URLRequest::URLRequest(const GURL& url,
|
||||
@@ -580,6 +582,12 @@ URLRequest::URLRequest(const GURL& url,
|
||||
// Sanity check out environment.
|
||||
DCHECK(base::ThreadTaskRunnerHandle::IsSet());
|
||||
|
||||
@@ -226,15 +225,15 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
|
||||
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
|
||||
--- a/net/url_request/url_request_context_builder.cc
|
||||
+++ b/net/url_request/url_request_context_builder.cc
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "net/socket/network_binding_client_socket_factory.h"
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "net/quic/quic_stream_factory.h"
|
||||
#include "net/ssl/ssl_config_service_defaults.h"
|
||||
#include "net/url_request/static_http_user_agent_settings.h"
|
||||
+#include "net/url_request/trk_protocol_handler.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_context_storage.h"
|
||||
#include "net/url_request/url_request_job_factory.h"
|
||||
@@ -626,6 +627,8 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
|
||||
@@ -552,6 +553,8 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
|
||||
job_factory->SetProtocolHandler(scheme_handler.first,
|
||||
std::move(scheme_handler.second));
|
||||
}
|
||||
@@ -242,29 +241,29 @@ diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/ur
|
||||
+ std::make_unique<TrkProtocolHandler>());
|
||||
protocol_handlers_.clear();
|
||||
|
||||
storage->set_job_factory(std::move(job_factory));
|
||||
#if !BUILDFLAG(DISABLE_FTP_SUPPORT)
|
||||
diff --git a/url/url_constants.cc b/url/url_constants.cc
|
||||
--- a/url/url_constants.cc
|
||||
+++ b/url/url_constants.cc
|
||||
@@ -29,6 +29,7 @@ const char16_t kDataScheme16[] = u"data";
|
||||
const char kFileScheme[] = "file";
|
||||
const char16_t kFileScheme16[] = u"file";
|
||||
const char kFileSystemScheme[] = "filesystem";
|
||||
@@ -29,6 +29,7 @@ const char kMailToScheme[] = "mailto";
|
||||
const char kQuicTransportScheme[] = "quic-transport";
|
||||
const char kTelScheme[] = "tel";
|
||||
const char kUrnScheme[] = "urn";
|
||||
+const char kTraceScheme[] = "trk";
|
||||
const char16_t kFileSystemScheme16[] = u"filesystem";
|
||||
const char kFtpScheme[] = "ftp";
|
||||
const char16_t kFtpScheme16[] = u"ftp";
|
||||
const char kWsScheme[] = "ws";
|
||||
const char kWssScheme[] = "wss";
|
||||
|
||||
diff --git a/url/url_constants.h b/url/url_constants.h
|
||||
--- a/url/url_constants.h
|
||||
+++ b/url/url_constants.h
|
||||
@@ -33,6 +33,7 @@ COMPONENT_EXPORT(URL) extern const char16_t kContentIDScheme16[];
|
||||
COMPONENT_EXPORT(URL) extern const char kDataScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char16_t kDataScheme16[];
|
||||
COMPONENT_EXPORT(URL) extern const char kFileScheme[];
|
||||
@@ -33,6 +33,7 @@ COMPONENT_EXPORT(URL) extern const char kMailToScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char kQuicTransportScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char kTelScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char kUrnScheme[];
|
||||
+COMPONENT_EXPORT(URL) extern const char kTraceScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char16_t kFileScheme16[];
|
||||
COMPONENT_EXPORT(URL) extern const char kFileSystemScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char16_t kFileSystemScheme16[];
|
||||
COMPONENT_EXPORT(URL) extern const char kWsScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char kWssScheme[];
|
||||
|
||||
diff --git a/url/url_util.cc b/url/url_util.cc
|
||||
--- a/url/url_util.cc
|
||||
+++ b/url/url_util.cc
|
||||
@@ -284,5 +283,6 @@ diff --git a/url/url_util.cc b/url/url_util.cc
|
||||
};
|
||||
|
||||
// Schemes that can be sent CORS requests.
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 9 Apr 2022 23:01:55 +0200
|
||||
Subject: Bookmarks select all menu entry
|
||||
|
||||
---
|
||||
.../java/res/menu/bookmark_action_bar_menu.xml | 7 +++++++
|
||||
.../browser/bookmarks/BookmarkActionBar.java | 15 +++++++++++++++
|
||||
.../ui/android/strings/android_chrome_strings.grd | 3 +++
|
||||
3 files changed, 25 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/menu/bookmark_action_bar_menu.xml b/chrome/android/java/res/menu/bookmark_action_bar_menu.xml
|
||||
--- a/chrome/android/java/res/menu/bookmark_action_bar_menu.xml
|
||||
+++ b/chrome/android/java/res/menu/bookmark_action_bar_menu.xml
|
||||
@@ -21,6 +21,13 @@
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"
|
||||
app:iconTint="@color/default_icon_color_secondary_tint_list" />
|
||||
+ <item
|
||||
+ android:id="@+id/select_all_menu_id"
|
||||
+ android:icon="@drawable/ic_done_blue"
|
||||
+ android:title="@string/select_all_bookmarks"
|
||||
+ android:visible="true"
|
||||
+ app:showAsAction="ifRoom"
|
||||
+ app:iconTint="@color/default_icon_color_tint_list" />
|
||||
<item
|
||||
android:id="@+id/import_menu_id"
|
||||
android:icon="@drawable/ic_folder_blue_24dp"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
|
||||
@@ -29,6 +29,7 @@ import org.chromium.content_public.browser.LoadUrlParams;
|
||||
import org.chromium.url.GURL;
|
||||
|
||||
import java.util.List;
|
||||
+import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* Main action bar of bookmark UI. It is responsible for displaying title and buttons
|
||||
@@ -134,6 +135,17 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
new TabDelegate(true), mDelegate.getModel());
|
||||
selectionDelegate.clearSelection();
|
||||
return true;
|
||||
+ } else if (menuItem.getItemId() == R.id.select_all_menu_id) {
|
||||
+ BookmarkModel bookmarkModel = mDelegate.getModel();
|
||||
+ if (bookmarkModel.isBookmarkModelLoaded()) {
|
||||
+ List<BookmarkItem> items = bookmarkModel.getBookmarksForFolder(mCurrentFolder.getId());
|
||||
+ HashSet<BookmarkId> ids = new HashSet<>(items.size());
|
||||
+ for (BookmarkItem item : items) {
|
||||
+ ids.add(item.getId());
|
||||
+ }
|
||||
+ selectionDelegate.setSelectedItems(ids);
|
||||
+ }
|
||||
+ return true;
|
||||
}
|
||||
|
||||
assert false : "Unhandled menu click.";
|
||||
@@ -143,6 +155,7 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
void showLoadingUi() {
|
||||
setTitle(null);
|
||||
setNavigationButton(NAVIGATION_BUTTON_NONE);
|
||||
+ getMenu().findItem(R.id.select_all_menu_id).setVisible(false);
|
||||
getMenu().findItem(R.id.import_menu_id).setVisible(false);
|
||||
getMenu().findItem(R.id.export_menu_id).setVisible(false);
|
||||
getMenu().findItem(R.id.search_menu_id).setVisible(false);
|
||||
@@ -154,6 +167,7 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
super.showNormalView();
|
||||
|
||||
if (mDelegate == null) {
|
||||
+ getMenu().findItem(R.id.select_all_menu_id).setVisible(false);
|
||||
getMenu().findItem(R.id.import_menu_id).setVisible(false);
|
||||
getMenu().findItem(R.id.export_menu_id).setVisible(false);
|
||||
getMenu().findItem(R.id.search_menu_id).setVisible(false);
|
||||
@@ -185,6 +199,7 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
@Override
|
||||
public void onFolderStateSet(BookmarkId folder) {
|
||||
mCurrentFolder = mDelegate.getModel().getBookmarkById(folder);
|
||||
+ getMenu().findItem(R.id.select_all_menu_id).setVisible(true);
|
||||
getMenu().findItem(R.id.import_menu_id).setVisible(true);
|
||||
getMenu().findItem(R.id.export_menu_id).setVisible(true);
|
||||
getMenu().findItem(R.id.search_menu_id).setVisible(true);
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -243,6 +243,9 @@ CHAR_LIMIT guidelines:
|
||||
<message name="IDS_NOTIFICATION_CATEGORY_SITES" desc="Label for notifications from websites, within a list of notification categories. [CHAR_LIMIT=32]">
|
||||
Sites
|
||||
</message>
|
||||
+ <message name="IDS_SELECT_ALL_BOOKMARKS" desc="The label for the select all bookmarks button.">
|
||||
+ Select all
|
||||
+ </message>
|
||||
<message name="IDS_IMPORT_BOOKMARKS" desc="The label for the import bookmarks button.">
|
||||
Import
|
||||
</message>
|
||||
--
|
||||
2.25.1
|
||||
@@ -16,7 +16,7 @@ Fix RestoreForeignSessionTab by recreating the tab (issue #681)
|
||||
chrome/android/java/res/values/values.xml | 2 +
|
||||
.../java/res/xml/adblock_preferences.xml | 25 ++
|
||||
.../android/java/res/xml/main_preferences.xml | 5 +
|
||||
.../browser/settings/AdBlockEditor.java | 91 ++++++
|
||||
.../browser/settings/AdBlockEditor.java | 92 ++++++
|
||||
.../browser/settings/AdBlockPreferences.java | 61 ++++
|
||||
.../chrome/browser/tabmodel/TabModelImpl.java | 2 +-
|
||||
chrome/app/generated_resources.grd | 10 +
|
||||
@@ -24,7 +24,8 @@ Fix RestoreForeignSessionTab by recreating the tab (issue #681)
|
||||
chrome/browser/browser_process.h | 6 +
|
||||
chrome/browser/browser_process_impl.cc | 20 ++
|
||||
chrome/browser/browser_process_impl.h | 2 +
|
||||
chrome/browser/chrome_browser_main.cc | 3 +
|
||||
chrome/browser/chrome_browser_main.cc | 2 +
|
||||
.../browser/chrome_content_browser_client.cc | 15 -
|
||||
.../flags/android/cached_feature_flags.cc | 11 +
|
||||
.../browser/flags/CachedFeatureFlags.java | 10 +
|
||||
.../net/system_network_context_manager.cc | 4 +
|
||||
@@ -32,21 +33,21 @@ Fix RestoreForeignSessionTab by recreating the tab (issue #681)
|
||||
.../strings/android_chrome_strings.grd | 14 +
|
||||
chrome/common/pref_names.cc | 3 +
|
||||
chrome/common/pref_names.h | 1 +
|
||||
.../strings/android/site_settings.grdp | 4 +-
|
||||
components/component_updater/BUILD.gn | 7 +
|
||||
.../adblock_updater_service.cc | 271 ++++++++++++++++++
|
||||
.../adblock_updater_service.h | 100 +++++++
|
||||
.../adblock_updater_service.cc | 272 ++++++++++++++++++
|
||||
.../adblock_updater_service.h | 99 +++++++
|
||||
.../download_filters_task.cc | 224 +++++++++++++++
|
||||
.../component_updater/download_filters_task.h | 130 +++++++++
|
||||
.../component_updater/download_filters_task.h | 129 +++++++++
|
||||
...ent_subresource_filter_throttle_manager.cc | 11 +
|
||||
.../content/browser/ruleset_service.cc | 33 ++-
|
||||
.../content/browser/ruleset_service.h | 7 +-
|
||||
.../content/browser/ruleset_version.h | 4 +
|
||||
.../browser/verified_ruleset_dealer.cc | 4 +
|
||||
.../browser/subresource_filter_features.cc | 113 +-------
|
||||
.../core/common/common_features.cc | 2 +-
|
||||
.../core/common/indexed_ruleset.cc | 5 +-
|
||||
.../navigation_throttle_runner.cc | 5 -
|
||||
37 files changed, 1160 insertions(+), 126 deletions(-)
|
||||
38 files changed, 1158 insertions(+), 140 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/layout/adblock_editor.xml
|
||||
create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java
|
||||
@@ -59,7 +60,7 @@ Fix RestoreForeignSessionTab by recreating the tab (issue #681)
|
||||
diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
|
||||
--- a/chrome/android/chrome_java_resources.gni
|
||||
+++ b/chrome/android/chrome_java_resources.gni
|
||||
@@ -473,6 +473,7 @@ chrome_java_resources = [
|
||||
@@ -566,6 +566,7 @@ chrome_java_resources = [
|
||||
"java/res/layout/account_chooser_dialog_title.xml",
|
||||
"java/res/layout/account_divider_preference.xml",
|
||||
"java/res/layout/account_management_account_row.xml",
|
||||
@@ -67,9 +68,9 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja
|
||||
"java/res/layout/auto_sign_in_first_run_dialog.xml",
|
||||
"java/res/layout/autofill_billing_address_dropdown.xml",
|
||||
"java/res/layout/autofill_card_unmask_prompt.xml",
|
||||
@@ -667,6 +668,7 @@ chrome_java_resources = [
|
||||
"java/res/values/values.xml",
|
||||
@@ -776,6 +777,7 @@ chrome_java_resources = [
|
||||
"java/res/xml/about_chrome_preferences.xml",
|
||||
"java/res/xml/accessibility_preferences.xml",
|
||||
"java/res/xml/account_management_preferences.xml",
|
||||
+ "java/res/xml/adblock_preferences.xml",
|
||||
"java/res/xml/autofill_assistant_preferences.xml",
|
||||
@@ -78,15 +79,15 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja
|
||||
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
|
||||
--- a/chrome/android/chrome_java_sources.gni
|
||||
+++ b/chrome/android/chrome_java_sources.gni
|
||||
@@ -904,6 +904,8 @@ chrome_java_sources = [
|
||||
@@ -991,6 +991,8 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/payments/ui/ShoppingCart.java",
|
||||
"java/src/org/chromium/chrome/browser/permissions/PermissionSettingsBridge.java",
|
||||
"java/src/org/chromium/chrome/browser/permissions/PermissionUpdateRequester.java",
|
||||
"java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceImpl.java",
|
||||
+ "java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java",
|
||||
+ "java/src/org/chromium/chrome/browser/settings/AdBlockPreferences.java",
|
||||
"java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java",
|
||||
"java/src/org/chromium/chrome/browser/prerender/ChromePrerenderServiceImpl.java",
|
||||
"java/src/org/chromium/chrome/browser/printing/PrintShareActivity.java",
|
||||
"java/src/org/chromium/chrome/browser/previews/HttpsImageCompressionUtils.java",
|
||||
diff --git a/chrome/android/java/res/layout/adblock_editor.xml b/chrome/android/java/res/layout/adblock_editor.xml
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
@@ -162,7 +163,7 @@ new file mode 100644
|
||||
diff --git a/chrome/android/java/res/values/styles.xml b/chrome/android/java/res/values/styles.xml
|
||||
--- a/chrome/android/java/res/values/styles.xml
|
||||
+++ b/chrome/android/java/res/values/styles.xml
|
||||
@@ -194,6 +194,24 @@
|
||||
@@ -199,6 +199,24 @@
|
||||
</item>
|
||||
</style>
|
||||
|
||||
@@ -248,7 +249,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBloc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java
|
||||
@@ -0,0 +1,91 @@
|
||||
@@ -0,0 +1,92 @@
|
||||
+// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
@@ -317,6 +318,7 @@ new file mode 100644
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ mAdBlockFiltersUrlEdit.setText(CachedFeatureFlags.getAdBlockFiltersURL());
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
@@ -409,19 +411,19 @@ new file mode 100644
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java
|
||||
@@ -670,7 +670,7 @@ public class TabModelImpl extends TabModelJniBridge {
|
||||
protected boolean createTabWithWebContents(
|
||||
@@ -801,7 +801,7 @@ public class TabModelImpl extends TabModelJniBridge {
|
||||
Tab parent, Profile profile, WebContents webContents) {
|
||||
return getTabCreator(profile.isOffTheRecord())
|
||||
- .createTabWithWebContents(parent, webContents, TabLaunchType.FROM_RECENT_TABS);
|
||||
+ .createTabWithWebContents(parent, webContents, TabLaunchType.FROM_LINK);
|
||||
.createTabWithWebContents(
|
||||
- parent, webContents, TabLaunchType.FROM_LONGPRESS_BACKGROUND);
|
||||
+ parent, webContents, TabLaunchType.FROM_LINK);
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
|
||||
--- a/chrome/app/generated_resources.grd
|
||||
+++ b/chrome/app/generated_resources.grd
|
||||
@@ -11873,6 +11873,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
|
||||
@@ -10805,6 +10805,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
|
||||
Never show this again.
|
||||
</message>
|
||||
|
||||
@@ -441,16 +443,16 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources
|
||||
diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_startup_task_utils.cc
|
||||
--- a/chrome/browser/after_startup_task_utils.cc
|
||||
+++ b/chrome/browser/after_startup_task_utils.cc
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "chromeos/lacros/lacros_service.h"
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
#endif
|
||||
|
||||
+#include "chrome/browser/browser_process.h"
|
||||
+
|
||||
using content::BrowserThread;
|
||||
|
||||
namespace {
|
||||
@@ -128,6 +130,9 @@ void SetBrowserStartupIsComplete() {
|
||||
@@ -121,6 +123,9 @@ void SetBrowserStartupIsComplete() {
|
||||
g_after_startup_tasks.Get().clear();
|
||||
g_after_startup_tasks.Get().shrink_to_fit();
|
||||
|
||||
@@ -459,11 +461,11 @@ diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_s
|
||||
+
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
|
||||
--- a/chrome/browser/browser_process.h
|
||||
+++ b/chrome/browser/browser_process.h
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/common/buildflags.h"
|
||||
#include "media/media_buildflags.h"
|
||||
@@ -471,7 +473,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
|
||||
|
||||
class BackgroundModeManager;
|
||||
class BrowserProcessPlatformPart;
|
||||
@@ -66,6 +67,10 @@ namespace component_updater {
|
||||
@@ -67,6 +68,10 @@ namespace component_updater {
|
||||
class ComponentUpdateService;
|
||||
}
|
||||
|
||||
@@ -482,7 +484,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
|
||||
namespace extensions {
|
||||
class EventRouterForwarder;
|
||||
}
|
||||
@@ -229,6 +234,7 @@ class BrowserProcess {
|
||||
@@ -234,6 +239,7 @@ class BrowserProcess {
|
||||
#endif
|
||||
|
||||
virtual component_updater::ComponentUpdateService* component_updater() = 0;
|
||||
@@ -493,7 +495,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
|
||||
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
|
||||
--- a/chrome/browser/browser_process_impl.cc
|
||||
+++ b/chrome/browser/browser_process_impl.cc
|
||||
@@ -1068,6 +1068,26 @@ BrowserProcessImpl::component_updater() {
|
||||
@@ -1053,6 +1053,26 @@ BrowserProcessImpl::component_updater() {
|
||||
return component_updater_.get();
|
||||
}
|
||||
|
||||
@@ -523,7 +525,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
|
||||
diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h
|
||||
--- a/chrome/browser/browser_process_impl.h
|
||||
+++ b/chrome/browser/browser_process_impl.h
|
||||
@@ -200,6 +200,7 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
@@ -194,6 +194,7 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
#endif
|
||||
|
||||
component_updater::ComponentUpdateService* component_updater() override;
|
||||
@@ -537,21 +539,59 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
|
||||
std::unique_ptr<component_updater::ComponentUpdateService> component_updater_;
|
||||
+ std::unique_ptr<adblock_updater::AdBlockUpdaterService> adblock_updater_;
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
// Used to create a singleton instance of SodaInstallerImpl, which can be
|
||||
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
||||
--- a/chrome/browser/chrome_browser_main.cc
|
||||
+++ b/chrome/browser/chrome_browser_main.cc
|
||||
@@ -1730,6 +1730,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
// will be initialized when the app enters foreground mode.
|
||||
variations_service->set_policy_pref_service(profile->GetPrefs());
|
||||
@@ -1626,6 +1626,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
speech::SodaInstaller::GetInstance()->Init(profile_->GetPrefs(),
|
||||
browser_process_->local_state());
|
||||
#endif // !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
+ // force AdBlock updater initialisation
|
||||
+ g_browser_process->adblock_updater();
|
||||
}
|
||||
|
||||
+ // force AdBlock updater initialisation
|
||||
+ g_browser_process->adblock_updater();
|
||||
+
|
||||
#else
|
||||
// We are in regular browser boot sequence. Open initial tabs and enter the
|
||||
// main message loop.
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -61,7 +61,6 @@
|
||||
#include "chrome/browser/hid/chrome_hid_delegate.h"
|
||||
#include "chrome/browser/interstitials/enterprise_util.h"
|
||||
#include "chrome/browser/lifetime/browser_shutdown.h"
|
||||
-#include "chrome/browser/lookalikes/lookalike_url_navigation_throttle.h"
|
||||
#include "chrome/browser/media/audio_service_util.h"
|
||||
#include "chrome/browser/media/router/media_router_feature.h"
|
||||
#include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h"
|
||||
@@ -3907,16 +3906,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
||||
content::NavigationHandle* handle) {
|
||||
std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
|
||||
|
||||
- // MetricsNavigationThrottle requires that it runs before NavigationThrottles
|
||||
- // that may delay or cancel navigations, so only NavigationThrottles that
|
||||
- // don't delay or cancel navigations (e.g. throttles that are only observing
|
||||
- // callbacks without affecting navigation behavior) should be added before
|
||||
- // MetricsNavigationThrottle.
|
||||
- if (handle->IsInMainFrame()) {
|
||||
- throttles.push_back(
|
||||
- page_load_metrics::MetricsNavigationThrottle::Create(handle));
|
||||
- }
|
||||
-
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
MaybeAddThrottle(
|
||||
ash::WebTimeLimitNavigationThrottle::MaybeCreateThrottleFor(handle),
|
||||
@@ -4022,10 +4011,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
||||
&throttles);
|
||||
#endif
|
||||
|
||||
- MaybeAddThrottle(
|
||||
- LookalikeUrlNavigationThrottle::MaybeCreateNavigationThrottle(handle),
|
||||
- &throttles);
|
||||
-
|
||||
MaybeAddThrottle(PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(handle),
|
||||
&throttles);
|
||||
#if BUILDFLAG(ENABLE_PDF)
|
||||
diff --git a/chrome/browser/flags/android/cached_feature_flags.cc b/chrome/browser/flags/android/cached_feature_flags.cc
|
||||
--- a/chrome/browser/flags/android/cached_feature_flags.cc
|
||||
+++ b/chrome/browser/flags/android/cached_feature_flags.cc
|
||||
@@ -580,7 +620,7 @@ diff --git a/chrome/browser/flags/android/cached_feature_flags.cc b/chrome/brows
|
||||
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
@@ -270,6 +270,14 @@ public class CachedFeatureFlags {
|
||||
@@ -265,6 +265,14 @@ public class CachedFeatureFlags {
|
||||
ChromeFeatureList.isEnabled(ChromeFeatureList.BACKGROUND_THREAD_POOL));
|
||||
}
|
||||
|
||||
@@ -595,7 +635,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
|
||||
/**
|
||||
* Caches flags that must take effect on startup but are set via native code.
|
||||
*/
|
||||
@@ -487,5 +495,7 @@ public class CachedFeatureFlags {
|
||||
@@ -470,5 +478,7 @@ public class CachedFeatureFlags {
|
||||
@NativeMethods
|
||||
interface Natives {
|
||||
boolean isNetworkServiceWarmUpEnabled();
|
||||
@@ -606,16 +646,16 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
|
||||
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
||||
--- a/chrome/browser/net/system_network_context_manager.cc
|
||||
+++ b/chrome/browser/net/system_network_context_manager.cc
|
||||
@@ -436,6 +436,8 @@ SystemNetworkContextManager::SystemNetworkContextManager(
|
||||
ssl_config_service_manager_(local_state_),
|
||||
@@ -349,6 +349,8 @@ SystemNetworkContextManager::SystemNetworkContextManager(
|
||||
SSLConfigServiceManager::CreateDefaultManager(local_state_)),
|
||||
proxy_config_monitor_(local_state_),
|
||||
stub_resolver_config_reader_(local_state_) {
|
||||
+ local_state_->SetDefaultPrefValue(prefs::kAdBlockFiltersURL,
|
||||
+ base::Value("https://www.bromite.org/filters/filters.dat"));
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#if !defined(OS_ANDROID)
|
||||
// QuicAllowed was not part of Android policy.
|
||||
const base::Value* value =
|
||||
@@ -516,6 +518,8 @@ SystemNetworkContextManager::~SystemNetworkContextManager() {
|
||||
@@ -419,6 +421,8 @@ SystemNetworkContextManager::~SystemNetworkContextManager() {
|
||||
void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
StubResolverConfigReader::RegisterPrefs(registry);
|
||||
|
||||
@@ -641,7 +681,7 @@ diff --git a/chrome/browser/sessions/session_restore_android.cc b/chrome/browser
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -215,6 +215,20 @@ CHAR_LIMIT guidelines:
|
||||
@@ -214,6 +214,20 @@ CHAR_LIMIT guidelines:
|
||||
Enter VR
|
||||
</message>
|
||||
|
||||
@@ -665,7 +705,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
|
||||
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
|
||||
--- a/chrome/common/pref_names.cc
|
||||
+++ b/chrome/common/pref_names.cc
|
||||
@@ -2318,6 +2318,9 @@ const char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled";
|
||||
@@ -2188,6 +2188,9 @@ const char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled";
|
||||
// capture devices without prompt.
|
||||
const char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls";
|
||||
|
||||
@@ -678,7 +718,7 @@ diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
|
||||
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -32,6 +32,7 @@ extern const char kDownloadBubbleEnabled[];
|
||||
@@ -31,6 +31,7 @@ extern const char kDownloadRestrictions[];
|
||||
extern const char kForceEphemeralProfiles[];
|
||||
extern const char kHomePageIsNewTabPage[];
|
||||
extern const char kHomePage[];
|
||||
@@ -686,20 +726,6 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
||||
extern const char kHttpsOnlyModeEnabled[];
|
||||
extern const char kImportantSitesDialogHistory[];
|
||||
extern const char kProfileCreationTime[];
|
||||
diff --git a/components/browser_ui/strings/android/site_settings.grdp b/components/browser_ui/strings/android/site_settings.grdp
|
||||
--- a/components/browser_ui/strings/android/site_settings.grdp
|
||||
+++ b/components/browser_ui/strings/android/site_settings.grdp
|
||||
@@ -247,8 +247,8 @@
|
||||
<message name="IDS_INTRUSIVE_ADS_INFORMATION" desc="The extra information at the top of the Site Details page when the site tends to show intrusive ads">
|
||||
This site shows intrusive or misleading ads
|
||||
</message>
|
||||
- <message name="IDS_WEBSITE_SETTINGS_CATEGORY_ADS_BLOCKED" desc="A setting that, if turned on, will block intrusive or misleading ads on sites that have a history of showing such ads.">
|
||||
- Block ads on sites that show intrusive or misleading ads
|
||||
+ <message name="IDS_WEBSITE_SETTINGS_CATEGORY_ADS_BLOCKED" desc="A setting that, if turned on, will block ads.">
|
||||
+ Block ads based on the current filters
|
||||
</message>
|
||||
<message name="IDS_WEBSITE_SETTINGS_CATEGORY_ADS_BLOCKED_LIST" desc="Summary text explaining that the Ads permission is set to block ads on some sites. To be shown in the list of permission categories.">
|
||||
Blocked on some sites
|
||||
diff --git a/components/component_updater/BUILD.gn b/components/component_updater/BUILD.gn
|
||||
--- a/components/component_updater/BUILD.gn
|
||||
+++ b/components/component_updater/BUILD.gn
|
||||
@@ -716,8 +742,8 @@ diff --git a/components/component_updater/BUILD.gn b/components/component_update
|
||||
"component_updater_service.cc",
|
||||
"component_updater_service.h",
|
||||
"component_updater_service_internal.h",
|
||||
@@ -37,6 +43,7 @@ static_library("component_updater") {
|
||||
"//components/prefs",
|
||||
@@ -36,6 +42,7 @@ static_library("component_updater") {
|
||||
"//components/crx_file",
|
||||
"//components/update_client",
|
||||
"//components/version_info",
|
||||
+ "//services/network/public/mojom",
|
||||
@@ -728,7 +754,7 @@ diff --git a/components/component_updater/adblock_updater_service.cc b/component
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/component_updater/adblock_updater_service.cc
|
||||
@@ -0,0 +1,271 @@
|
||||
@@ -0,0 +1,272 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -759,6 +785,7 @@ new file mode 100644
|
||||
+#include "base/files/file_path.h"
|
||||
+#include "base/files/file_util.h"
|
||||
+#include "base/logging.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "base/threading/thread_checker.h"
|
||||
+#include "base/threading/thread_task_runner_handle.h"
|
||||
+#include "base/time/time.h"
|
||||
@@ -818,8 +845,8 @@ new file mode 100644
|
||||
+ << next_check_delay << " seconds. ";
|
||||
+
|
||||
+ scheduler_->Schedule(
|
||||
+ base::Seconds(initial_check_delay),
|
||||
+ base::Seconds(next_check_delay),
|
||||
+ base::TimeDelta::FromSeconds(initial_check_delay),
|
||||
+ base::TimeDelta::FromSeconds(next_check_delay),
|
||||
+ base::BindRepeating(&AdBlockUpdaterService::OnDemandScheduledUpdate,
|
||||
+ base::Unretained(this)), base::DoNothing());
|
||||
+}
|
||||
@@ -840,7 +867,7 @@ new file mode 100644
|
||||
+ if (!last_update_.is_null()) {
|
||||
+ base::TimeDelta delta =
|
||||
+ base::TimeTicks::Now() - last_update_;
|
||||
+ if (delta < base::Seconds(on_demand_check_delay)) {
|
||||
+ if (delta < base::TimeDelta::FromSeconds(on_demand_check_delay)) {
|
||||
+ LOG(INFO) << "AdBlockUpdaterService: update not necessary.";
|
||||
+ return false;
|
||||
+ }
|
||||
@@ -907,7 +934,7 @@ new file mode 100644
|
||||
+ if (!failed) {
|
||||
+ base::TimeDelta delta =
|
||||
+ base::Time::Now() - min_last_modified;
|
||||
+ if (delta < base::Seconds(on_demand_check_delay)) {
|
||||
+ if (delta < base::TimeDelta::FromSeconds(on_demand_check_delay)) {
|
||||
+ LOG(INFO) << "AdBlockUpdaterService: update check not yet needed.";
|
||||
+ is_updating_ = false;
|
||||
+ return false;
|
||||
@@ -1004,7 +1031,7 @@ diff --git a/components/component_updater/adblock_updater_service.h b/components
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/component_updater/adblock_updater_service.h
|
||||
@@ -0,0 +1,100 @@
|
||||
@@ -0,0 +1,99 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -1034,7 +1061,6 @@ new file mode 100644
|
||||
+#include "base/callback_forward.h"
|
||||
+#include "base/gtest_prod_util.h"
|
||||
+#include "base/memory/ref_counted.h"
|
||||
+#include "base/observer_list.h"
|
||||
+#include "base/version.h"
|
||||
+#include "build/build_config.h"
|
||||
+#include "components/component_updater/update_scheduler.h"
|
||||
@@ -1338,7 +1364,7 @@ diff --git a/components/component_updater/download_filters_task.h b/components/c
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/component_updater/download_filters_task.h
|
||||
@@ -0,0 +1,130 @@
|
||||
@@ -0,0 +1,129 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -1363,6 +1389,7 @@ new file mode 100644
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "base/callback.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "base/memory/ref_counted.h"
|
||||
+#include "base/threading/thread_checker.h"
|
||||
+#include "components/update_client/network.h"
|
||||
@@ -1412,9 +1439,6 @@ new file mode 100644
|
||||
+// Defines a specialized task for updating AdBlock filters.
|
||||
+class DownloadFiltersTask : public base::RefCounted<DownloadFiltersTask> {
|
||||
+ public:
|
||||
+ DownloadFiltersTask(const DownloadFiltersTask&) = delete;
|
||||
+ DownloadFiltersTask& operator=(const DownloadFiltersTask&) = delete;
|
||||
+
|
||||
+ using Callback =
|
||||
+ base::OnceCallback<void(scoped_refptr<DownloadFiltersTask> task, Error error)>;
|
||||
+
|
||||
@@ -1464,6 +1488,7 @@ new file mode 100644
|
||||
+ base::FilePath file_path_;
|
||||
+
|
||||
+ friend class base::RefCounted<DownloadFiltersTask>;
|
||||
+ DISALLOW_COPY_AND_ASSIGN(DownloadFiltersTask);
|
||||
+};
|
||||
+
|
||||
+} // namespace update_client
|
||||
@@ -1472,7 +1497,7 @@ new file mode 100644
|
||||
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc
|
||||
--- a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc
|
||||
+++ b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc
|
||||
@@ -666,6 +666,17 @@ ContentSubresourceFilterThrottleManager::
|
||||
@@ -651,6 +651,17 @@ ContentSubresourceFilterThrottleManager::
|
||||
throttle->NotifyPageActivationWithRuleset(EnsureRulesetHandle(),
|
||||
ad_tagging_state);
|
||||
}
|
||||
@@ -1493,7 +1518,7 @@ diff --git a/components/subresource_filter/content/browser/content_subresource_f
|
||||
diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/components/subresource_filter/content/browser/ruleset_service.cc
|
||||
--- a/components/subresource_filter/content/browser/ruleset_service.cc
|
||||
+++ b/components/subresource_filter/content/browser/ruleset_service.cc
|
||||
@@ -45,9 +45,7 @@ namespace {
|
||||
@@ -47,9 +47,7 @@ namespace {
|
||||
|
||||
void RecordIndexAndWriteRulesetResult(
|
||||
RulesetService::IndexAndWriteRulesetResult result) {
|
||||
@@ -1504,7 +1529,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
}
|
||||
|
||||
// Implements operations on a `sentinel file`, which is used as a safeguard to
|
||||
@@ -227,10 +225,13 @@ RulesetService::RulesetService(
|
||||
@@ -228,10 +226,13 @@ RulesetService::RulesetService(
|
||||
RulesetService::~RulesetService() {}
|
||||
|
||||
void RulesetService::IndexAndStoreAndPublishRulesetIfNeeded(
|
||||
@@ -1520,7 +1545,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
// Trying to store a ruleset with the same version for a second time would
|
||||
// not only be futile, but would fail on Windows due to "File System
|
||||
// Tunneling" as long as the previously stored copy of the rules is still
|
||||
@@ -240,13 +241,16 @@ void RulesetService::IndexAndStoreAndPublishRulesetIfNeeded(
|
||||
@@ -241,13 +242,16 @@ void RulesetService::IndexAndStoreAndPublishRulesetIfNeeded(
|
||||
if (most_recently_indexed_version.IsCurrentFormatVersion() &&
|
||||
most_recently_indexed_version.content_version ==
|
||||
unindexed_ruleset_info.content_version) {
|
||||
@@ -1537,7 +1562,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -265,6 +269,18 @@ IndexedRulesetVersion RulesetService::GetMostRecentlyIndexedVersion() const {
|
||||
@@ -266,6 +270,18 @@ IndexedRulesetVersion RulesetService::GetMostRecentlyIndexedVersion() const {
|
||||
IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
const base::FilePath& indexed_ruleset_base_dir,
|
||||
const UnindexedRulesetInfo& unindexed_ruleset_info) {
|
||||
@@ -1556,7 +1581,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
base::BlockingType::MAY_BLOCK);
|
||||
|
||||
@@ -272,6 +288,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
@@ -273,6 +289,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
unindexed_ruleset_info);
|
||||
|
||||
if (!unindexed_ruleset_stream_generator.ruleset_stream()) {
|
||||
@@ -1564,7 +1589,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
RecordIndexAndWriteRulesetResult(
|
||||
IndexAndWriteRulesetResult::FAILED_OPENING_UNINDEXED_RULESET);
|
||||
return IndexedRulesetVersion();
|
||||
@@ -285,6 +302,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
@@ -286,6 +303,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
indexed_ruleset_base_dir, indexed_version);
|
||||
|
||||
if (!base::CreateDirectory(indexed_ruleset_version_dir)) {
|
||||
@@ -1572,7 +1597,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
RecordIndexAndWriteRulesetResult(
|
||||
IndexAndWriteRulesetResult::FAILED_CREATING_VERSION_DIR);
|
||||
return IndexedRulesetVersion();
|
||||
@@ -310,6 +328,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
@@ -311,6 +329,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
|
||||
RulesetIndexer indexer;
|
||||
if (!(*g_index_ruleset_func)(&unindexed_ruleset_stream_generator, &indexer)) {
|
||||
@@ -1580,7 +1605,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
RecordIndexAndWriteRulesetResult(
|
||||
IndexAndWriteRulesetResult::FAILED_PARSING_UNINDEXED_RULESET);
|
||||
return IndexedRulesetVersion();
|
||||
@@ -330,6 +349,8 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
@@ -331,6 +350,8 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset(
|
||||
if (result != IndexAndWriteRulesetResult::SUCCESS)
|
||||
return IndexedRulesetVersion();
|
||||
|
||||
@@ -1589,7 +1614,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
DCHECK(indexed_version.IsValid());
|
||||
return indexed_version;
|
||||
}
|
||||
@@ -454,6 +475,7 @@ void RulesetService::IndexAndStoreRuleset(
|
||||
@@ -455,6 +476,7 @@ void RulesetService::IndexAndStoreRuleset(
|
||||
void RulesetService::OnWrittenRuleset(WriteRulesetCallback result_callback,
|
||||
const IndexedRulesetVersion& version) {
|
||||
DCHECK(!result_callback.is_null());
|
||||
@@ -1597,7 +1622,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
if (!version.IsValid())
|
||||
return;
|
||||
version.SaveToPrefs(local_state_);
|
||||
@@ -466,7 +488,6 @@ void RulesetService::OpenAndPublishRuleset(
|
||||
@@ -467,7 +489,6 @@ void RulesetService::OpenAndPublishRuleset(
|
||||
IndexedRulesetLocator::GetRulesetDataFilePath(
|
||||
IndexedRulesetLocator::GetSubdirectoryPathForVersion(
|
||||
indexed_ruleset_base_dir_, version));
|
||||
@@ -1608,7 +1633,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/
|
||||
diff --git a/components/subresource_filter/content/browser/ruleset_service.h b/components/subresource_filter/content/browser/ruleset_service.h
|
||||
--- a/components/subresource_filter/content/browser/ruleset_service.h
|
||||
+++ b/components/subresource_filter/content/browser/ruleset_service.h
|
||||
@@ -184,7 +184,7 @@ class RulesetService : public base::SupportsWeakPtr<RulesetService> {
|
||||
@@ -180,7 +180,7 @@ class RulesetService : public base::SupportsWeakPtr<RulesetService> {
|
||||
//
|
||||
// Virtual so that it can be mocked out in tests.
|
||||
virtual void IndexAndStoreAndPublishRulesetIfNeeded(
|
||||
@@ -1617,7 +1642,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.h b/c
|
||||
|
||||
// Get the ruleset version associated with the current local_state_.
|
||||
IndexedRulesetVersion GetMostRecentlyIndexedVersion() const;
|
||||
@@ -217,6 +217,11 @@ class RulesetService : public base::SupportsWeakPtr<RulesetService> {
|
||||
@@ -213,6 +213,11 @@ class RulesetService : public base::SupportsWeakPtr<RulesetService> {
|
||||
const base::FilePath& indexed_ruleset_base_dir,
|
||||
const UnindexedRulesetInfo& unindexed_ruleset_info);
|
||||
|
||||
@@ -1653,7 +1678,7 @@ diff --git a/components/subresource_filter/content/browser/verified_ruleset_deal
|
||||
+#include "base/logging.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/task/task_runner_util.h"
|
||||
#include "base/task_runner_util.h"
|
||||
@@ -39,6 +40,9 @@ RulesetFilePtr VerifiedRulesetDealer::OpenAndSetRulesetFile(
|
||||
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("loading"),
|
||||
"VerifiedRulesetDealer::OpenAndSetRulesetFile", "file_valid",
|
||||
@@ -1667,8 +1692,8 @@ diff --git a/components/subresource_filter/content/browser/verified_ruleset_deal
|
||||
diff --git a/components/subresource_filter/core/browser/subresource_filter_features.cc b/components/subresource_filter/core/browser/subresource_filter_features.cc
|
||||
--- a/components/subresource_filter/core/browser/subresource_filter_features.cc
|
||||
+++ b/components/subresource_filter/core/browser/subresource_filter_features.cc
|
||||
@@ -55,69 +55,7 @@ class CommaSeparatedStrings {
|
||||
const std::vector<base::StringPiece> pieces_;
|
||||
@@ -54,69 +54,7 @@ class CommaSeparatedStrings {
|
||||
DISALLOW_COPY_AND_ASSIGN(CommaSeparatedStrings);
|
||||
};
|
||||
|
||||
-std::string TakeVariationParamOrReturnEmpty(
|
||||
@@ -1738,7 +1763,7 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu
|
||||
// If ad tagging is enabled, turn on the dryrun automatically.
|
||||
bool ad_tagging_enabled = base::FeatureList::IsEnabled(kAdTagging);
|
||||
const struct {
|
||||
@@ -125,23 +63,16 @@ std::vector<Configuration> FillEnabledPresetConfigurations(
|
||||
@@ -124,23 +62,16 @@ std::vector<Configuration> FillEnabledPresetConfigurations(
|
||||
bool enabled_by_default;
|
||||
Configuration (*factory_method)();
|
||||
} kAvailablePresetConfigurations[] = {
|
||||
@@ -1764,7 +1789,7 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu
|
||||
enabled_configurations.push_back(available_preset.factory_method());
|
||||
}
|
||||
}
|
||||
@@ -149,46 +80,10 @@ std::vector<Configuration> FillEnabledPresetConfigurations(
|
||||
@@ -148,46 +79,10 @@ std::vector<Configuration> FillEnabledPresetConfigurations(
|
||||
return enabled_configurations;
|
||||
}
|
||||
|
||||
@@ -1812,6 +1837,17 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu
|
||||
|
||||
return configs;
|
||||
}
|
||||
diff --git a/components/subresource_filter/core/common/common_features.cc b/components/subresource_filter/core/common/common_features.cc
|
||||
--- a/components/subresource_filter/core/common/common_features.cc
|
||||
+++ b/components/subresource_filter/core/common/common_features.cc
|
||||
@@ -6,6 +6,6 @@
|
||||
|
||||
namespace subresource_filter {
|
||||
|
||||
-const base::Feature kAdTagging{"AdTagging", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+const base::Feature kAdTagging{"AdTagging", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
} // namespace subresource_filter
|
||||
diff --git a/components/subresource_filter/core/common/indexed_ruleset.cc b/components/subresource_filter/core/common/indexed_ruleset.cc
|
||||
--- a/components/subresource_filter/core/common/indexed_ruleset.cc
|
||||
+++ b/components/subresource_filter/core/common/indexed_ruleset.cc
|
||||
@@ -1850,5 +1886,6 @@ diff --git a/content/browser/renderer_host/navigation_throttle_runner.cc b/conte
|
||||
}
|
||||
|
||||
NavigationThrottle* NavigationThrottleRunner::GetDeferringThrottle() const {
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 8 Jan 2022 19:42:34 +0100
|
||||
Subject: Bromite package name
|
||||
|
||||
---
|
||||
chrome/android/BUILD.gn | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
||||
--- a/chrome/android/BUILD.gn
|
||||
+++ b/chrome/android/BUILD.gn
|
||||
@@ -44,7 +44,7 @@ if (android_64bit_target_cpu && skip_secondary_abi_for_cq) {
|
||||
assert(current_toolchain != android_secondary_abi_toolchain)
|
||||
}
|
||||
|
||||
-_default_package = "org.chromium.chrome"
|
||||
+_default_package = "org.bromite.bromite"
|
||||
if (android_channel != "default" && android_channel != "stable") {
|
||||
# android-binary-size trybot may checks if an internal Chrome variant's
|
||||
# AndroidManifest is as expected by ensuring the differences between its
|
||||
--
|
||||
2.25.1
|
||||
@@ -0,0 +1,34 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 9 May 2020 14:42:37 +0200
|
||||
Subject: Change default webRTC policy to not use any address
|
||||
|
||||
This prevents leakage of the local IP address.
|
||||
|
||||
See also: https://github.com/bromite/bromite/issues/553
|
||||
---
|
||||
.../peerconnection/peer_connection_dependency_factory.cc | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
|
||||
--- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
|
||||
+++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
|
||||
@@ -663,12 +663,13 @@ PeerConnectionDependencyFactory::CreatePortAllocator(
|
||||
port_config.enable_nonproxied_udp = false;
|
||||
break;
|
||||
case DEFAULT:
|
||||
- port_config.enable_multiple_routes = true;
|
||||
- port_config.enable_nonproxied_udp = true;
|
||||
+ port_config.enable_multiple_routes = false;
|
||||
+ port_config.enable_nonproxied_udp = false;
|
||||
+ port_config.enable_default_local_candidate = false;
|
||||
break;
|
||||
}
|
||||
|
||||
- VLOG(3) << "WebRTC routing preferences: "
|
||||
+ LOG(INFO) << "WebRTC routing preferences: "
|
||||
<< "policy: " << policy
|
||||
<< ", multiple_routes: " << port_config.enable_multiple_routes
|
||||
<< ", nonproxied_udp: " << port_config.enable_nonproxied_udp
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 8 Jan 2022 19:42:34 +0100
|
||||
Subject: Chromium package name
|
||||
|
||||
---
|
||||
chrome/android/BUILD.gn | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
||||
--- a/chrome/android/BUILD.gn
|
||||
+++ b/chrome/android/BUILD.gn
|
||||
@@ -44,7 +44,7 @@ if (android_64bit_target_cpu && skip_secondary_abi_for_cq) {
|
||||
assert(current_toolchain != android_secondary_abi_toolchain)
|
||||
}
|
||||
|
||||
-_default_package = "org.chromium.chrome"
|
||||
+_default_package = "org.bromite.chromium"
|
||||
if (android_channel != "default" && android_channel != "stable") {
|
||||
# android-binary-size trybot may checks if an internal Chrome variant's
|
||||
# AndroidManifest is as expected by ensuring the differences between its
|
||||
--
|
||||
2.25.1
|
||||
@@ -1,193 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 22 Jul 2021 23:10:52 +0200
|
||||
Subject: Client hints overrides
|
||||
|
||||
Disable critical client hints
|
||||
Hard-code model to SAMSUNG SM-G960U
|
||||
use Google Chrome branding for client hints
|
||||
---
|
||||
chrome/browser/prefs/browser_prefs.cc | 2 +-
|
||||
components/embedder_support/user_agent_utils.cc | 4 +---
|
||||
content/browser/client_hints/client_hints.cc | 3 ++-
|
||||
content/browser/loader/navigation_url_loader_impl.cc | 5 +++++
|
||||
content/common/user_agent.cc | 9 +--------
|
||||
content/public/common/content_features.cc | 2 +-
|
||||
services/network/public/cpp/client_hints.cc | 1 +
|
||||
services/network/public/cpp/features.cc | 4 ++--
|
||||
third_party/blink/common/client_hints/client_hints.cc | 1 +
|
||||
.../blink/common/client_hints/enabled_client_hints.cc | 4 +++-
|
||||
third_party/blink/common/features.cc | 4 ++--
|
||||
11 files changed, 20 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -765,7 +765,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
|
||||
registry->RegisterListPref(prefs::kUsedPolicyCertificates);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
- registry->RegisterBooleanPref(kUserAgentClientHintsEnabled, true);
|
||||
+ registry->RegisterBooleanPref(kUserAgentClientHintsEnabled, false);
|
||||
|
||||
registry->RegisterBooleanPref(kCloudPolicyOverridesPlatformPolicy, false);
|
||||
|
||||
diff --git a/components/embedder_support/user_agent_utils.cc b/components/embedder_support/user_agent_utils.cc
|
||||
--- a/components/embedder_support/user_agent_utils.cc
|
||||
+++ b/components/embedder_support/user_agent_utils.cc
|
||||
@@ -226,9 +226,7 @@ const blink::UserAgentBrandList GetUserAgentBrandList(
|
||||
bool parse_result = base::StringToInt(major_version, &major_version_number);
|
||||
DCHECK(parse_result);
|
||||
absl::optional<std::string> brand;
|
||||
-#if !BUILDFLAG(CHROMIUM_BRANDING)
|
||||
- brand = version_info::GetProductName();
|
||||
-#endif
|
||||
+ brand = "Google Chrome";
|
||||
absl::optional<std::string> maybe_brand_override =
|
||||
base::GetFieldTrialParamValueByFeature(features::kGreaseUACH,
|
||||
"brand_override");
|
||||
diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/client_hints/client_hints.cc
|
||||
--- a/content/browser/client_hints/client_hints.cc
|
||||
+++ b/content/browser/client_hints/client_hints.cc
|
||||
@@ -433,7 +433,8 @@ void AddPrefersColorSchemeHeader(net::HttpRequestHeaders* headers,
|
||||
is_dark_mode ? "dark" : "light");
|
||||
}
|
||||
|
||||
-bool IsValidURLForClientHints(const url::Origin& origin) {
|
||||
+bool IsValidURLForClientHints(const url::Origin& origin) { // disabled in Bromite
|
||||
+ if ((true)) return false;
|
||||
return network::IsOriginPotentiallyTrustworthy(origin);
|
||||
}
|
||||
|
||||
diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc
|
||||
--- a/content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ b/content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -988,6 +988,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived(
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (!base::FeatureList::IsEnabled(network::features::kAcceptCHFrame)) {
|
||||
+ std::move(callback).Run(net::OK);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
LogAcceptCHFrameStatus(AcceptCHFrameRestart::kFramePresent);
|
||||
|
||||
// Given that this is happening in the middle of navigation, there should
|
||||
diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
|
||||
--- a/content/common/user_agent.cc
|
||||
+++ b/content/common/user_agent.cc
|
||||
@@ -300,14 +300,7 @@ std::string BuildUserAgentFromProduct(const std::string& product) {
|
||||
}
|
||||
|
||||
std::string BuildModelInfo() {
|
||||
- std::string model;
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
- // Only send the model information if on the release build of Android,
|
||||
- // matching user agent behaviour.
|
||||
- if (base::SysInfo::GetAndroidBuildCodename() == "REL")
|
||||
- model = base::SysInfo::HardwareModelName();
|
||||
-#endif
|
||||
- return model;
|
||||
+ return "SAMSUNG SM-G960U";
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
|
||||
--- a/content/public/common/content_features.cc
|
||||
+++ b/content/public/common/content_features.cc
|
||||
@@ -240,7 +240,7 @@ const base::Feature kCrashReporting{"CrashReporting",
|
||||
// Enables support for the `Critical-CH` response header.
|
||||
// https://github.com/WICG/client-hints-infrastructure/blob/master/reliability.md#critical-ch
|
||||
const base::Feature kCriticalClientHint{"CriticalClientHint",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// Enable debugging the issue crbug.com/1201355
|
||||
const base::Feature kDebugHistoryInterventionNoUserActivation{
|
||||
diff --git a/services/network/public/cpp/client_hints.cc b/services/network/public/cpp/client_hints.cc
|
||||
--- a/services/network/public/cpp/client_hints.cc
|
||||
+++ b/services/network/public/cpp/client_hints.cc
|
||||
@@ -98,6 +98,7 @@ const DecodeMap& GetDecodeMap() {
|
||||
|
||||
absl::optional<std::vector<network::mojom::WebClientHintsType>>
|
||||
ParseClientHintsHeader(const std::string& header) {
|
||||
+ if ((true)) return absl::nullopt;
|
||||
// Accept-CH is an sh-list of tokens; see:
|
||||
// https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-header-structure-19#section-3.1
|
||||
absl::optional<net::structured_headers::List> maybe_list =
|
||||
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
|
||||
--- a/services/network/public/cpp/features.cc
|
||||
+++ b/services/network/public/cpp/features.cc
|
||||
@@ -184,8 +184,8 @@ const base::Feature kWebSocketReassembleShortMessages{
|
||||
// Enable support for ACCEPT_CH H2/3 frame as part of Client Hint Reliability.
|
||||
// See:
|
||||
// https://tools.ietf.org/html/draft-davidben-http-client-hint-reliability-02#section-4.3
|
||||
-const base::Feature kAcceptCHFrame{"AcceptCHFrame",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+const base::Feature kAcceptCHFrame{"AcceptCHFrame", // disabled by default
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT}; // in Bromite
|
||||
|
||||
const base::Feature kSCTAuditingRetryReports{"SCTAuditingRetryReports",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
diff --git a/third_party/blink/common/client_hints/client_hints.cc b/third_party/blink/common/client_hints/client_hints.cc
|
||||
--- a/third_party/blink/common/client_hints/client_hints.cc
|
||||
+++ b/third_party/blink/common/client_hints/client_hints.cc
|
||||
@@ -118,6 +118,7 @@ const size_t kWebEffectiveConnectionTypeMappingCount =
|
||||
std::size(kWebEffectiveConnectionTypeMapping);
|
||||
|
||||
bool IsClientHintSentByDefault(network::mojom::WebClientHintsType type) {
|
||||
+ if ((true)) return false;
|
||||
switch (type) {
|
||||
case network::mojom::WebClientHintsType::kSaveData:
|
||||
case network::mojom::WebClientHintsType::kUA:
|
||||
diff --git a/third_party/blink/common/client_hints/enabled_client_hints.cc b/third_party/blink/common/client_hints/enabled_client_hints.cc
|
||||
--- a/third_party/blink/common/client_hints/enabled_client_hints.cc
|
||||
+++ b/third_party/blink/common/client_hints/enabled_client_hints.cc
|
||||
@@ -22,6 +22,7 @@ namespace {
|
||||
using ::network::mojom::WebClientHintsType;
|
||||
|
||||
bool IsDisabledByFeature(const WebClientHintsType type) {
|
||||
+ if ((true)) return true;
|
||||
switch (type) {
|
||||
case WebClientHintsType::kUA:
|
||||
case WebClientHintsType::kUAArch:
|
||||
@@ -136,7 +137,7 @@ bool IsOriginTrialEnabled(const GURL& url,
|
||||
} // namespace
|
||||
|
||||
bool EnabledClientHints::IsEnabled(const WebClientHintsType type) const {
|
||||
- return enabled_types_[static_cast<int>(type)];
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void EnabledClientHints::SetIsEnabled(const WebClientHintsType type,
|
||||
@@ -169,6 +170,7 @@ void EnabledClientHints::SetIsEnabled(
|
||||
|
||||
std::vector<WebClientHintsType> EnabledClientHints::GetEnabledHints() const {
|
||||
std::vector<WebClientHintsType> hints;
|
||||
+ if ((true)) return hints;
|
||||
for (const auto& elem : network::GetClientHintToNameMap()) {
|
||||
const auto& type = elem.first;
|
||||
if (IsEnabled(type))
|
||||
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
|
||||
--- a/third_party/blink/common/features.cc
|
||||
+++ b/third_party/blink/common/features.cc
|
||||
@@ -156,7 +156,7 @@ const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
|
||||
// An experimental replacement for the `User-Agent` header, defined in
|
||||
// https://tools.ietf.org/html/draft-west-ua-client-hints.
|
||||
const base::Feature kUserAgentClientHint{"UserAgentClientHint",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// Enable `sec-ch-ua-full-version-list` client hint.
|
||||
const base::Feature kUserAgentClientHintFullVersionList{
|
||||
@@ -767,7 +767,7 @@ const base::Feature kResamplingScrollEvents{"ResamplingScrollEvents",
|
||||
const base::Feature kAllowClientHintsToThirdParty {
|
||||
"AllowClientHintsToThirdParty",
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#else
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#endif
|
||||
--
|
||||
2.25.1
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,975 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 19 Mar 2022 10:53:24 +0100
|
||||
Subject: Dictionary suggestions for the Omnibox
|
||||
|
||||
Revert "Disable Dictionary suggestions for the Omnibox"
|
||||
|
||||
This reverts commit d3ec2b2d25066ec089f8351a44b919ded4270e83.
|
||||
---
|
||||
chrome/android/java/res/layout/url_bar.xml | 1 +
|
||||
.../chrome/browser/omnibox/UrlBar.java | 931 ++++++++++++++++++
|
||||
.../chrome/browser/omnibox/UrlBar.java | 3 +-
|
||||
3 files changed, 933 insertions(+), 2 deletions(-)
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
|
||||
diff --git a/chrome/android/java/res/layout/url_bar.xml b/chrome/android/java/res/layout/url_bar.xml
|
||||
--- a/chrome/android/java/res/layout/url_bar.xml
|
||||
+++ b/chrome/android/java/res/layout/url_bar.xml
|
||||
@@ -13,5 +13,6 @@
|
||||
android:singleLine="true"
|
||||
android:imeOptions="actionGo|flagNoExtractUi|flagNoFullscreen"
|
||||
android:textSize="@dimen/location_bar_url_text_size"
|
||||
+ android:inputType="textUri"
|
||||
android:hint="@string/search_or_type_web_address"
|
||||
android:importantForAutofill="no" />
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
@@ -0,0 +1,931 @@
|
||||
+// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+package org.chromium.chrome.browser.omnibox;
|
||||
+
|
||||
+import android.content.Context;
|
||||
+import android.graphics.Canvas;
|
||||
+import android.graphics.Paint;
|
||||
+import android.graphics.Rect;
|
||||
+import android.os.Build;
|
||||
+import android.provider.Settings;
|
||||
+import android.text.Editable;
|
||||
+import android.text.InputType;
|
||||
+import android.text.Layout;
|
||||
+import android.text.Selection;
|
||||
+import android.text.SpannableStringBuilder;
|
||||
+import android.text.TextUtils;
|
||||
+import android.text.TextWatcher;
|
||||
+import android.text.style.ReplacementSpan;
|
||||
+import android.util.AttributeSet;
|
||||
+import android.view.GestureDetector;
|
||||
+import android.view.KeyEvent;
|
||||
+import android.view.MotionEvent;
|
||||
+import android.view.View;
|
||||
+import android.view.inputmethod.EditorInfo;
|
||||
+import android.view.inputmethod.InputConnection;
|
||||
+import android.widget.TextView;
|
||||
+
|
||||
+import androidx.annotation.IntDef;
|
||||
+import androidx.annotation.NonNull;
|
||||
+import androidx.annotation.Nullable;
|
||||
+import androidx.core.text.BidiFormatter;
|
||||
+import androidx.core.util.ObjectsCompat;
|
||||
+import androidx.core.view.inputmethod.EditorInfoCompat;
|
||||
+
|
||||
+import org.chromium.base.ApiCompatibilityUtils;
|
||||
+import org.chromium.base.Callback;
|
||||
+import org.chromium.base.Log;
|
||||
+import org.chromium.base.SysUtils;
|
||||
+import org.chromium.base.ThreadUtils;
|
||||
+import org.chromium.base.compat.ApiHelperForO;
|
||||
+import org.chromium.base.metrics.RecordUserAction;
|
||||
+import org.chromium.ui.KeyboardVisibilityDelegate;
|
||||
+import org.chromium.ui.base.WindowDelegate;
|
||||
+
|
||||
+import java.lang.annotation.Retention;
|
||||
+import java.lang.annotation.RetentionPolicy;
|
||||
+
|
||||
+/**
|
||||
+ * The URL text entry view for the Omnibox.
|
||||
+ */
|
||||
+public abstract class UrlBar extends AutocompleteEditText {
|
||||
+ private static final String TAG = "UrlBar";
|
||||
+
|
||||
+ private static final boolean DEBUG = false;
|
||||
+
|
||||
+ // TextView becomes very slow on long strings, so we limit maximum length
|
||||
+ // of what is displayed to the user, see limitDisplayableLength().
|
||||
+ private static final int MAX_DISPLAYABLE_LENGTH = 4000;
|
||||
+ private static final int MAX_DISPLAYABLE_LENGTH_LOW_END = 1000;
|
||||
+
|
||||
+ private boolean mFirstDrawComplete;
|
||||
+
|
||||
+ /**
|
||||
+ * The text direction of the URL or query: LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, or
|
||||
+ * LAYOUT_DIRECTION_RTL.
|
||||
+ * */
|
||||
+ private int mUrlDirection;
|
||||
+
|
||||
+ private UrlBarDelegate mUrlBarDelegate;
|
||||
+ private UrlTextChangeListener mUrlTextChangeListener;
|
||||
+ private TextWatcher mTextChangedListener;
|
||||
+ private UrlBarTextContextMenuDelegate mTextContextMenuDelegate;
|
||||
+ private Callback<Integer> mUrlDirectionListener;
|
||||
+
|
||||
+ /**
|
||||
+ * The gesture detector is used to detect long presses. Long presses require special treatment
|
||||
+ * because the URL bar has custom touch event handling. See: {@link #onTouchEvent}.
|
||||
+ */
|
||||
+ private final GestureDetector mGestureDetector;
|
||||
+
|
||||
+ private final KeyboardHideHelper mKeyboardHideHelper;
|
||||
+
|
||||
+ private boolean mFocused;
|
||||
+ private boolean mSuppressingTouchMoveEventsForThisTouch;
|
||||
+ private MotionEvent mSuppressedTouchDownEvent;
|
||||
+ private boolean mAllowFocus = true;
|
||||
+
|
||||
+ private boolean mPendingScroll;
|
||||
+ private int mPreviousWidth;
|
||||
+
|
||||
+ @ScrollType
|
||||
+ private int mPreviousScrollType;
|
||||
+ private String mPreviousScrollText;
|
||||
+ private int mPreviousScrollViewWidth;
|
||||
+ private int mPreviousScrollResultXPosition;
|
||||
+ private float mPreviousScrollFontSize;
|
||||
+ private boolean mPreviousScrollWasRtl;
|
||||
+
|
||||
+ // Used as a hint to indicate the text may contain an ellipsize span. This will be true if an
|
||||
+ // ellispize span was applied the last time the text changed. A true value here does not
|
||||
+ // guarantee that the text does contain the span currently as newly set text may have cleared
|
||||
+ // this (and it the value will only be recalculated after the text has been changed).
|
||||
+ private boolean mDidEllipsizeTextHint;
|
||||
+
|
||||
+ /** A cached point for getting this view's location in the window. */
|
||||
+ private final int[] mCachedLocation = new int[2];
|
||||
+
|
||||
+ /** The location of this view on the last ACTION_DOWN event. */
|
||||
+ private float mDownEventViewTop;
|
||||
+
|
||||
+ /**
|
||||
+ * The character index in the displayed text where the origin ends. This is required to
|
||||
+ * ensure that the end of the origin is not scrolled out of view for long hostnames.
|
||||
+ */
|
||||
+ private int mOriginEndIndex;
|
||||
+
|
||||
+ @ScrollType
|
||||
+ private int mScrollType;
|
||||
+
|
||||
+ /** What scrolling action should be taken after the URL bar text changes. **/
|
||||
+ @IntDef({ScrollType.NO_SCROLL, ScrollType.SCROLL_TO_TLD, ScrollType.SCROLL_TO_BEGINNING})
|
||||
+ @Retention(RetentionPolicy.SOURCE)
|
||||
+ public @interface ScrollType {
|
||||
+ int NO_SCROLL = 0;
|
||||
+ int SCROLL_TO_TLD = 1;
|
||||
+ int SCROLL_TO_BEGINNING = 2;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * An optional string to use with AccessibilityNodeInfo to report text content.
|
||||
+ * This is particularly important for auto-fill applications, such as password managers, that
|
||||
+ * rely on AccessibilityNodeInfo data to apply related form-fill data.
|
||||
+ */
|
||||
+ private CharSequence mTextForAutofillServices;
|
||||
+ protected boolean mRequestingAutofillStructure;
|
||||
+
|
||||
+ /**
|
||||
+ * Delegate used to communicate with the content side and the parent layout.
|
||||
+ */
|
||||
+ public interface UrlBarDelegate {
|
||||
+ /**
|
||||
+ * @return The view to be focused on a backward focus traversal.
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ View getViewForUrlBackFocus();
|
||||
+
|
||||
+ /**
|
||||
+ * @return Whether the keyboard should be allowed to learn from the user input.
|
||||
+ */
|
||||
+ boolean allowKeyboardLearning();
|
||||
+
|
||||
+ /**
|
||||
+ * Called to notify that back key has been pressed while the URL bar has focus.
|
||||
+ */
|
||||
+ void backKeyPressed();
|
||||
+
|
||||
+ /**
|
||||
+ * Called to notify that a tap or long press gesture has been detected.
|
||||
+ * @param isLongPress Whether or not is a long press gesture.
|
||||
+ */
|
||||
+ void gestureDetected(boolean isLongPress);
|
||||
+ }
|
||||
+
|
||||
+ /** Provides updates about the URL text changes. */
|
||||
+ public interface UrlTextChangeListener {
|
||||
+ /**
|
||||
+ * Called when the text state has changed.
|
||||
+ * @param textWithoutAutocomplete The url bar text without autocompletion.
|
||||
+ * @param textWithAutocomplete The url bar text with autocompletion.
|
||||
+ */
|
||||
+ // TODO(crbug.com/1003080): Consider splitting these into two different callbacks.
|
||||
+ void onTextChanged(String textWithoutAutocomplete, String textWithAutocomplete);
|
||||
+ }
|
||||
+
|
||||
+ /** Delegate that provides the additional functionality to the textual context menus. */
|
||||
+ interface UrlBarTextContextMenuDelegate {
|
||||
+ /** @return The text to be pasted into the UrlBar. */
|
||||
+ @NonNull
|
||||
+ String getTextToPaste();
|
||||
+
|
||||
+ /**
|
||||
+ * Gets potential replacement text to be used instead of the current selected text for
|
||||
+ * cut/copy actions. If null is returned, the existing text will be cut or copied.
|
||||
+ *
|
||||
+ * @param currentText The current displayed text.
|
||||
+ * @param selectionStart The selection start in the display text.
|
||||
+ * @param selectionEnd The selection end in the display text.
|
||||
+ * @return The text to be cut/copied instead of the currently selected text.
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ String getReplacementCutCopyText(String currentText, int selectionStart, int selectionEnd);
|
||||
+ }
|
||||
+
|
||||
+ public UrlBar(Context context, AttributeSet attrs) {
|
||||
+ super(context, attrs);
|
||||
+ mUrlDirection = LAYOUT_DIRECTION_LOCALE;
|
||||
+
|
||||
+ // The URL Bar is derived from an text edit class, and as such is focusable by
|
||||
+ // default. This means that if it is created before the first draw of the UI it
|
||||
+ // will (as the only focusable element of the UI) get focus on the first draw.
|
||||
+ // We react to this by greying out the tab area and bringing up the keyboard,
|
||||
+ // which we don't want to do at startup. Prevent this by disabling focus until
|
||||
+ // the first draw.
|
||||
+ setFocusable(false);
|
||||
+ setFocusableInTouchMode(false);
|
||||
+
|
||||
+ // The HTC Sense IME will attempt to autocomplete words in the Omnibox when Prediction is
|
||||
+ // enabled. We want to disable this feature and rely on the Omnibox's implementation.
|
||||
+ // Their IME does not respect ~TYPE_TEXT_FLAG_AUTO_COMPLETE nor any of the other InputType
|
||||
+ // options I tried, but setting the filter variation prevents it. Sadly, it also removes
|
||||
+ // the .com button, but the prediction was buggy as it would autocomplete words even when
|
||||
+ // typing at the beginning of the omnibox text when other content was present (messing up
|
||||
+ // what was previously there). See bug: http://b/issue?id=6200071
|
||||
+ String defaultIme = Settings.Secure.getString(
|
||||
+ getContext().getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
|
||||
+ if (defaultIme != null && defaultIme.contains("com.htc.android.htcime")) {
|
||||
+ setInputType(getInputType() | InputType.TYPE_TEXT_VARIATION_FILTER);
|
||||
+ }
|
||||
+
|
||||
+ mGestureDetector =
|
||||
+ new GestureDetector(getContext(), new GestureDetector.SimpleOnGestureListener() {
|
||||
+ @Override
|
||||
+ public void onLongPress(MotionEvent e) {
|
||||
+ if (mUrlBarDelegate == null) return;
|
||||
+ mUrlBarDelegate.gestureDetected(true);
|
||||
+ performLongClick();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean onSingleTapUp(MotionEvent e) {
|
||||
+ if (mUrlBarDelegate == null) return true;
|
||||
+ requestFocus();
|
||||
+ mUrlBarDelegate.gestureDetected(false);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }, ThreadUtils.getUiThreadHandler());
|
||||
+ mGestureDetector.setOnDoubleTapListener(null);
|
||||
+ mKeyboardHideHelper = new KeyboardHideHelper(this, new Runnable() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ if (mUrlBarDelegate != null) mUrlBarDelegate.backKeyPressed();
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
+ ApiCompatibilityUtils.disableSmartSelectionTextClassifier(this);
|
||||
+ }
|
||||
+
|
||||
+ public void destroy() {
|
||||
+ setAllowFocus(false);
|
||||
+ mUrlBarDelegate = null;
|
||||
+ setOnFocusChangeListener(null);
|
||||
+ mTextContextMenuDelegate = null;
|
||||
+ mUrlTextChangeListener = null;
|
||||
+ mTextChangedListener = null;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Initialize the delegate that allows interaction with the Window.
|
||||
+ */
|
||||
+ public void setWindowDelegate(WindowDelegate windowDelegate) {
|
||||
+ mKeyboardHideHelper.setWindowDelegate(windowDelegate);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Set the delegate to be used for text context menu actions.
|
||||
+ */
|
||||
+ public void setTextContextMenuDelegate(UrlBarTextContextMenuDelegate delegate) {
|
||||
+ mTextContextMenuDelegate = delegate;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean onKeyPreIme(int keyCode, KeyEvent event) {
|
||||
+ if (KeyEvent.KEYCODE_BACK == keyCode && event.getAction() == KeyEvent.ACTION_UP) {
|
||||
+ mKeyboardHideHelper.monitorForKeyboardHidden();
|
||||
+ }
|
||||
+ return super.onKeyPreIme(keyCode, event);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * See {@link AutocompleteEditText#setIgnoreTextChangesForAutocomplete(boolean)}.
|
||||
+ * <p>
|
||||
+ * {@link #setDelegate(UrlBarDelegate)} must be called with a non-null instance prior to
|
||||
+ * enabling autocomplete.
|
||||
+ */
|
||||
+ @Override
|
||||
+ public void setIgnoreTextChangesForAutocomplete(boolean ignoreAutocomplete) {
|
||||
+ assert mUrlBarDelegate != null;
|
||||
+ super.setIgnoreTextChangesForAutocomplete(ignoreAutocomplete);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
||||
+ mFocused = focused;
|
||||
+ super.onFocusChanged(focused, direction, previouslyFocusedRect);
|
||||
+
|
||||
+ if (focused) {
|
||||
+ mPendingScroll = false;
|
||||
+ }
|
||||
+ fixupTextDirection();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets whether this {@link UrlBar} should be focusable.
|
||||
+ */
|
||||
+ public void setAllowFocus(boolean allowFocus) {
|
||||
+ mAllowFocus = allowFocus;
|
||||
+ setFocusable(allowFocus);
|
||||
+ setFocusableInTouchMode(allowFocus);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the {@link UrlBar}'s text direction based on focus and contents.
|
||||
+ *
|
||||
+ * Should be called whenever focus or text contents change.
|
||||
+ */
|
||||
+ private void fixupTextDirection() {
|
||||
+ // When unfocused, force left-to-right rendering at the paragraph level (which is desired
|
||||
+ // for URLs). Right-to-left runs are still rendered RTL, but will not flip the whole URL
|
||||
+ // around. This is consistent with OmniboxViewViews on desktop. When focused, render text
|
||||
+ // normally (to allow users to make non-URL searches and to avoid showing Android's split
|
||||
+ // insertion point when an RTL user enters RTL text). Also render text normally when the
|
||||
+ // text field is empty (because then it displays an instruction that is not a URL).
|
||||
+ if (mFocused || length() == 0) {
|
||||
+ setTextDirection(TEXT_DIRECTION_INHERIT);
|
||||
+ } else {
|
||||
+ setTextDirection(TEXT_DIRECTION_LTR);
|
||||
+ }
|
||||
+ // Always align to the same as the paragraph direction (LTR = left, RTL = right).
|
||||
+ setTextAlignment(TEXT_ALIGNMENT_TEXT_START);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onWindowFocusChanged(boolean hasWindowFocus) {
|
||||
+ super.onWindowFocusChanged(hasWindowFocus);
|
||||
+ if (DEBUG) Log.i(TAG, "onWindowFocusChanged: " + hasWindowFocus);
|
||||
+ if (hasWindowFocus) {
|
||||
+ if (isFocused()) {
|
||||
+ // Without the call to post(..), the keyboard was not getting shown when the
|
||||
+ // window regained focus despite this being the final call in the view system
|
||||
+ // flow.
|
||||
+ post(new Runnable() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ KeyboardVisibilityDelegate.getInstance().showKeyboard(UrlBar.this);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public View focusSearch(int direction) {
|
||||
+ if (mUrlBarDelegate != null && direction == View.FOCUS_BACKWARD
|
||||
+ && mUrlBarDelegate.getViewForUrlBackFocus() != null) {
|
||||
+ return mUrlBarDelegate.getViewForUrlBackFocus();
|
||||
+ } else {
|
||||
+ return super.focusSearch(direction);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
|
||||
+ super.onTextChanged(text, start, lengthBefore, lengthAfter);
|
||||
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
+ // Due to crbug.com/1103555, Autofill had to be disabled on the UrlBar to work around
|
||||
+ // an issue on Android Q+. With Autofill disabled, the Autofill compat mode no longer
|
||||
+ // learns of changes to the UrlBar, which prevents it from cancelling the session if
|
||||
+ // the domain changes. We restore this behavior by mimicking the relevant part of
|
||||
+ // TextView.notifyListeningManagersAfterTextChanged().
|
||||
+ // https://cs.android.com/android/platform/superproject/+/5d123b67756dffcfdebdb936ab2de2b29c799321:frameworks/base/core/java/android/widget/TextView.java;l=10618;drc=master;bpv=0
|
||||
+ ApiHelperForO.notifyValueChangedForAutofill(this);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean onTouchEvent(MotionEvent event) {
|
||||
+ // This method contains special logic to enable long presses to be handled correctly.
|
||||
+
|
||||
+ // One piece of the logic is to suppress all ACTION_DOWN events received while the UrlBar is
|
||||
+ // not focused, and only pass them to super.onTouchEvent() if it turns out we're about to
|
||||
+ // perform a long press. Long pressing will not behave properly without sending this event,
|
||||
+ // but if we always send it immediately, it will cause the keyboard to show immediately,
|
||||
+ // whereas we want to wait to show it until after the URL focus animation finishes, to avoid
|
||||
+ // performance issues on slow devices.
|
||||
+
|
||||
+ // The other piece of the logic is to suppress ACTION_MOVE events received after an
|
||||
+ // ACTION_DOWN received while the UrlBar is not focused. This is because the UrlBar moves to
|
||||
+ // the side as it's focusing, and a finger held still on the screen would therefore be
|
||||
+ // interpreted as a drag selection.
|
||||
+
|
||||
+ if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||
+ getLocationInWindow(mCachedLocation);
|
||||
+ mDownEventViewTop = mCachedLocation[1];
|
||||
+ mSuppressingTouchMoveEventsForThisTouch = !mFocused;
|
||||
+ }
|
||||
+
|
||||
+ if (!mFocused) {
|
||||
+ if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
|
||||
+ mSuppressedTouchDownEvent = MotionEvent.obtain(event);
|
||||
+ }
|
||||
+ mGestureDetector.onTouchEvent(event);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (event.getActionMasked() == MotionEvent.ACTION_UP
|
||||
+ || event.getActionMasked() == MotionEvent.ACTION_CANCEL) {
|
||||
+ // Minor optimization to avoid unnecessarily holding onto a MotionEvent after the touch
|
||||
+ // finishes.
|
||||
+ mSuppressedTouchDownEvent = null;
|
||||
+ }
|
||||
+
|
||||
+ if (mSuppressingTouchMoveEventsForThisTouch
|
||||
+ && event.getActionMasked() == MotionEvent.ACTION_MOVE) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ try {
|
||||
+ return super.onTouchEvent(event);
|
||||
+ } catch (NullPointerException e) {
|
||||
+ // Working around a platform bug (b/25562038) that was fixed in N that can throw an
|
||||
+ // exception during text selection. We just swallow the exception. The outcome is that
|
||||
+ // the text selection handle doesn't show.
|
||||
+
|
||||
+ // If this happens on N or later, there's a different issue here that we might want to
|
||||
+ // know about.
|
||||
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) throw e;
|
||||
+
|
||||
+ Log.w(TAG, "Ignoring NPE in UrlBar#onTouchEvent.", e);
|
||||
+ return true;
|
||||
+ } catch (IndexOutOfBoundsException e) {
|
||||
+ // Work around crash of unknown origin (https://crbug.com/837419).
|
||||
+ Log.w(TAG, "Ignoring IndexOutOfBoundsException in UrlBar#onTouchEvent.", e);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean performLongClick() {
|
||||
+ if (!shouldPerformLongClick()) return false;
|
||||
+
|
||||
+ releaseSuppressedTouchDownEvent();
|
||||
+ return super.performLongClick();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return Whether or not a long click should be performed.
|
||||
+ */
|
||||
+ private boolean shouldPerformLongClick() {
|
||||
+ getLocationInWindow(mCachedLocation);
|
||||
+
|
||||
+ // If the view moved between the last down event, block the long-press.
|
||||
+ return mDownEventViewTop == mCachedLocation[1];
|
||||
+ }
|
||||
+
|
||||
+ private void releaseSuppressedTouchDownEvent() {
|
||||
+ if (mSuppressedTouchDownEvent != null) {
|
||||
+ super.onTouchEvent(mSuppressedTouchDownEvent);
|
||||
+ mSuppressedTouchDownEvent = null;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onDraw(Canvas canvas) {
|
||||
+ super.onDraw(canvas);
|
||||
+
|
||||
+ if (!mFirstDrawComplete) {
|
||||
+ mFirstDrawComplete = true;
|
||||
+
|
||||
+ // We have now avoided the first draw problem (see the comment in
|
||||
+ // the constructor) so we want to make the URL bar focusable so that
|
||||
+ // touches etc. activate it.
|
||||
+ setFocusable(mAllowFocus);
|
||||
+ setFocusableInTouchMode(mAllowFocus);
|
||||
+ }
|
||||
+
|
||||
+ // Notify listeners if the URL's direction has changed.
|
||||
+ updateUrlDirection();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * If the direction of the URL has changed, update mUrlDirection and notify the
|
||||
+ * UrlDirectionListeners.
|
||||
+ */
|
||||
+ private void updateUrlDirection() {
|
||||
+ Layout layout = getLayout();
|
||||
+ if (layout == null) return;
|
||||
+
|
||||
+ int urlDirection;
|
||||
+ if (length() == 0) {
|
||||
+ urlDirection = LAYOUT_DIRECTION_LOCALE;
|
||||
+ } else if (layout.getParagraphDirection(0) == Layout.DIR_LEFT_TO_RIGHT) {
|
||||
+ urlDirection = LAYOUT_DIRECTION_LTR;
|
||||
+ } else {
|
||||
+ urlDirection = LAYOUT_DIRECTION_RTL;
|
||||
+ }
|
||||
+
|
||||
+ if (urlDirection != mUrlDirection) {
|
||||
+ mUrlDirection = urlDirection;
|
||||
+ if (mUrlDirectionListener != null) {
|
||||
+ mUrlDirectionListener.onResult(urlDirection);
|
||||
+ }
|
||||
+
|
||||
+ // Ensure the display text is visible after updating the URL direction.
|
||||
+ scrollDisplayText();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return The text direction of the URL, e.g. LAYOUT_DIRECTION_LTR.
|
||||
+ */
|
||||
+ public int getUrlDirection() {
|
||||
+ return mUrlDirection;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the listener for changes in the url bar's layout direction. Also calls
|
||||
+ * onUrlDirectionChanged() immediately on the listener.
|
||||
+ *
|
||||
+ * @param listener The UrlDirectionListener to receive callbacks when the url direction changes,
|
||||
+ * or null to unregister any previously registered listener.
|
||||
+ */
|
||||
+ public void setUrlDirectionListener(Callback<Integer> listener) {
|
||||
+ mUrlDirectionListener = listener;
|
||||
+ if (mUrlDirectionListener != null) {
|
||||
+ mUrlDirectionListener.onResult(mUrlDirection);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Set the url delegate to handle communication from the {@link UrlBar} to the rest of the UI.
|
||||
+ * @param delegate The {@link UrlBarDelegate} to be used.
|
||||
+ */
|
||||
+ public void setDelegate(UrlBarDelegate delegate) {
|
||||
+ mUrlBarDelegate = delegate;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Set the listener to be notified when the URL text has changed.
|
||||
+ * @param listener The listener to be notified.
|
||||
+ */
|
||||
+ public void setUrlTextChangeListener(UrlTextChangeListener listener) {
|
||||
+ mUrlTextChangeListener = listener;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Set the listener to be notified when the view's text has changed.
|
||||
+ * @param textChangedListener The listener to be notified.
|
||||
+ */
|
||||
+ public void setTextChangedListener(TextWatcher textChangedListener) {
|
||||
+ if (ObjectsCompat.equals(mTextChangedListener, textChangedListener)) {
|
||||
+ return;
|
||||
+ } else if (mTextChangedListener != null) {
|
||||
+ removeTextChangedListener(mTextChangedListener);
|
||||
+ }
|
||||
+
|
||||
+ mTextChangedListener = textChangedListener;
|
||||
+ addTextChangedListener(mTextChangedListener);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Set the text to report to Autofill services upon call to onProvideAutofillStructure.
|
||||
+ */
|
||||
+ public void setTextForAutofillServices(CharSequence text) {
|
||||
+ mTextForAutofillServices = text;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean onTextContextMenuItem(int id) {
|
||||
+ if (mTextContextMenuDelegate == null) return super.onTextContextMenuItem(id);
|
||||
+
|
||||
+ if (id == android.R.id.paste) {
|
||||
+ String pasteString = mTextContextMenuDelegate.getTextToPaste();
|
||||
+ if (pasteString != null) {
|
||||
+ int min = 0;
|
||||
+ int max = getText().length();
|
||||
+
|
||||
+ if (isFocused()) {
|
||||
+ final int selStart = getSelectionStart();
|
||||
+ final int selEnd = getSelectionEnd();
|
||||
+
|
||||
+ min = Math.max(0, Math.min(selStart, selEnd));
|
||||
+ max = Math.max(0, Math.max(selStart, selEnd));
|
||||
+ }
|
||||
+
|
||||
+ Selection.setSelection(getText(), max);
|
||||
+ getText().replace(min, max, pasteString);
|
||||
+ onPaste();
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if ((id == android.R.id.cut || id == android.R.id.copy)) {
|
||||
+ if (id == android.R.id.cut) {
|
||||
+ RecordUserAction.record("Omnibox.LongPress.Cut");
|
||||
+ } else {
|
||||
+ RecordUserAction.record("Omnibox.LongPress.Copy");
|
||||
+ }
|
||||
+ String currentText = getText().toString();
|
||||
+ String replacementCutCopyText = mTextContextMenuDelegate.getReplacementCutCopyText(
|
||||
+ currentText, getSelectionStart(), getSelectionEnd());
|
||||
+ if (replacementCutCopyText == null) return super.onTextContextMenuItem(id);
|
||||
+
|
||||
+ setIgnoreTextChangesForAutocomplete(true);
|
||||
+ setText(replacementCutCopyText);
|
||||
+ setSelection(0, replacementCutCopyText.length());
|
||||
+ setIgnoreTextChangesForAutocomplete(false);
|
||||
+
|
||||
+ boolean retVal = super.onTextContextMenuItem(id);
|
||||
+
|
||||
+ if (TextUtils.equals(getText(), replacementCutCopyText)) {
|
||||
+ // Restore the old text if the operation did modify the text.
|
||||
+ setIgnoreTextChangesForAutocomplete(true);
|
||||
+ setText(currentText);
|
||||
+
|
||||
+ // Move the cursor to the end.
|
||||
+ setSelection(getText().length());
|
||||
+ setIgnoreTextChangesForAutocomplete(false);
|
||||
+ }
|
||||
+
|
||||
+ return retVal;
|
||||
+ }
|
||||
+
|
||||
+ if (id == android.R.id.shareText) {
|
||||
+ RecordUserAction.record("Omnibox.LongPress.Share");
|
||||
+ }
|
||||
+
|
||||
+ return super.onTextContextMenuItem(id);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Specified how text should be scrolled within the UrlBar.
|
||||
+ *
|
||||
+ * @param scrollType What type of scroll should be applied to the text.
|
||||
+ * @param scrollToIndex The index that should be scrolled to, which only applies to
|
||||
+ * {@link ScrollType#SCROLL_TO_TLD}.
|
||||
+ */
|
||||
+ public void setScrollState(@ScrollType int scrollType, int scrollToIndex) {
|
||||
+ if (scrollType == ScrollType.SCROLL_TO_TLD) {
|
||||
+ mOriginEndIndex = scrollToIndex;
|
||||
+ } else {
|
||||
+ mOriginEndIndex = 0;
|
||||
+ }
|
||||
+ mScrollType = scrollType;
|
||||
+ scrollDisplayText();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Scrolls the omnibox text to a position determined by the current scroll type.
|
||||
+ *
|
||||
+ * @see #setScrollState(int, int)
|
||||
+ */
|
||||
+ private void scrollDisplayText() {
|
||||
+ if (isLayoutRequested()) {
|
||||
+ mPendingScroll = mScrollType != ScrollType.NO_SCROLL;
|
||||
+ return;
|
||||
+ }
|
||||
+ scrollDisplayTextInternal(mScrollType);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Scrolls the omnibox text to the position specified, based on the {@link ScrollType}.
|
||||
+ *
|
||||
+ * @param scrollType What type of scroll to perform.
|
||||
+ * SCROLL_TO_TLD: Scrolls the omnibox text to bring the TLD into view.
|
||||
+ * SCROLL_TO_BEGINNING: Scrolls text that's too long to fit in the omnibox
|
||||
+ * to the beginning so we can see the first character.
|
||||
+ */
|
||||
+ private void scrollDisplayTextInternal(@ScrollType int scrollType) {
|
||||
+ mPendingScroll = false;
|
||||
+
|
||||
+ if (mFocused) return;
|
||||
+
|
||||
+ Editable text = getText();
|
||||
+ if (TextUtils.isEmpty(text)) scrollType = ScrollType.SCROLL_TO_BEGINNING;
|
||||
+
|
||||
+ // Ensure any selection from the focus state is cleared.
|
||||
+ setSelection(0);
|
||||
+
|
||||
+ float currentTextSize = getTextSize();
|
||||
+ boolean currentIsRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL;
|
||||
+
|
||||
+ int measuredWidth = getMeasuredWidth() - (getPaddingLeft() + getPaddingRight());
|
||||
+ if (scrollType == mPreviousScrollType && TextUtils.equals(text, mPreviousScrollText)
|
||||
+ && measuredWidth == mPreviousScrollViewWidth
|
||||
+ // Font size is float but it changes in discrete range (eg small font, big font),
|
||||
+ // therefore false negative using regular equality is unlikely.
|
||||
+ && currentTextSize == mPreviousScrollFontSize
|
||||
+ && currentIsRtl == mPreviousScrollWasRtl) {
|
||||
+ scrollTo(mPreviousScrollResultXPosition, getScrollY());
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ switch (scrollType) {
|
||||
+ case ScrollType.SCROLL_TO_TLD:
|
||||
+ scrollToTLD();
|
||||
+ break;
|
||||
+ case ScrollType.SCROLL_TO_BEGINNING:
|
||||
+ scrollToBeginning();
|
||||
+ break;
|
||||
+ default:
|
||||
+ // Intentional return to avoid clearing scroll state when no scroll was applied.
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ mPreviousScrollType = scrollType;
|
||||
+ mPreviousScrollText = text.toString();
|
||||
+ mPreviousScrollViewWidth = measuredWidth;
|
||||
+ mPreviousScrollFontSize = currentTextSize;
|
||||
+ mPreviousScrollResultXPosition = getScrollX();
|
||||
+ mPreviousScrollWasRtl = currentIsRtl;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Scrolls the omnibox text to show the very beginning of the text entered.
|
||||
+ */
|
||||
+ private void scrollToBeginning() {
|
||||
+ Editable text = getText();
|
||||
+ float scrollPos = 0f;
|
||||
+ if (TextUtils.isEmpty(text)) {
|
||||
+ if (getLayoutDirection() == LAYOUT_DIRECTION_RTL
|
||||
+ && BidiFormatter.getInstance().isRtl(getHint())) {
|
||||
+ // Compared to below that uses getPrimaryHorizontal(1) due to 0 returning an
|
||||
+ // invalid value, if the text is empty, getPrimaryHorizontal(0) returns the actual
|
||||
+ // max scroll amount.
|
||||
+ scrollPos = (int) getLayout().getPrimaryHorizontal(0) - getMeasuredWidth();
|
||||
+ }
|
||||
+ } else if (BidiFormatter.getInstance().isRtl(text)) {
|
||||
+ // RTL.
|
||||
+ float endPointX = getLayout().getPrimaryHorizontal(text.length());
|
||||
+ int measuredWidth = getMeasuredWidth();
|
||||
+ float width = getLayout().getPaint().measureText(text.toString());
|
||||
+ scrollPos = Math.max(0, endPointX - measuredWidth + width);
|
||||
+ }
|
||||
+ scrollTo((int) scrollPos, getScrollY());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Scrolls the omnibox text to bring the TLD into view.
|
||||
+ */
|
||||
+ private void scrollToTLD() {
|
||||
+ Editable url = getText();
|
||||
+ int measuredWidth = getMeasuredWidth() - (getPaddingLeft() + getPaddingRight());
|
||||
+
|
||||
+ Layout textLayout = getLayout();
|
||||
+ assert getLayout().getLineCount() == 1;
|
||||
+ final int originEndIndex = Math.min(mOriginEndIndex, url.length());
|
||||
+ if (mOriginEndIndex > url.length()) {
|
||||
+ // If discovered locally, please update crbug.com/859219 with the steps to reproduce.
|
||||
+ assert false : "Attempting to scroll past the end of the URL: " + url + ", end index: "
|
||||
+ + mOriginEndIndex;
|
||||
+ }
|
||||
+ float endPointX = textLayout.getPrimaryHorizontal(originEndIndex);
|
||||
+ // Compare the position offset of the last character and the character prior to determine
|
||||
+ // the LTR-ness of the final component of the URL.
|
||||
+ float priorToEndPointX = url.length() == 1
|
||||
+ ? 0
|
||||
+ : textLayout.getPrimaryHorizontal(Math.max(0, originEndIndex - 1));
|
||||
+
|
||||
+ float scrollPos;
|
||||
+ if (priorToEndPointX < endPointX) {
|
||||
+ // LTR
|
||||
+ scrollPos = Math.max(0, endPointX - measuredWidth);
|
||||
+ } else {
|
||||
+ // RTL
|
||||
+
|
||||
+ // To handle BiDirectional text, search backward from the two existing offsets to find
|
||||
+ // the first LTR character. Ensure the final RTL component of the domain is visible
|
||||
+ // above any of the prior LTR pieces.
|
||||
+ int rtlStartIndexForEndingRun = originEndIndex - 1;
|
||||
+ for (int i = originEndIndex - 2; i >= 0; i--) {
|
||||
+ float indexOffsetDrawPosition = textLayout.getPrimaryHorizontal(i);
|
||||
+ if (indexOffsetDrawPosition > endPointX) {
|
||||
+ rtlStartIndexForEndingRun = i;
|
||||
+ } else {
|
||||
+ // getPrimaryHorizontal determines the index position for the next character
|
||||
+ // based on the previous characters. In bi-directional text, the first RTL
|
||||
+ // character following LTR text will have an LTR-appearing horizontal offset
|
||||
+ // as it is based on the preceding LTR text. Thus, the start of the RTL
|
||||
+ // character run will be after and including the first LTR horizontal index.
|
||||
+ rtlStartIndexForEndingRun = Math.max(0, rtlStartIndexForEndingRun - 1);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ float width = textLayout.getPaint().measureText(
|
||||
+ url.subSequence(rtlStartIndexForEndingRun, originEndIndex).toString());
|
||||
+ if (width < measuredWidth) {
|
||||
+ scrollPos = Math.max(0, endPointX + width - measuredWidth);
|
||||
+ } else {
|
||||
+ scrollPos = endPointX + measuredWidth;
|
||||
+ }
|
||||
+ }
|
||||
+ scrollTo((int) scrollPos, getScrollY());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
+ super.onLayout(changed, left, top, right, bottom);
|
||||
+
|
||||
+ if (mPendingScroll) {
|
||||
+ scrollDisplayTextInternal(mScrollType);
|
||||
+ } else if (mPreviousWidth != (right - left)) {
|
||||
+ scrollDisplayTextInternal(mScrollType);
|
||||
+ mPreviousWidth = right - left;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean bringPointIntoView(int offset) {
|
||||
+ // TextView internally attempts to keep the selection visible, but in the unfocused state
|
||||
+ // this class ensures that the TLD is visible.
|
||||
+ if (!mFocused) return false;
|
||||
+ assert !mPendingScroll;
|
||||
+
|
||||
+ return super.bringPointIntoView(offset);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
|
||||
+ InputConnection connection = super.onCreateInputConnection(outAttrs);
|
||||
+ if (mUrlBarDelegate == null || !mUrlBarDelegate.allowKeyboardLearning()) {
|
||||
+ outAttrs.imeOptions |= EditorInfoCompat.IME_FLAG_NO_PERSONALIZED_LEARNING;
|
||||
+ }
|
||||
+ return connection;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setText(CharSequence text, BufferType type) {
|
||||
+ if (DEBUG) Log.i(TAG, "setText -- text: %s", text);
|
||||
+ super.setText(text, type);
|
||||
+ fixupTextDirection();
|
||||
+ }
|
||||
+
|
||||
+ private void limitDisplayableLength() {
|
||||
+ // To limit displayable length we replace middle portion of the string with ellipsis.
|
||||
+ // That affects only presentation of the text, and doesn't affect other aspects like
|
||||
+ // copying to the clipboard, getting text with getText(), etc.
|
||||
+ final int maxLength =
|
||||
+ SysUtils.isLowEndDevice() ? MAX_DISPLAYABLE_LENGTH_LOW_END : MAX_DISPLAYABLE_LENGTH;
|
||||
+
|
||||
+ Editable text = getText();
|
||||
+ int textLength = text.length();
|
||||
+ if (textLength <= maxLength) {
|
||||
+ if (mDidEllipsizeTextHint) {
|
||||
+ EllipsisSpan[] spans = text.getSpans(0, textLength, EllipsisSpan.class);
|
||||
+ if (spans != null && spans.length > 0) {
|
||||
+ assert spans.length == 1 : "Should never apply more than a single EllipsisSpan";
|
||||
+ for (int i = 0; i < spans.length; i++) {
|
||||
+ text.removeSpan(spans[i]);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ mDidEllipsizeTextHint = false;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ mDidEllipsizeTextHint = true;
|
||||
+
|
||||
+ int spanLeft = text.nextSpanTransition(0, textLength, EllipsisSpan.class);
|
||||
+ if (spanLeft != textLength) return;
|
||||
+
|
||||
+ spanLeft = maxLength / 2;
|
||||
+ text.setSpan(EllipsisSpan.INSTANCE, spanLeft, textLength - spanLeft,
|
||||
+ Editable.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Editable getText() {
|
||||
+ if (mRequestingAutofillStructure) {
|
||||
+ // crbug.com/1109186: mTextForAutofillServices must not be null here, but Autofill
|
||||
+ // requests can be triggered before it is initialized.
|
||||
+ return new SpannableStringBuilder(
|
||||
+ mTextForAutofillServices != null ? mTextForAutofillServices : "");
|
||||
+ }
|
||||
+ return super.getText();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public CharSequence getAccessibilityClassName() {
|
||||
+ // When UrlBar is used as a read-only TextView, force Talkback to pronounce it like
|
||||
+ // TextView. Otherwise Talkback will say "Edit box, http://...". crbug.com/636988
|
||||
+ if (isEnabled()) {
|
||||
+ return super.getAccessibilityClassName();
|
||||
+ } else {
|
||||
+ return TextView.class.getName();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void replaceAllTextFromAutocomplete(String text) {
|
||||
+ if (DEBUG) Log.i(TAG, "replaceAllTextFromAutocomplete: " + text);
|
||||
+ setText(text);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onAutocompleteTextStateChanged(boolean updateDisplay) {
|
||||
+ if (DEBUG) {
|
||||
+ Log.i(TAG, "onAutocompleteTextStateChanged: DIS[%b]", updateDisplay);
|
||||
+ }
|
||||
+ if (mUrlTextChangeListener == null) return;
|
||||
+ if (updateDisplay) limitDisplayableLength();
|
||||
+ // crbug.com/764749
|
||||
+ Log.w(TAG, "Text change observed, triggering autocomplete.");
|
||||
+
|
||||
+ mUrlTextChangeListener.onTextChanged(
|
||||
+ getTextWithoutAutocomplete(), getTextWithAutocomplete());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Span that displays ellipsis instead of the text. Used to hide portion of
|
||||
+ * very large string to get decent performance from TextView.
|
||||
+ */
|
||||
+ private static class EllipsisSpan extends ReplacementSpan {
|
||||
+ private static final String ELLIPSIS = "...";
|
||||
+
|
||||
+ public static final EllipsisSpan INSTANCE = new EllipsisSpan();
|
||||
+
|
||||
+ @Override
|
||||
+ public int getSize(
|
||||
+ Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) {
|
||||
+ return (int) paint.measureText(ELLIPSIS);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void draw(Canvas canvas, CharSequence text, int start, int end, float x, int top,
|
||||
+ int y, int bottom, Paint paint) {
|
||||
+ canvas.drawText(ELLIPSIS, x, y, paint);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
+++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
||||
@@ -207,8 +207,7 @@ public abstract class UrlBar extends AutocompleteEditText {
|
||||
// the first draw.
|
||||
setFocusable(false);
|
||||
setFocusableInTouchMode(false);
|
||||
- setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI
|
||||
- | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
||||
+ setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI);
|
||||
|
||||
// The HTC Sense IME will attempt to autocomplete words in the Omnibox when Prediction is
|
||||
// enabled. We want to disable this feature and rely on the Omnibox's implementation.
|
||||
--
|
||||
2.25.1
|
||||
@@ -10,8 +10,8 @@ Subject: Disable AGSA by default
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -636,7 +636,7 @@ const base::Feature kDynamicColorButtonsAndroid{
|
||||
"DynamicColorButtonsAndroid", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
@@ -605,7 +605,7 @@ const base::Feature kEnhancedProtectionPromoCard{
|
||||
"EnhancedProtectionPromoCard", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kExperimentsForAgsa{"ExperimentsForAgsa",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
@@ -22,14 +22,15 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
|
||||
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
@@ -90,7 +90,7 @@ public class CachedFeatureFlags {
|
||||
.put(ChromeFeatureList.READ_LATER, false)
|
||||
@@ -86,7 +86,7 @@ public class CachedFeatureFlags {
|
||||
.put(ChromeFeatureList.CCT_REMOVE_REMOTE_VIEW_IDS, true)
|
||||
.put(ChromeFeatureList.OFFLINE_MEASUREMENTS_BACKGROUND_TASK, false)
|
||||
.put(ChromeFeatureList.CCT_INCOGNITO, true)
|
||||
- .put(ChromeFeatureList.EXPERIMENTS_FOR_AGSA, true)
|
||||
+ .put(ChromeFeatureList.EXPERIMENTS_FOR_AGSA, false)
|
||||
.put(ChromeFeatureList.APP_MENU_MOBILE_SITE_OPTION, false)
|
||||
.put(ChromeFeatureList.CLIPBOARD_SUGGESTION_CONTENT_HIDDEN, false)
|
||||
.put(ChromeFeatureList.OPTIMIZATION_GUIDE_PUSH_NOTIFICATIONS, false)
|
||||
.put(ChromeFeatureList.NEW_WINDOW_APP_MENU, true)
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Mon, 8 Nov 2021 09:47:23 +0000
|
||||
Subject: Disable Accessibility service by default
|
||||
|
||||
---
|
||||
.../browser/ui/android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
.../android/java/res/xml/accessibility_preferences.xml | 5 +++++
|
||||
.../browser_ui/accessibility/AccessibilitySettings.java | 3 +++
|
||||
.../browser/accessibility/WebContentsAccessibilityImpl.java | 5 +++++
|
||||
4 files changed, 19 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -1420,6 +1420,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_SAFETY_CHECK_BUTTON" desc="Text for the button to start Safety check.">
|
||||
Check now
|
||||
</message>
|
||||
+ <message name="IDS_ENABLE_ACCESSIBILITY_TITLE" desc="Title of enable accessibility settings, which allows the user to enable service. [CHAR_LIMIT=32]">
|
||||
+ Enable Accessibility Service
|
||||
+ </message>
|
||||
+ <message name="IDS_ENABLE_ACCESSIBILITY_SUMMARY" desc="Summary of enable accessibility settings.">
|
||||
+ Activates or deactivates the communication of all user activities in ui to the Accessibility provider
|
||||
+ </message>
|
||||
<message name="IDS_SAFETY_CHECK_ERROR" desc="A generic error state.">
|
||||
An error occurred.
|
||||
</message>
|
||||
diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
|
||||
--- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
|
||||
+++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
|
||||
@@ -5,6 +5,11 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
+ android:key="enable_accessibility"
|
||||
+ android:summary="@string/enable_accessibility_summary"
|
||||
+ android:title="@string/enable_accessibility_title" />
|
||||
+
|
||||
<org.chromium.components.browser_ui.accessibility.TextScalePreference
|
||||
android:key="text_scale"
|
||||
android:title="@string/font_size"
|
||||
diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
|
||||
--- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
|
||||
+++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
|
||||
@@ -17,6 +17,9 @@ import org.chromium.components.browser_ui.accessibility.FontSizePrefs.FontSizePr
|
||||
import org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference;
|
||||
import org.chromium.components.browser_ui.settings.SettingsUtils;
|
||||
|
||||
+import org.chromium.chrome.browser.preferences.ChromePreferenceKeys;
|
||||
+import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
|
||||
+
|
||||
/**
|
||||
* Fragment to keep track of all the accessibility related preferences.
|
||||
*/
|
||||
diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
|
||||
--- a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
|
||||
+++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
|
||||
@@ -940,6 +940,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa
|
||||
structure.setChildCount(0);
|
||||
return;
|
||||
}
|
||||
+ // Do not collect accessibility tree if disabled
|
||||
+ if (!ContextUtils.getAppSharedPreferences().getBoolean("enable_accessibility", false)) {
|
||||
+ structure.setChildCount(0);
|
||||
+ return;
|
||||
+ }
|
||||
structure.setChildCount(1);
|
||||
final ViewStructure viewRoot = structure.asyncNewChild(0);
|
||||
viewRoot.setClassName("");
|
||||
--
|
||||
2.25.1
|
||||
@@ -1,30 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 26 Mar 2022 16:41:55 +0100
|
||||
Subject: Disable AsyncDNS by default
|
||||
|
||||
This feature is detrimental to privacy, see also:
|
||||
* https://bugs.chromium.org/p/chromium/issues/detail?id=805020
|
||||
---
|
||||
chrome/common/chrome_features.cc | 8 ++------
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -95,12 +95,8 @@ const base::Feature kArcPiGhostWindow{"ArcPiGhostWindow",
|
||||
|
||||
// Enables the built-in DNS resolver.
|
||||
const base::Feature kAsyncDns {
|
||||
- "AsyncDns",
|
||||
-#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID)
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
-#else
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT
|
||||
-#endif
|
||||
+ "AsyncDns", // Bromite guard for this feature to be always disabled
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT // ^
|
||||
};
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
||||
--
|
||||
2.25.1
|
||||
@@ -9,7 +9,7 @@ Subject: Disable DRM media origin IDs preprovisioning
|
||||
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
||||
--- a/media/base/media_switches.cc
|
||||
+++ b/media/base/media_switches.cc
|
||||
@@ -703,7 +703,7 @@ const base::Feature kMediaDrmPersistentLicense{
|
||||
@@ -660,7 +660,7 @@ const base::Feature kMediaDrmPersistentLicense{
|
||||
// MediaDrmBridge. If disabled, MediaDrmBridge will get unprovisioned origin IDs
|
||||
// which will trigger provisioning process after MediaDrmBridge is created.
|
||||
const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
|
||||
@@ -18,5 +18,6 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
||||
|
||||
// Determines if MediaDrmOriginIdManager should attempt to pre-provision origin
|
||||
// IDs at startup (whenever a profile is loaded). Also used by tests that
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,290 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Sat, 13 Nov 2021 09:17:06 +0000
|
||||
Subject: Disable FLoC and privacy sandbox
|
||||
|
||||
Remove UI from the settings and set the flags to inactive
|
||||
Permanently removes FLoC support, disabling the download of LSH clusters,
|
||||
the marking the history navigation and the javascript API and permission policies.
|
||||
Also added the disabling of blink features through the DisabledForBromite tag
|
||||
---
|
||||
.../java/res/xml/privacy_preferences.xml | 4 ---
|
||||
.../privacy/settings/PrivacySettings.java | 22 ------------
|
||||
.../browser/chrome_content_browser_client.cc | 3 ++
|
||||
.../privacy_sandbox/generated_floc_pref.cc | 2 +-
|
||||
.../history/core/browser/history_backend.cc | 13 +------
|
||||
.../history/core/browser/history_service.cc | 2 +-
|
||||
.../privacy_sandbox/privacy_sandbox_prefs.cc | 4 +--
|
||||
.../privacy_sandbox_settings.cc | 36 +++++++++++--------
|
||||
.../privacy_sandbox_settings.h | 1 -
|
||||
9 files changed, 29 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -65,10 +65,6 @@
|
||||
android:title="@string/open_external_links_incognito_title"
|
||||
android:summary="@string/open_external_links_incognito_summary"
|
||||
android:defaultValue="false" />
|
||||
- <Preference
|
||||
- android:key="privacy_sandbox"
|
||||
- android:title="@string/prefs_privacy_sandbox"
|
||||
- android:fragment="org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment"/>
|
||||
<PreferenceCategory
|
||||
android:key="services_category"
|
||||
android:title="@string/services_category_title">
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
@@ -62,7 +62,6 @@ public class PrivacySettings
|
||||
private static final String PREF_SECURE_DNS = "secure_dns";
|
||||
private static final String PREF_DO_NOT_TRACK = "do_not_track";
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
- private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
|
||||
private static final String PREF_PROXY_OPTIONS = "proxy";
|
||||
private static final String PREF_PRIVACY_REVIEW = "privacy_review";
|
||||
private static final String PREF_INCOGNITO_LOCK = "incognito_lock";
|
||||
@@ -93,21 +92,6 @@ public class PrivacySettings
|
||||
SettingsUtils.addPreferencesFromResource(this, R.xml.privacy_preferences);
|
||||
getActivity().setTitle(R.string.prefs_privacy_security);
|
||||
|
||||
- Preference sandboxPreference = findPreference(PREF_PRIVACY_SANDBOX);
|
||||
- // Hide the Privacy Sandbox if it is restricted.
|
||||
- if (PrivacySandboxBridge.isPrivacySandboxRestricted()) {
|
||||
- getPreferenceScreen().removePreference(sandboxPreference);
|
||||
- } else {
|
||||
- sandboxPreference.setSummary(
|
||||
- PrivacySandboxSettingsFragment.getStatusString(getContext()));
|
||||
- // Overwrite the click listener to pass a correct referrer to the fragment.
|
||||
- sandboxPreference.setOnPreferenceClickListener(preference -> {
|
||||
- PrivacySandboxSettingsFragmentV3.launchPrivacySandboxSettings(getContext(),
|
||||
- new SettingsLauncherImpl(), PrivacySandboxReferrer.PRIVACY_SETTINGS);
|
||||
- return true;
|
||||
- });
|
||||
- }
|
||||
-
|
||||
Preference privacyReviewPreference = findPreference(PREF_PRIVACY_REVIEW);
|
||||
if (!ChromeFeatureList.isEnabled(ChromeFeatureList.PRIVACY_REVIEW)) {
|
||||
getPreferenceScreen().removePreference(privacyReviewPreference);
|
||||
@@ -239,12 +223,6 @@ public class PrivacySettings
|
||||
secureDnsPref.setSummary(SecureDnsSettings.getSummary(getContext()));
|
||||
}
|
||||
|
||||
- Preference privacySandboxPreference = findPreference(PREF_PRIVACY_SANDBOX);
|
||||
- if (privacySandboxPreference != null) {
|
||||
- privacySandboxPreference.setSummary(
|
||||
- PrivacySandboxSettingsFragment.getStatusString(getContext()));
|
||||
- }
|
||||
-
|
||||
mIncognitoLockSettings.updateIncognitoReauthPreferenceIfNeeded(getActivity());
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -2824,6 +2824,9 @@ bool ChromeContentBrowserClient::IsConversionMeasurementOperationAllowed(
|
||||
const url::Origin* impression_origin,
|
||||
const url::Origin* conversion_origin,
|
||||
const url::Origin* reporting_origin) {
|
||||
+ // make sure that this is always disabled in Bromite even if privacy sandbox is already disabled in the prefs
|
||||
+ if ((true))
|
||||
+ return false;
|
||||
Profile* profile = Profile::FromBrowserContext(browser_context);
|
||||
|
||||
auto* privacy_sandbox_settings =
|
||||
diff --git a/chrome/browser/privacy_sandbox/generated_floc_pref.cc b/chrome/browser/privacy_sandbox/generated_floc_pref.cc
|
||||
--- a/chrome/browser/privacy_sandbox/generated_floc_pref.cc
|
||||
+++ b/chrome/browser/privacy_sandbox/generated_floc_pref.cc
|
||||
@@ -35,7 +35,7 @@ extensions::settings_private::SetPrefResult GeneratedFlocPref::SetPref(
|
||||
return extensions::settings_private::SetPrefResult::PREF_NOT_MODIFIABLE;
|
||||
|
||||
profile_->GetPrefs()->SetBoolean(prefs::kPrivacySandboxFlocEnabled,
|
||||
- value->GetBool());
|
||||
+ false);
|
||||
|
||||
return extensions::settings_private::SetPrefResult::SUCCESS;
|
||||
}
|
||||
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
|
||||
--- a/components/history/core/browser/history_backend.cc
|
||||
+++ b/components/history/core/browser/history_backend.cc
|
||||
@@ -497,18 +497,7 @@ void HistoryBackend::SetBrowsingTopicsAllowed(ContextID context_id,
|
||||
if (!visit_id)
|
||||
return;
|
||||
|
||||
- // Only add to the annotations table if the visit_id exists in the visits
|
||||
- // table.
|
||||
- VisitContentAnnotations annotations;
|
||||
- if (db_->GetContentAnnotationsForVisit(visit_id, &annotations)) {
|
||||
- annotations.annotation_flags |=
|
||||
- VisitContentAnnotationFlag::kBrowsingTopicsEligible;
|
||||
- db_->UpdateContentAnnotationsForVisit(visit_id, annotations);
|
||||
- } else {
|
||||
- annotations.annotation_flags |=
|
||||
- VisitContentAnnotationFlag::kBrowsingTopicsEligible;
|
||||
- db_->AddContentAnnotationsForVisit(visit_id, annotations);
|
||||
- }
|
||||
+ // in Bromite disallow marking anything in history related to topics
|
||||
ScheduleCommit();
|
||||
}
|
||||
|
||||
diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
|
||||
--- a/components/history/core/browser/history_service.cc
|
||||
+++ b/components/history/core/browser/history_service.cc
|
||||
@@ -394,7 +394,7 @@ void HistoryService::AddPage(const GURL& url,
|
||||
AddPage(HistoryAddPageArgs(
|
||||
url, time, context_id, nav_entry_id, referrer, redirects, transition,
|
||||
!ui::PageTransitionIsMainFrame(transition), visit_source,
|
||||
- did_replace_entry, /*consider_for_ntp_most_visited=*/true, floc_allowed));
|
||||
+ did_replace_entry, /*consider_for_ntp_most_visited=*/true, /*floc_allowed*/false));
|
||||
}
|
||||
|
||||
void HistoryService::AddPage(const GURL& url,
|
||||
diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc
|
||||
--- a/components/privacy_sandbox/privacy_sandbox_prefs.cc
|
||||
+++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc
|
||||
@@ -71,7 +71,7 @@ namespace privacy_sandbox {
|
||||
|
||||
void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
- prefs::kPrivacySandboxApisEnabled, true,
|
||||
+ prefs::kPrivacySandboxApisEnabled, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2, false);
|
||||
registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2Init, false);
|
||||
@@ -88,7 +88,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
||||
registry->RegisterTimePref(prefs::kPrivacySandboxTopicsDataAccessibleSince,
|
||||
base::Time());
|
||||
registry->RegisterBooleanPref(
|
||||
- prefs::kPrivacySandboxFlocEnabled, true,
|
||||
+ prefs::kPrivacySandboxFlocEnabled, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterListPref(prefs::kPrivacySandboxBlockedTopics);
|
||||
registry->RegisterDictionaryPref(prefs::kPrivacySandboxFledgeJoinBlocked);
|
||||
diff --git a/components/privacy_sandbox/privacy_sandbox_settings.cc b/components/privacy_sandbox/privacy_sandbox_settings.cc
|
||||
--- a/components/privacy_sandbox/privacy_sandbox_settings.cc
|
||||
+++ b/components/privacy_sandbox/privacy_sandbox_settings.cc
|
||||
@@ -67,8 +67,7 @@ PrivacySandboxSettings::PrivacySandboxSettings(
|
||||
: delegate_(std::move(delegate)),
|
||||
host_content_settings_map_(host_content_settings_map),
|
||||
cookie_settings_(cookie_settings),
|
||||
- pref_service_(pref_service),
|
||||
- incognito_profile_(incognito_profile) {
|
||||
+ pref_service_(pref_service) {
|
||||
DCHECK(pref_service_);
|
||||
DCHECK(host_content_settings_map_);
|
||||
DCHECK(cookie_settings_);
|
||||
@@ -88,7 +87,8 @@ PrivacySandboxSettings::PrivacySandboxSettings(
|
||||
|
||||
PrivacySandboxSettings::~PrivacySandboxSettings() = default;
|
||||
|
||||
-bool PrivacySandboxSettings::IsTopicsAllowed() const {
|
||||
+bool PrivacySandboxSettings::IsTopicsAllowed() const { // disabled in Bromite
|
||||
+ if ((true)) return false;
|
||||
// Topics API calculation should be prevented if the user has blocked 3PC
|
||||
// cookies, as there will be no context specific check.
|
||||
const auto cookie_controls_mode =
|
||||
@@ -119,7 +119,8 @@ bool PrivacySandboxSettings::IsTopicsAllowedForContext(
|
||||
cookie_settings);
|
||||
}
|
||||
|
||||
-bool PrivacySandboxSettings::IsTopicAllowed(const CanonicalTopic& topic) {
|
||||
+bool PrivacySandboxSettings::IsTopicAllowed(const CanonicalTopic& topic) { // disabled in Bromite
|
||||
+ if ((true)) return false;
|
||||
auto* blocked_topics =
|
||||
pref_service_->GetList(prefs::kPrivacySandboxBlockedTopics);
|
||||
|
||||
@@ -187,7 +188,8 @@ base::Time PrivacySandboxSettings::TopicsDataAccessibleSince() const {
|
||||
|
||||
bool PrivacySandboxSettings::IsConversionMeasurementAllowed(
|
||||
const url::Origin& top_frame_origin,
|
||||
- const url::Origin& reporting_origin) const {
|
||||
+ const url::Origin& reporting_origin) const { // disabled in Bromite
|
||||
+ if ((true)) return false;
|
||||
ContentSettingsForOneType cookie_settings;
|
||||
cookie_settings_->GetCookieSettings(&cookie_settings);
|
||||
|
||||
@@ -291,7 +293,8 @@ void PrivacySandboxSettings::ClearFledgeJoiningAllowedSettings(
|
||||
}
|
||||
|
||||
bool PrivacySandboxSettings::IsFledgeJoiningAllowed(
|
||||
- const url::Origin& top_frame_origin) const {
|
||||
+ const url::Origin& top_frame_origin) const { // disabled in Bromite
|
||||
+ if ((true)) return false;
|
||||
DictionaryPrefUpdate scoped_pref_update(
|
||||
pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked);
|
||||
auto* pref_data = scoped_pref_update.Get();
|
||||
@@ -338,7 +341,8 @@ std::vector<GURL> PrivacySandboxSettings::FilterFledgeAllowedParties(
|
||||
return allowed_parties;
|
||||
}
|
||||
|
||||
-bool PrivacySandboxSettings::IsPrivacySandboxEnabled() const {
|
||||
+bool PrivacySandboxSettings::IsPrivacySandboxEnabled() const { // disabled in Bromite
|
||||
+ if ((true)) return false;
|
||||
// If the delegate is restricting access, or indicates confirmation has not
|
||||
// occurred, the Privacy Sandbox is disabled.
|
||||
if (delegate_->IsPrivacySandboxRestricted() ||
|
||||
@@ -356,7 +360,7 @@ bool PrivacySandboxSettings::IsPrivacySandboxEnabled() const {
|
||||
// settings is available.
|
||||
if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3)) {
|
||||
// For Privacy Sandbox Settings 3, APIs are disabled in incognito.
|
||||
- if (incognito_profile_)
|
||||
+ if ((true))
|
||||
return false;
|
||||
|
||||
if (should_override_setting_for_local_testing) {
|
||||
@@ -374,7 +378,8 @@ bool PrivacySandboxSettings::IsPrivacySandboxEnabled() const {
|
||||
return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabled);
|
||||
}
|
||||
|
||||
-void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) {
|
||||
+void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) { // disabled in Bromite
|
||||
+ enabled = false;
|
||||
// Only apply the decision to the appropriate preference.
|
||||
if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3)) {
|
||||
pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, enabled);
|
||||
@@ -383,7 +388,8 @@ void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) {
|
||||
}
|
||||
}
|
||||
|
||||
-bool PrivacySandboxSettings::IsTrustTokensAllowed() {
|
||||
+bool PrivacySandboxSettings::IsTrustTokensAllowed() { // disabled in Bromite
|
||||
+ if ((true)) return false;
|
||||
// The PrivacySandboxSettings is only involved in Trust Token access
|
||||
// decisions when the Release 3 flag is enabled.
|
||||
if (!base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3))
|
||||
@@ -428,8 +434,8 @@ PrivacySandboxSettings::PrivacySandboxSettings() = default;
|
||||
bool PrivacySandboxSettings::IsPrivacySandboxEnabledForContext(
|
||||
const GURL& url,
|
||||
const absl::optional<url::Origin>& top_frame_origin,
|
||||
- const ContentSettingsForOneType& cookie_settings) const {
|
||||
- if (!IsPrivacySandboxEnabled())
|
||||
+ const ContentSettingsForOneType& cookie_settings) const { // always disable this in Bromite
|
||||
+ if ((true))
|
||||
return false;
|
||||
|
||||
// Third party cookies must also be available for this context. An empty site
|
||||
@@ -438,9 +444,9 @@ bool PrivacySandboxSettings::IsPrivacySandboxEnabledForContext(
|
||||
top_frame_origin);
|
||||
}
|
||||
|
||||
-void PrivacySandboxSettings::SetTopicsDataAccessibleFromNow() const {
|
||||
- pref_service_->SetTime(prefs::kPrivacySandboxTopicsDataAccessibleSince,
|
||||
- base::Time::Now());
|
||||
+void PrivacySandboxSettings::SetTopicsDataAccessibleFromNow() const { // disabled in Bromite
|
||||
+ pref_service_->ClearPref(prefs::kPrivacySandboxTopicsDataAccessibleSince);
|
||||
+ if ((true)) return;
|
||||
|
||||
for (auto& observer : observers_)
|
||||
observer.OnTopicsDataAccessibleSinceUpdated();
|
||||
diff --git a/components/privacy_sandbox/privacy_sandbox_settings.h b/components/privacy_sandbox/privacy_sandbox_settings.h
|
||||
--- a/components/privacy_sandbox/privacy_sandbox_settings.h
|
||||
+++ b/components/privacy_sandbox/privacy_sandbox_settings.h
|
||||
@@ -217,7 +217,6 @@ class PrivacySandboxSettings : public KeyedService {
|
||||
scoped_refptr<content_settings::CookieSettings> cookie_settings_;
|
||||
raw_ptr<PrefService> pref_service_;
|
||||
PrefChangeRegistrar pref_change_registrar_;
|
||||
- bool incognito_profile_;
|
||||
};
|
||||
|
||||
} // namespace privacy_sandbox
|
||||
--
|
||||
2.25.1
|
||||
@@ -0,0 +1,54 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 27 Oct 2019 10:21:19 +0100
|
||||
Subject: Disable HEAD requests for single-word Omnibar searches
|
||||
|
||||
Patch from https://github.com/Eloston/ungoogled-chromium/issues/814#issuecomment-526873727
|
||||
---
|
||||
.../ui/omnibox/chrome_omnibox_navigation_observer.cc | 8 ++++----
|
||||
.../ui/omnibox/chrome_omnibox_navigation_observer.h | 2 +-
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
|
||||
--- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
|
||||
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
|
||||
@@ -86,8 +86,8 @@ ChromeOmniboxNavigationObserver::ChromeOmniboxNavigationObserver(
|
||||
shortcuts_backend_(ShortcutsBackendFactory::GetForProfile(profile)),
|
||||
load_state_(LOAD_NOT_SEEN),
|
||||
fetch_state_(FETCH_NOT_COMPLETE) {
|
||||
- if (alternate_nav_match_.destination_url.is_valid())
|
||||
- CreateLoader(alternate_nav_match_.destination_url);
|
||||
+// if (alternate_nav_match_.destination_url.is_valid())
|
||||
+// CreateLoader(alternate_nav_match_.destination_url);
|
||||
|
||||
// We need to start by listening to AllSources, since we don't know which tab
|
||||
// the navigation might occur in.
|
||||
@@ -291,7 +291,7 @@ void ChromeOmniboxNavigationObserver::OnAllLoadingFinished() {
|
||||
delete this;
|
||||
}
|
||||
|
||||
-void ChromeOmniboxNavigationObserver::CreateLoader(
|
||||
+/*void ChromeOmniboxNavigationObserver::CreateLoader(
|
||||
const GURL& destination_url) {
|
||||
net::NetworkTrafficAnnotationTag traffic_annotation =
|
||||
net::DefineNetworkTrafficAnnotation("omnibox_navigation_observer", R"(
|
||||
@@ -336,4 +336,4 @@ void ChromeOmniboxNavigationObserver::CreateLoader(
|
||||
loader_->SetAllowHttpErrorResults(true);
|
||||
loader_->SetOnRedirectCallback(base::BindRepeating(
|
||||
&ChromeOmniboxNavigationObserver::OnURLRedirect, base::Unretained(this)));
|
||||
-}
|
||||
+}*/
|
||||
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h
|
||||
--- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h
|
||||
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.h
|
||||
@@ -130,7 +130,7 @@ class ChromeOmniboxNavigationObserver : public OmniboxNavigationObserver,
|
||||
|
||||
// Creates a URL loader for |destination_url| and stores it in |loader_|.
|
||||
// Does not start the loader.
|
||||
- void CreateLoader(const GURL& destination_url);
|
||||
+ //void CreateLoader(const GURL& destination_url);
|
||||
|
||||
const std::u16string text_;
|
||||
const AutocompleteMatch match_;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -3,41 +3,10 @@ Date: Thu, 12 Oct 2017 08:15:17 +0200
|
||||
Subject: Disable NTP remote suggestions by default
|
||||
|
||||
---
|
||||
.../chrome/browser/feed/FeedSurfaceMediator.java | 13 ++++++++++---
|
||||
components/feed/core/shared_prefs/pref_names.cc | 4 ++--
|
||||
components/ntp_snippets/features.cc | 4 ++--
|
||||
3 files changed, 14 insertions(+), 7 deletions(-)
|
||||
components/feed/core/shared_prefs/pref_names.cc | 4 ++--
|
||||
components/ntp_snippets/features.cc | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java
|
||||
--- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java
|
||||
+++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java
|
||||
@@ -294,9 +294,13 @@ public class FeedSurfaceMediator
|
||||
/** Update the content based on supervised user or enterprise policy. */
|
||||
void updateContent() {
|
||||
mFeedEnabled = FeedFeatures.isFeedEnabled();
|
||||
- if (mFeedEnabled == !mTabToStreamMap.isEmpty()) {
|
||||
- return;
|
||||
- }
|
||||
+ // Bromite needs the next lines removed because mFeedEnabled
|
||||
+ // is always false and mTabToStreamMap never empty
|
||||
+ //
|
||||
+ // addHeaderAndStream is called at least once
|
||||
+ // if (mFeedEnabled == !mTabToStreamMap.isEmpty()) {
|
||||
+ // return;
|
||||
+ // }
|
||||
|
||||
RecyclerView recyclerView = mCoordinator.getRecyclerView();
|
||||
if (mSnapScrollHelper != null && recyclerView != null) {
|
||||
@@ -450,6 +454,9 @@ public class FeedSurfaceMediator
|
||||
}
|
||||
|
||||
private void addHeaderAndStream(String headerText, Stream stream) {
|
||||
+ // Bromite also needs this early return because
|
||||
+ // the first item inserted is the feed setting
|
||||
+ if (FeedFeatures.isFeedEnabled() == false) return;
|
||||
int tabId = mSectionHeaderModel.get(SectionHeaderListProperties.SECTION_HEADERS_KEY).size();
|
||||
mTabToStreamMap.put(tabId, stream);
|
||||
|
||||
diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/core/shared_prefs/pref_names.cc
|
||||
--- a/components/feed/core/shared_prefs/pref_names.cc
|
||||
+++ b/components/feed/core/shared_prefs/pref_names.cc
|
||||
@@ -55,7 +24,7 @@ diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/c
|
||||
diff --git a/components/ntp_snippets/features.cc b/components/ntp_snippets/features.cc
|
||||
--- a/components/ntp_snippets/features.cc
|
||||
+++ b/components/ntp_snippets/features.cc
|
||||
@@ -38,7 +38,7 @@ const base::Feature* const kAllFeatures[] = {
|
||||
@@ -39,7 +39,7 @@ const base::Feature* const kAllFeatures[] = {
|
||||
&kOptionalImagesEnabledFeature};
|
||||
|
||||
const base::Feature kArticleSuggestionsFeature{
|
||||
@@ -64,7 +33,7 @@ diff --git a/components/ntp_snippets/features.cc b/components/ntp_snippets/featu
|
||||
|
||||
const base::Feature kRemoteSuggestionsEmulateM58FetchingSchedule{
|
||||
"RemoteSuggestionsEmulateM58FetchingSchedule",
|
||||
@@ -68,7 +68,7 @@ const char kNotificationsDailyLimit[] = "daily_limit";
|
||||
@@ -69,7 +69,7 @@ const char kNotificationsDailyLimit[] = "daily_limit";
|
||||
const char kNotificationsIgnoredLimitParam[] = "ignored_limit";
|
||||
|
||||
const base::Feature kKeepPrefetchedContentSuggestions{
|
||||
@@ -73,5 +42,6 @@ diff --git a/components/ntp_snippets/features.cc b/components/ntp_snippets/featu
|
||||
|
||||
const base::Feature kOptionalImagesEnabledFeature{
|
||||
"NTPRemoteSuggestionsOptionalImages", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,292 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Thu, 24 Mar 2022 10:08:00 +0000
|
||||
Subject: Disable TLS resumption
|
||||
|
||||
Disable resumption feature for all HTTPS and QUIC connections;
|
||||
the feature could be used to track users even without cookies.
|
||||
|
||||
Sessions are not currently saved to disk in Chromium (although
|
||||
there is support for it) but are long enough to constitute a
|
||||
privacy risk (2h for TLS 1.2 and 7 days for TLS 1.3) if user
|
||||
does not frequently close the browser.
|
||||
|
||||
Since session information is not kept in the HTTP cache it is
|
||||
not cleared when deleting navigation data (although it is possible
|
||||
to clear it by selecting "passwords").
|
||||
|
||||
Two new user configurable flags are introduced:
|
||||
* kDisableTLSResumption, active by default
|
||||
* kLogTLSResumption, that would allow to find in logcat reused
|
||||
sessions in lines matching "SSL Log:"
|
||||
|
||||
See also:
|
||||
* https://arxiv.org/abs/1810.07304
|
||||
---
|
||||
chrome/browser/about_flags.cc | 6 +++
|
||||
chrome/browser/flag_descriptions.cc | 8 ++++
|
||||
chrome/browser/flag_descriptions.h | 6 +++
|
||||
net/base/features.cc | 6 +++
|
||||
net/base/features.h | 6 +++
|
||||
net/http/http_network_session.cc | 1 +
|
||||
net/quic/quic_stream_factory.cc | 35 ++++++++++++++++-
|
||||
net/socket/ssl_client_socket_impl.cc | 59 ++++++++++++++++++++++++++++
|
||||
net/socket/ssl_client_socket_impl.h | 2 +
|
||||
9 files changed, 128 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -4472,6 +4472,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-tls13-early-data", flag_descriptions::kEnableTLS13EarlyDataName,
|
||||
flag_descriptions::kEnableTLS13EarlyDataDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(net::features::kEnableTLS13EarlyData)},
|
||||
+ {"disable-tls-resumption", flag_descriptions::kDisableTLSResumptionName,
|
||||
+ flag_descriptions::kDisableTLSResumptionDescription, kOsAll,
|
||||
+ FEATURE_VALUE_TYPE(net::features::kDisableTLSResumption)},
|
||||
+ {"log-tls-resumption", flag_descriptions::kLogTLSResumptionName,
|
||||
+ flag_descriptions::kLogTLSResumptionDescription, kOsAll,
|
||||
+ FEATURE_VALUE_TYPE(net::features::kLogTLSResumption)},
|
||||
{"post-quantum-cecpq2", flag_descriptions::kPostQuantumCECPQ2Name,
|
||||
flag_descriptions::kPostQuantumCECPQ2Description, kOsAll,
|
||||
FEATURE_VALUE_TYPE(net::features::kPostQuantumCECPQ2)},
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -922,6 +922,14 @@ const char kEnableTLS13EarlyDataDescription[] =
|
||||
"during the handshake when resuming a connection to a compatible TLS 1.3 "
|
||||
"server.";
|
||||
|
||||
+const char kDisableTLSResumptionName[] = "Disable TLS Session Resumption";
|
||||
+const char kDisableTLSResumptionDescription[] =
|
||||
+ "Disable TLS session resumption.";
|
||||
+
|
||||
+const char kLogTLSResumptionName[] = "Log TLS Session Resumption";
|
||||
+const char kLogTLSResumptionDescription[] =
|
||||
+ "Log TLS session resumption";
|
||||
+
|
||||
const char kEnhancedNetworkVoicesName[] = "Enhanced network voices";
|
||||
const char kEnhancedNetworkVoicesDescription[] =
|
||||
"This option enables high-quality, network-based voices in "
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -532,6 +532,12 @@ extern const char kEnablePreinstalledWebAppDuplicationFixerDescription[];
|
||||
extern const char kEnableTLS13EarlyDataName[];
|
||||
extern const char kEnableTLS13EarlyDataDescription[];
|
||||
|
||||
+extern const char kDisableTLSResumptionName[];
|
||||
+extern const char kDisableTLSResumptionDescription[];
|
||||
+
|
||||
+extern const char kLogTLSResumptionName[];
|
||||
+extern const char kLogTLSResumptionDescription[];
|
||||
+
|
||||
extern const char kEnhancedNetworkVoicesName[];
|
||||
extern const char kEnhancedNetworkVoicesDescription[];
|
||||
|
||||
diff --git a/net/base/features.cc b/net/base/features.cc
|
||||
--- a/net/base/features.cc
|
||||
+++ b/net/base/features.cc
|
||||
@@ -112,6 +112,12 @@ const base::FeatureParam<int> kUseDnsHttpsSvcbExtraTimePercent{
|
||||
const base::Feature kEnableTLS13EarlyData{"EnableTLS13EarlyData",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
+const base::Feature kDisableTLSResumption{"DisableTLSResumption",
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+
|
||||
+const base::Feature kLogTLSResumption{"LogTLSResumption",
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+
|
||||
const base::Feature kEncryptedClientHello{"EncryptedClientHello",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
diff --git a/net/base/features.h b/net/base/features.h
|
||||
--- a/net/base/features.h
|
||||
+++ b/net/base/features.h
|
||||
@@ -175,6 +175,12 @@ NET_EXPORT extern const base::FeatureParam<int>
|
||||
// Enables TLS 1.3 early data.
|
||||
NET_EXPORT extern const base::Feature kEnableTLS13EarlyData;
|
||||
|
||||
+// Disables TLS resumption.
|
||||
+NET_EXPORT extern const base::Feature kDisableTLSResumption;
|
||||
+
|
||||
+// Log TLS resumption.
|
||||
+NET_EXPORT extern const base::Feature kLogTLSResumption;
|
||||
+
|
||||
// Enables the TLS Encrypted ClientHello feature.
|
||||
// https://datatracker.ietf.org/doc/html/draft-ietf-tls-esni-13
|
||||
NET_EXPORT extern const base::Feature kEncryptedClientHello;
|
||||
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
|
||||
--- a/net/http/http_network_session.cc
|
||||
+++ b/net/http/http_network_session.cc
|
||||
@@ -232,6 +232,7 @@ HttpNetworkSession::HttpNetworkSession(const HttpNetworkSessionParams& params,
|
||||
|
||||
next_protos_.push_back(kProtoHTTP11);
|
||||
|
||||
+ DCHECK(context.quic_context->params()->max_server_configs_stored_in_properties == 0);
|
||||
http_server_properties_->SetMaxServerConfigsStoredInProperties(
|
||||
context.quic_context->params()->max_server_configs_stored_in_properties);
|
||||
http_server_properties_->SetBrokenAlternativeServicesDelayParams(
|
||||
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
|
||||
--- a/net/quic/quic_stream_factory.cc
|
||||
+++ b/net/quic/quic_stream_factory.cc
|
||||
@@ -73,6 +73,7 @@
|
||||
#include "net/third_party/quiche/src/quiche/quic/core/quic_utils.h"
|
||||
#include "net/third_party/quiche/src/quiche/quic/platform/api/quic_flags.h"
|
||||
#include "third_party/boringssl/src/include/openssl/aead.h"
|
||||
+#include "third_party/boringssl/src/include/openssl/ssl.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/scheme_host_port.h"
|
||||
#include "url/url_constants.h"
|
||||
@@ -229,6 +230,38 @@ std::set<std::string> HostsFromOrigins(std::set<HostPortPair> origins) {
|
||||
|
||||
} // namespace
|
||||
|
||||
+class BromiteSessionCache : public quic::QuicClientSessionCache {
|
||||
+ public:
|
||||
+ BromiteSessionCache() = default;
|
||||
+ ~BromiteSessionCache() override = default;
|
||||
+
|
||||
+ void Insert(const quic::QuicServerId& server_id,
|
||||
+ bssl::UniquePtr<SSL_SESSION> session,
|
||||
+ const quic::TransportParameters& params,
|
||||
+ const quic::ApplicationState* application_state) override {
|
||||
+ if (base::FeatureList::IsEnabled(net::features::kDisableTLSResumption))
|
||||
+ SSL_SESSION_set_timeout(session.get(), 0);
|
||||
+ if (base::FeatureList::IsEnabled(net::features::kLogTLSResumption)) {
|
||||
+ LOG(INFO) << "SSL Log: new quic session created "
|
||||
+ << server_id.host();
|
||||
+ }
|
||||
+ quic::QuicClientSessionCache::Insert(server_id,
|
||||
+ std::move(session), params, application_state);
|
||||
+ }
|
||||
+
|
||||
+ std::unique_ptr<quic::QuicResumptionState> Lookup(
|
||||
+ const quic::QuicServerId& server_id, quic::QuicWallTime now,
|
||||
+ const SSL_CTX* ctx) override {
|
||||
+ auto value = quic::QuicClientSessionCache::Lookup(server_id, now, ctx);
|
||||
+ if (value != nullptr &&
|
||||
+ base::FeatureList::IsEnabled(net::features::kLogTLSResumption)) {
|
||||
+ LOG(INFO) << "SSL Log: QUIC session resumed "
|
||||
+ << server_id.host();
|
||||
+ }
|
||||
+ return value;
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
// Refcounted class that owns quic::QuicCryptoClientConfig and tracks how many
|
||||
// consumers are using it currently. When the last reference is freed, the
|
||||
// QuicCryptoClientConfigHandle informs the owning QuicStreamFactory, moves it
|
||||
@@ -2209,7 +2242,7 @@ QuicStreamFactory::CreateCryptoConfigHandle(
|
||||
sct_auditing_delegate_,
|
||||
HostsFromOrigins(params_.origins_to_force_quic_on),
|
||||
actual_network_isolation_key),
|
||||
- std::make_unique<quic::QuicClientSessionCache>(), this);
|
||||
+ std::make_unique<BromiteSessionCache>(), this);
|
||||
|
||||
quic::QuicCryptoClientConfig* crypto_config = crypto_config_owner->config();
|
||||
crypto_config->set_user_agent_id(params_.user_agent_id);
|
||||
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
|
||||
--- a/net/socket/ssl_client_socket_impl.cc
|
||||
+++ b/net/socket/ssl_client_socket_impl.cc
|
||||
@@ -404,7 +404,33 @@ SSLClientSocketImpl::SSLClientSocketImpl(
|
||||
CHECK(context_);
|
||||
}
|
||||
|
||||
+void SSLClientSocketImpl::Log_ssl_session_data(const std::string& tag, SSL_SESSION* session) {
|
||||
+ if (session == NULL) {
|
||||
+ LOG(INFO) << "SSL Log: "
|
||||
+ << tag
|
||||
+ << " host: " << host_and_port_.ToString()
|
||||
+ << " NIK: " << ssl_config_.network_isolation_key.ToDebugString();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ unsigned len;
|
||||
+ auto* session_id = SSL_SESSION_get_id(session, &len);
|
||||
+
|
||||
+ const uint8_t *ticket;
|
||||
+ size_t ticklen;
|
||||
+ SSL_SESSION_get0_ticket(session, &ticket, &ticklen);
|
||||
+
|
||||
+ LOG(INFO) << "SSL Log: "
|
||||
+ << tag
|
||||
+ << " host: " << host_and_port_.ToString()
|
||||
+ << " NIK: " << ssl_config_.network_isolation_key.ToDebugString()
|
||||
+ << " sessionid: " << base::HexEncode(session_id, len)
|
||||
+ << (ticklen > 0 ? " ticket:" + base::HexEncode(ticket, ticklen) : "");
|
||||
+}
|
||||
+
|
||||
SSLClientSocketImpl::~SSLClientSocketImpl() {
|
||||
+ if (base::FeatureList::IsEnabled(net::features::kLogTLSResumption))
|
||||
+ Log_ssl_session_data("Disconnect", NULL);
|
||||
Disconnect();
|
||||
}
|
||||
|
||||
@@ -803,6 +829,8 @@ int SSLClientSocketImpl::Init() {
|
||||
}
|
||||
if (session)
|
||||
SSL_set_session(ssl_.get(), session.get());
|
||||
+ if (session && base::FeatureList::IsEnabled(net::features::kLogTLSResumption))
|
||||
+ Log_ssl_session_data("Old session resumed", session.get());
|
||||
}
|
||||
|
||||
transport_adapter_ = std::make_unique<SocketBIOAdapter>(
|
||||
@@ -1091,6 +1119,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) {
|
||||
: SSLHandshakeDetails::kTLS13Full;
|
||||
}
|
||||
}
|
||||
+ if (base::FeatureList::IsEnabled(net::features::kLogTLSResumption)) {
|
||||
+ switch(details)
|
||||
+ {
|
||||
+ case SSLHandshakeDetails::kTLS13Early:
|
||||
+ Log_ssl_session_data("SSL Log: session reused: kTLS13Early mode", NULL);
|
||||
+ break;
|
||||
+ case SSLHandshakeDetails::kTLS13ResumeWithHelloRetryRequest:
|
||||
+ Log_ssl_session_data("SSL Log: session reused: kTLS13ResumeWithHelloRetryRequest mode", NULL);
|
||||
+ break;
|
||||
+ case SSLHandshakeDetails::kTLS13Resume:
|
||||
+ Log_ssl_session_data("SSL Log: session reused: kTLS13Resume mode", NULL);
|
||||
+ break;
|
||||
+ case SSLHandshakeDetails::kTLS12Resume:
|
||||
+ Log_ssl_session_data("SSL Log: session reused: kTLS12Resume mode", NULL);
|
||||
+ break;
|
||||
+ case SSLHandshakeDetails::kTLS12Full:
|
||||
+ Log_ssl_session_data("SSL Log: session reused: kTLS12Full mode", NULL);
|
||||
+ break;
|
||||
+ case SSLHandshakeDetails::kTLS12FalseStart:
|
||||
+ Log_ssl_session_data("SSL Log: session reused: kTLS12FalseStart mode", NULL);
|
||||
+ break;
|
||||
+ case SSLHandshakeDetails::kTLS13Full:
|
||||
+ Log_ssl_session_data("SSL Log: session reused: kTLS13Full mode", NULL);
|
||||
+ break;
|
||||
+ case SSLHandshakeDetails::kTLS13FullWithHelloRetryRequest:
|
||||
+ Log_ssl_session_data("SSL Log: session reused: kTLS13FullWithHelloRetryRequest mode", NULL);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
UMA_HISTOGRAM_ENUMERATION("Net.SSLHandshakeDetails", details);
|
||||
|
||||
// Measure TLS connections that implement the renegotiation_info extension.
|
||||
@@ -1764,6 +1821,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const {
|
||||
}
|
||||
|
||||
bool SSLClientSocketImpl::IsCachingEnabled() const {
|
||||
+ if (base::FeatureList::IsEnabled(net::features::kDisableTLSResumption))
|
||||
+ return false;
|
||||
return context_->ssl_client_session_cache() != nullptr;
|
||||
}
|
||||
|
||||
diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_impl.h
|
||||
--- a/net/socket/ssl_client_socket_impl.h
|
||||
+++ b/net/socket/ssl_client_socket_impl.h
|
||||
@@ -130,6 +130,8 @@ class SSLClientSocketImpl : public SSLClientSocket,
|
||||
friend class SSLClientSocket;
|
||||
friend class SSLContext;
|
||||
|
||||
+ void Log_ssl_session_data(const std::string& tag, SSL_SESSION* session);
|
||||
+
|
||||
int Init();
|
||||
void DoReadCallback(int result);
|
||||
void DoWriteCallback(int result);
|
||||
--
|
||||
2.25.1
|
||||
@@ -1,58 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Wed, 16 Feb 2022 14:28:58 +0000
|
||||
Subject: Disable UA full version
|
||||
|
||||
getHighEntropyValues will return only the major version
|
||||
---
|
||||
.../renderer/core/frame/navigator_ua_data.cc | 16 ++++++++++++++--
|
||||
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_party/blink/renderer/core/frame/navigator_ua_data.cc
|
||||
--- a/third_party/blink/renderer/core/frame/navigator_ua_data.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/navigator_ua_data.cc
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
+#include "base/version.h"
|
||||
+#include "base/strings/strcat.h"
|
||||
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
|
||||
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
|
||||
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
|
||||
@@ -39,6 +41,16 @@ void MaybeRecordMetric(bool record_identifiability,
|
||||
.Record(execution_context->UkmRecorder());
|
||||
}
|
||||
|
||||
+const String GetReducedVersionNumber(const std::string& fullVersion) {
|
||||
+ base::Version version(fullVersion);
|
||||
+ std::string version_str;
|
||||
+ const std::vector<uint32_t>& components = version.components();
|
||||
+ if (components.size() > 0) {
|
||||
+ version_str = base::StrCat({base::NumberToString(components[0]), ".0.0.0"});
|
||||
+ }
|
||||
+ return String::FromUTF8(version_str);
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
NavigatorUAData::NavigatorUAData(ExecutionContext* context)
|
||||
@@ -77,7 +89,7 @@ void NavigatorUAData::SetFullVersionList(
|
||||
const UserAgentBrandList& full_version_list) {
|
||||
for (const auto& brand_version : full_version_list) {
|
||||
AddBrandFullVersion(String::FromUTF8(brand_version.brand),
|
||||
- String::FromUTF8(brand_version.version));
|
||||
+ GetReducedVersionNumber(brand_version.version));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +111,7 @@ void NavigatorUAData::SetModel(const String& model) {
|
||||
}
|
||||
|
||||
void NavigatorUAData::SetUAFullVersion(const String& ua_full_version) {
|
||||
- ua_full_version_ = ua_full_version;
|
||||
+ ua_full_version_ = GetReducedVersionNumber(ua_full_version.Ascii());
|
||||
}
|
||||
|
||||
void NavigatorUAData::SetBitness(const String& bitness) {
|
||||
--
|
||||
2.25.1
|
||||
@@ -1,256 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Tue, 25 Jan 2022 12:22:52 +0000
|
||||
Subject: Disable all predictors code
|
||||
|
||||
---
|
||||
.../chrome_hints_manager.cc | 1 +
|
||||
.../optimization_guide_keyed_service.cc | 1 -
|
||||
chrome/common/chrome_features.cc | 4 ++--
|
||||
.../optimization_guide/core/hints_fetcher.cc | 1 +
|
||||
.../optimization_guide/core/hints_manager.cc | 3 +++
|
||||
.../core/optimization_guide_features.cc | 20 +++++++++----------
|
||||
.../core/prediction_model_download_manager.cc | 4 +++-
|
||||
.../core/prediction_model_fetcher_impl.cc | 1 +
|
||||
components/optimization_guide/features.gni | 4 +---
|
||||
components/permissions/features.cc | 2 +-
|
||||
.../segmentation_platform/public/features.cc | 2 +-
|
||||
third_party/blink/common/features.cc | 2 +-
|
||||
12 files changed, 25 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/browser/optimization_guide/chrome_hints_manager.cc
|
||||
--- a/chrome/browser/optimization_guide/chrome_hints_manager.cc
|
||||
+++ b/chrome/browser/optimization_guide/chrome_hints_manager.cc
|
||||
@@ -29,6 +29,7 @@ bool IsAllowedToFetchForNavigationPrediction(
|
||||
const absl::optional<NavigationPredictorKeyedService::Prediction>
|
||||
prediction) {
|
||||
DCHECK(prediction);
|
||||
+ if ((true)) return false;
|
||||
|
||||
if (prediction->prediction_source() !=
|
||||
NavigationPredictorKeyedService::PredictionSource::
|
||||
diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc
|
||||
--- a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc
|
||||
+++ b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc
|
||||
@@ -362,7 +362,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel(
|
||||
void OptimizationGuideKeyedService::RegisterOptimizationTypes(
|
||||
const std::vector<optimization_guide::proto::OptimizationType>&
|
||||
optimization_types) {
|
||||
- hints_manager_->RegisterOptimizationTypes(optimization_types);
|
||||
}
|
||||
|
||||
optimization_guide::OptimizationGuideDecision
|
||||
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -788,7 +788,7 @@ const base::Feature kPermissionAuditing{"PermissionAuditing",
|
||||
// Enables using the prediction service for permission prompts. We will keep
|
||||
// this feature in order to allow us to update the holdback chance via finch.
|
||||
const base::Feature kPermissionPredictions{"PermissionPredictions",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// The holdback chance is 30% but it can also be configured/updated
|
||||
// through finch if needed.
|
||||
@@ -799,7 +799,7 @@ const base::FeatureParam<double> kPermissionPredictionsHoldbackChance(
|
||||
|
||||
// Enables using the prediction service for geolocation permission prompts.
|
||||
const base::Feature kPermissionGeolocationPredictions{
|
||||
- "PermissionGeolocationPredictions", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ "PermissionGeolocationPredictions", base::FEATURE_DISABLED_BY_DEFAULT}; // guard this
|
||||
|
||||
const base::FeatureParam<double>
|
||||
kPermissionGeolocationPredictionsHoldbackChance(
|
||||
diff --git a/components/optimization_guide/core/hints_fetcher.cc b/components/optimization_guide/core/hints_fetcher.cc
|
||||
--- a/components/optimization_guide/core/hints_fetcher.cc
|
||||
+++ b/components/optimization_guide/core/hints_fetcher.cc
|
||||
@@ -175,6 +175,7 @@ bool HintsFetcher::FetchOptimizationGuideServiceHints(
|
||||
optimization_guide::proto::RequestContext request_context,
|
||||
const std::string& locale,
|
||||
HintsFetchedCallback hints_fetched_callback) {
|
||||
+ if ((true)) return false;
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
DCHECK_GT(optimization_types.size(), 0u);
|
||||
request_context_ = request_context;
|
||||
diff --git a/components/optimization_guide/core/hints_manager.cc b/components/optimization_guide/core/hints_manager.cc
|
||||
--- a/components/optimization_guide/core/hints_manager.cc
|
||||
+++ b/components/optimization_guide/core/hints_manager.cc
|
||||
@@ -1211,6 +1211,9 @@ OptimizationTypeDecision HintsManager::CanApplyOptimization(
|
||||
proto::OptimizationType optimization_type,
|
||||
OptimizationMetadata* optimization_metadata) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ if ((true)) {
|
||||
+ return OptimizationTypeDecision::kNoHintAvailable;
|
||||
+ }
|
||||
|
||||
ScopedCanApplyOptimizationLogger scoped_logger(
|
||||
optimization_type, navigation_url, optimization_guide_logger_);
|
||||
diff --git a/components/optimization_guide/core/optimization_guide_features.cc b/components/optimization_guide/core/optimization_guide_features.cc
|
||||
--- a/components/optimization_guide/core/optimization_guide_features.cc
|
||||
+++ b/components/optimization_guide/core/optimization_guide_features.cc
|
||||
@@ -79,7 +79,7 @@ bool IsSupportedLocaleForFeature(const std::string locale,
|
||||
// Enables the syncing of the Optimization Hints component, which provides
|
||||
// hints for what optimizations can be applied on a page load.
|
||||
const base::Feature kOptimizationHints{"OptimizationHints",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// Feature flag that contains a feature param that specifies the field trials
|
||||
// that are allowed to be sent up to the Optimization Guide Server.
|
||||
@@ -88,12 +88,12 @@ const base::Feature kOptimizationHintsFieldTrials{
|
||||
|
||||
// Enables fetching from a remote Optimization Guide Service.
|
||||
const base::Feature kRemoteOptimizationGuideFetching{
|
||||
- "OptimizationHintsFetching", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ "OptimizationHintsFetching", base::FEATURE_DISABLED_BY_DEFAULT}; // guard this
|
||||
|
||||
const base::Feature kRemoteOptimizationGuideFetchingAnonymousDataConsent {
|
||||
"OptimizationHintsFetchingAnonymousDataConsent",
|
||||
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#else // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
@@ -107,15 +107,15 @@ const base::Feature kContextMenuPerformanceInfoAndRemoteHintFetching{
|
||||
|
||||
// Enables the prediction of optimization targets.
|
||||
const base::Feature kOptimizationTargetPrediction{
|
||||
- "OptimizationTargetPrediction", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ "OptimizationTargetPrediction", base::FEATURE_DISABLED_BY_DEFAULT}; // guard this
|
||||
|
||||
// Enables the downloading of models.
|
||||
const base::Feature kOptimizationGuideModelDownloading {
|
||||
"OptimizationGuideModelDownloading",
|
||||
#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
-#else // BUILD_WITH_TFLITE_LIB
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
+#else // BUILD_WITH_TFLITE_LIB
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT // guard this
|
||||
#endif // !BUILD_WITH_TFLITE_LIB
|
||||
};
|
||||
|
||||
@@ -141,7 +141,7 @@ const base::Feature kPageEntitiesModelResetOnShutdown{
|
||||
|
||||
// Enables push notification of hints.
|
||||
const base::Feature kPushNotifications{"OptimizationGuidePushNotifications",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT}; // guard this
|
||||
|
||||
// This feature flag does not turn off any behavior, it is only used for
|
||||
// experiment parameters.
|
||||
@@ -153,12 +153,12 @@ const base::Feature kOptimizationGuideMetadataValidation{
|
||||
"OptimizationGuideMetadataValidation", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kPageTopicsBatchAnnotations{
|
||||
- "PageTopicsBatchAnnotations", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ "PageTopicsBatchAnnotations", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
const base::Feature kPageVisibilityBatchAnnotations{
|
||||
"PageVisibilityBatchAnnotations", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kUseLocalPageEntitiesMetadataProvider{
|
||||
- "UseLocalPageEntitiesMetadataProvider", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ "UseLocalPageEntitiesMetadataProvider", base::FEATURE_DISABLED_BY_DEFAULT}; // guard this
|
||||
|
||||
const base::Feature kBatchAnnotationsValidation{
|
||||
"BatchAnnotationsValidation", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
@@ -389,7 +389,7 @@ size_t MaxURLKeyedHintCacheSize() {
|
||||
|
||||
bool ShouldPersistHintsToDisk() {
|
||||
return GetFieldTrialParamByFeatureAsBool(kOptimizationHints,
|
||||
- "persist_hints_to_disk", true);
|
||||
+ "persist_hints_to_disk", false);
|
||||
}
|
||||
|
||||
bool ShouldOverrideOptimizationTargetDecisionForMetricsPurposes(
|
||||
diff --git a/components/optimization_guide/core/prediction_model_download_manager.cc b/components/optimization_guide/core/prediction_model_download_manager.cc
|
||||
--- a/components/optimization_guide/core/prediction_model_download_manager.cc
|
||||
+++ b/components/optimization_guide/core/prediction_model_download_manager.cc
|
||||
@@ -46,7 +46,7 @@ constexpr char kGoogApiKey[] = "X-Goog-Api-Key";
|
||||
// we require models to come from.
|
||||
constexpr uint8_t kPublisherKeyHash[] = {
|
||||
0x66, 0xa1, 0xd9, 0x3e, 0x4e, 0x5a, 0x66, 0x8a, 0x0f, 0xd3, 0xfa,
|
||||
- 0xa3, 0x70, 0x71, 0x42, 0x16, 0x0d, 0x2d, 0x68, 0xb0, 0x53, 0x02,
|
||||
+ 0x01, 0x02, 0x03, 0x04, 0x16, 0x0d, 0x2d, 0x68, 0xb0, 0x53, 0x02,
|
||||
0x5c, 0x7f, 0xd0, 0x0c, 0xa1, 0x6e, 0xef, 0xdd, 0x63, 0x7a};
|
||||
const net::NetworkTrafficAnnotationTag
|
||||
kOptimizationGuidePredictionModelsTrafficAnnotation =
|
||||
@@ -106,6 +106,7 @@ PredictionModelDownloadManager::~PredictionModelDownloadManager() = default;
|
||||
void PredictionModelDownloadManager::StartDownload(
|
||||
const GURL& download_url,
|
||||
proto::OptimizationTarget optimization_target) {
|
||||
+ if ((true)) return;
|
||||
download::DownloadParams download_params;
|
||||
download_params.client =
|
||||
download::DownloadClient::OPTIMIZATION_GUIDE_PREDICTION_MODELS;
|
||||
@@ -240,6 +241,7 @@ void PredictionModelDownloadManager::OnDownloadFailed(
|
||||
absl::optional<std::pair<base::FilePath, base::FilePath>>
|
||||
PredictionModelDownloadManager::ProcessDownload(
|
||||
const base::FilePath& file_path) {
|
||||
+ if ((true)) return absl::nullopt;
|
||||
DCHECK(background_task_runner_->RunsTasksInCurrentSequence());
|
||||
|
||||
if (!switches::ShouldSkipModelDownloadVerificationForTesting()) {
|
||||
diff --git a/components/optimization_guide/core/prediction_model_fetcher_impl.cc b/components/optimization_guide/core/prediction_model_fetcher_impl.cc
|
||||
--- a/components/optimization_guide/core/prediction_model_fetcher_impl.cc
|
||||
+++ b/components/optimization_guide/core/prediction_model_fetcher_impl.cc
|
||||
@@ -51,6 +51,7 @@ bool PredictionModelFetcherImpl::FetchOptimizationGuideServiceModels(
|
||||
proto::RequestContext request_context,
|
||||
const std::string& locale,
|
||||
ModelsFetchedCallback models_fetched_callback) {
|
||||
+ if ((true)) return false;
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
if (url_loader_)
|
||||
diff --git a/components/optimization_guide/features.gni b/components/optimization_guide/features.gni
|
||||
--- a/components/optimization_guide/features.gni
|
||||
+++ b/components/optimization_guide/features.gni
|
||||
@@ -10,9 +10,7 @@ if (is_android) {
|
||||
declare_args() {
|
||||
# This enables build with TFLite library.
|
||||
# Currently only available for Desktop and Android.
|
||||
- build_with_tflite_lib =
|
||||
- is_android || (is_win && target_cpu != "arm64") || is_linux || is_mac ||
|
||||
- is_chromeos || is_fuchsia || is_ios
|
||||
+ build_with_tflite_lib = false
|
||||
|
||||
# You can set the variable 'build_with_internal_optimization_guide' to true
|
||||
# even in a developer build in args.gn. Setting this variable explicitly to true will
|
||||
diff --git a/components/permissions/features.cc b/components/permissions/features.cc
|
||||
--- a/components/permissions/features.cc
|
||||
+++ b/components/permissions/features.cc
|
||||
@@ -69,7 +69,7 @@ const base::Feature kPermissionPredictionServiceUseUrlOverride{
|
||||
|
||||
const base::Feature kPermissionOnDeviceNotificationPredictions{
|
||||
"PermissionOnDeviceNotificationPredictions",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT}; // guard this
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
|
||||
diff --git a/components/segmentation_platform/public/features.cc b/components/segmentation_platform/public/features.cc
|
||||
--- a/components/segmentation_platform/public/features.cc
|
||||
+++ b/components/segmentation_platform/public/features.cc
|
||||
@@ -12,7 +12,7 @@ namespace features {
|
||||
const base::Feature kSegmentationPlatformFeature {
|
||||
"SegmentationPlatform",
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#else
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#endif
|
||||
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
|
||||
--- a/third_party/blink/common/features.cc
|
||||
+++ b/third_party/blink/common/features.cc
|
||||
@@ -180,7 +180,7 @@ const base::Feature kViewportHeightClientHintHeader{
|
||||
const base::Feature kNavigationPredictor {
|
||||
"NavigationPredictor",
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#else
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#endif
|
||||
--
|
||||
2.25.1
|
||||
@@ -9,7 +9,7 @@ Subject: Disable all promo dialogs
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
|
||||
@@ -863,7 +863,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
|
||||
@@ -822,7 +822,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
|
||||
* displayed.
|
||||
*/
|
||||
private boolean triggerPromo(boolean intentWithEffect) {
|
||||
@@ -18,7 +18,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab
|
||||
if (CommandLine.getInstance().hasSwitch(ChromeSwitches.DISABLE_STARTUP_PROMOS)) {
|
||||
return false;
|
||||
}
|
||||
@@ -898,8 +898,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
|
||||
@@ -857,8 +857,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
|
||||
preferenceManager.writeBoolean(
|
||||
ChromePreferenceKeys.PROMOS_SKIPPED_ON_FIRST_START, true);
|
||||
}
|
||||
@@ -29,5 +29,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab
|
||||
}
|
||||
|
||||
private boolean maybeShowPromo() {
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 19 Dec 2019 21:46:10 +0100
|
||||
Subject: Disable autofill assistant by default
|
||||
|
||||
---
|
||||
.../autofill_assistant/AutofillAssistantPreferencesUtil.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantPreferencesUtil.java b/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantPreferencesUtil.java
|
||||
--- a/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantPreferencesUtil.java
|
||||
+++ b/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantPreferencesUtil.java
|
||||
@@ -23,7 +23,7 @@ public class AutofillAssistantPreferencesUtil {
|
||||
/** Checks whether the Autofill Assistant switch preference in settings is on. */
|
||||
static boolean isAutofillAssistantSwitchOn() {
|
||||
return SharedPreferencesManager.getInstance().readBoolean(
|
||||
- ChromePreferenceKeys.AUTOFILL_ASSISTANT_ENABLED, true);
|
||||
+ ChromePreferenceKeys.AUTOFILL_ASSISTANT_ENABLED, false);
|
||||
}
|
||||
|
||||
/** Checks whether proactive help is enabled. */
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,222 +0,0 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Mon, 15 Nov 2021 09:43:29 +0000
|
||||
Subject: Disable conversion measurement api
|
||||
|
||||
Disable Conversion Measurement API by disabling the flag and removing
|
||||
support for the AttributionReporting provider. it also removes
|
||||
the handling of attributions via intents between apps.
|
||||
This patch enforces the deactivation by preventing the report from
|
||||
being sent and being saved to disk, although it is currently in uncalled code.
|
||||
---
|
||||
.../flags/android/chrome_feature_list.cc | 2 +-
|
||||
.../embedder_support/origin_trials/features.cc | 3 ++-
|
||||
.../render_view_context_menu_base.cc | 3 ---
|
||||
.../aggregatable_report_sender.cc | 17 ++++++++---------
|
||||
.../attribution_reporting/attribution_host.cc | 1 +
|
||||
.../attribution_report_network_sender.cc | 15 ++++++++-------
|
||||
.../attribution_storage_sql.cc | 2 +-
|
||||
content/browser/storage_partition_impl.cc | 7 +------
|
||||
content/public/browser/navigation_controller.cc | 1 -
|
||||
third_party/blink/common/features.cc | 2 +-
|
||||
.../platform/runtime_enabled_features.json5 | 9 ++++++++-
|
||||
11 files changed, 31 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -442,7 +442,7 @@ const base::Feature kAppMenuMobileSiteOption{"AppMenuMobileSiteOption",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kAppToWebAttribution{"AppToWebAttribution",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT}; // guard this
|
||||
|
||||
const base::Feature kBackgroundThreadPool{"BackgroundThreadPool",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
diff --git a/components/embedder_support/origin_trials/features.cc b/components/embedder_support/origin_trials/features.cc
|
||||
--- a/components/embedder_support/origin_trials/features.cc
|
||||
+++ b/components/embedder_support/origin_trials/features.cc
|
||||
@@ -17,8 +17,9 @@ const base::Feature kOriginTrialsSampleAPIThirdPartyAlternativeUsage{
|
||||
"OriginTrialsSampleAPIThirdPartyAlternativeUsage",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
+// When disabled, the API cannot be enabled by tokens.
|
||||
const base::Feature kConversionMeasurementAPIAlternativeUsage{
|
||||
"ConversionMeasurementAPIAlternativeUsage",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
} // namespace embedder_support
|
||||
diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b/components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
--- a/components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
+++ b/components/renderer_context_menu/render_view_context_menu_base.cc
|
||||
@@ -486,9 +486,6 @@ void RenderViewContextMenuBase::OpenURLWithExtraHeaders(
|
||||
|
||||
open_url_params.source_site_instance = site_instance_;
|
||||
|
||||
- if (disposition != WindowOpenDisposition::OFF_THE_RECORD)
|
||||
- open_url_params.impression = params_.impression;
|
||||
-
|
||||
source_web_contents_->OpenURL(open_url_params);
|
||||
}
|
||||
|
||||
diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b/content/browser/aggregation_service/aggregatable_report_sender.cc
|
||||
--- a/content/browser/aggregation_service/aggregatable_report_sender.cc
|
||||
+++ b/content/browser/aggregation_service/aggregatable_report_sender.cc
|
||||
@@ -137,19 +137,18 @@ void AggregatableReportSender::SendReport(const GURL& url,
|
||||
// Allow bodies of non-2xx responses to be returned.
|
||||
simple_url_loader_ptr->SetAllowHttpErrorResults(true);
|
||||
|
||||
- // Unretained is safe because the URLLoader is owned by `this` and will be
|
||||
- // deleted before `this`.
|
||||
- simple_url_loader_ptr->DownloadHeadersOnly(
|
||||
- url_loader_factory_.get(),
|
||||
- base::BindOnce(&AggregatableReportSender::OnReportSent,
|
||||
- base::Unretained(this), std::move(it),
|
||||
- std::move(callback)));
|
||||
+ // this is never called on Bromite but nothing would be sent if it were
|
||||
+ OnReportSent(std::move(it), std::move(callback), nullptr);
|
||||
}
|
||||
|
||||
void AggregatableReportSender::OnReportSent(
|
||||
UrlLoaderList::iterator it,
|
||||
ReportSentCallback callback,
|
||||
- scoped_refptr<net::HttpResponseHeaders> headers) {
|
||||
+ scoped_refptr<net::HttpResponseHeaders> headers) { // disable in Bromite
|
||||
+ if ((true)) {
|
||||
+ std::move(callback).Run(RequestStatus::kOk);
|
||||
+ return;
|
||||
+ }
|
||||
RequestStatus status;
|
||||
|
||||
absl::optional<int> http_response_code;
|
||||
@@ -189,4 +188,4 @@ void AggregatableReportSender::OnReportSent(
|
||||
std::move(callback).Run(status);
|
||||
}
|
||||
|
||||
-} // namespace content
|
||||
\ No newline at end of file
|
||||
+} // namespace content
|
||||
diff --git a/content/browser/attribution_reporting/attribution_host.cc b/content/browser/attribution_reporting/attribution_host.cc
|
||||
--- a/content/browser/attribution_reporting/attribution_host.cc
|
||||
+++ b/content/browser/attribution_reporting/attribution_host.cc
|
||||
@@ -141,6 +141,7 @@ void AttributionHost::DidFinishNavigation(NavigationHandle* navigation_handle) {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if ((true)) return;
|
||||
AttributionManager* attribution_manager =
|
||||
attribution_manager_provider_->GetManager(web_contents());
|
||||
if (!attribution_manager) {
|
||||
diff --git a/content/browser/attribution_reporting/attribution_report_network_sender.cc b/content/browser/attribution_reporting/attribution_report_network_sender.cc
|
||||
--- a/content/browser/attribution_reporting/attribution_report_network_sender.cc
|
||||
+++ b/content/browser/attribution_reporting/attribution_report_network_sender.cc
|
||||
@@ -118,13 +118,8 @@ void AttributionReportNetworkSender::SendReport(
|
||||
network::SimpleURLLoader::RETRY_ON_NAME_NOT_RESOLVED;
|
||||
simple_url_loader_ptr->SetRetryOptions(/*max_retries=*/1, retry_mode);
|
||||
|
||||
- // Unretained is safe because the URLLoader is owned by |this| and will be
|
||||
- // deleted before |this|.
|
||||
- simple_url_loader_ptr->DownloadHeadersOnly(
|
||||
- url_loader_factory_.get(),
|
||||
- base::BindOnce(&AttributionReportNetworkSender::OnReportSent,
|
||||
- base::Unretained(this), std::move(it), std::move(report),
|
||||
- is_debug_report, std::move(sent_callback)));
|
||||
+ // this is never called on Bromite but nothing would be sent if it were
|
||||
+ OnReportSent(std::move(it), report, is_debug_report, std::move(sent_callback), nullptr);
|
||||
}
|
||||
|
||||
void AttributionReportNetworkSender::SetURLLoaderFactoryForTesting(
|
||||
@@ -138,6 +133,12 @@ void AttributionReportNetworkSender::OnReportSent(
|
||||
bool is_debug_report,
|
||||
ReportSentCallback sent_callback,
|
||||
scoped_refptr<net::HttpResponseHeaders> headers) {
|
||||
+ if ((true)) {
|
||||
+ std::move(sent_callback)
|
||||
+ .Run(std::move(report),
|
||||
+ SendResult(SendResult::Status::kSent, headers ? headers->response_code() : 200));
|
||||
+ return;
|
||||
+ }
|
||||
network::SimpleURLLoader* loader = it->get();
|
||||
|
||||
// Consider a non-200 HTTP code as a non-internal error.
|
||||
diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc
|
||||
--- a/content/browser/attribution_reporting/attribution_storage_sql.cc
|
||||
+++ b/content/browser/attribution_reporting/attribution_storage_sql.cc
|
||||
@@ -358,7 +358,7 @@ void AttributionStorageSql::RunInMemoryForTesting() {
|
||||
}
|
||||
|
||||
// static
|
||||
-bool AttributionStorageSql::g_run_in_memory_ = false;
|
||||
+bool AttributionStorageSql::g_run_in_memory_ = true;
|
||||
|
||||
AttributionStorageSql::AttributionStorageSql(
|
||||
const base::FilePath& path_to_database,
|
||||
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
|
||||
--- a/content/browser/storage_partition_impl.cc
|
||||
+++ b/content/browser/storage_partition_impl.cc
|
||||
@@ -1304,12 +1304,7 @@ void StoragePartitionImpl::Initialize(
|
||||
|
||||
bucket_manager_ = std::make_unique<BucketManager>(quota_manager_proxy);
|
||||
|
||||
- // The Conversion Measurement API is not available in Incognito mode.
|
||||
- if (!is_in_memory() &&
|
||||
- base::FeatureList::IsEnabled(blink::features::kConversionMeasurement)) {
|
||||
- attribution_manager_ = std::make_unique<AttributionManagerImpl>(
|
||||
- this, path, special_storage_policy_);
|
||||
- }
|
||||
+ // The Conversion Measurement API is not available in Bromite.
|
||||
|
||||
if (base::FeatureList::IsEnabled(blink::features::kInterestGroupStorage)) {
|
||||
interest_group_manager_ = std::make_unique<InterestGroupManagerImpl>(
|
||||
diff --git a/content/public/browser/navigation_controller.cc b/content/public/browser/navigation_controller.cc
|
||||
--- a/content/public/browser/navigation_controller.cc
|
||||
+++ b/content/public/browser/navigation_controller.cc
|
||||
@@ -36,7 +36,6 @@ NavigationController::LoadURLParams::LoadURLParams(const OpenURLParams& input)
|
||||
blob_url_loader_factory(input.blob_url_loader_factory),
|
||||
href_translate(input.href_translate),
|
||||
reload_type(input.reload_type),
|
||||
- impression(input.impression),
|
||||
is_pdf(input.is_pdf) {
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(input.Valid());
|
||||
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
|
||||
--- a/third_party/blink/common/features.cc
|
||||
+++ b/third_party/blink/common/features.cc
|
||||
@@ -49,7 +49,7 @@ const base::Feature kCSSContainerQueries{"CSSContainerQueries",
|
||||
|
||||
// Controls whether the Conversion Measurement API infrastructure is enabled.
|
||||
const base::Feature kConversionMeasurement{"ConversionMeasurement",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// Controls whether LCP calculations should exclude low-entropy images. If
|
||||
// enabled, then the associated parameter sets the cutoff, expressed as the
|
||||
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -106,6 +106,13 @@
|
||||
},
|
||||
|
||||
data: [
|
||||
+ {
|
||||
+ // disable by default features by marking as
|
||||
+ // depends_on: ["DisabledForBromite"]
|
||||
+ // to work is needed to remove "origin_trial_feature_name"
|
||||
+ // and "origin_trial_allows_third_party"
|
||||
+ name: "DisabledForBromite",
|
||||
+ },
|
||||
{
|
||||
name: "AbortSignalThrowIfAborted",
|
||||
status: "stable",
|
||||
@@ -482,7 +489,7 @@
|
||||
},
|
||||
{
|
||||
name: "ConversionMeasurement",
|
||||
- status: "test",
|
||||
+ depends_on: ["DisabledForBromite"],
|
||||
},
|
||||
{
|
||||
name: "CooperativeScheduling"
|
||||
--
|
||||
2.25.1
|
||||
@@ -1,24 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 9 Apr 2022 21:43:35 +0200
|
||||
Subject: Disable crash reporting
|
||||
|
||||
---
|
||||
content/public/common/content_features.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
|
||||
--- a/content/public/common/content_features.cc
|
||||
+++ b/content/public/common/content_features.cc
|
||||
@@ -234,8 +234,8 @@ const base::Feature kCooperativeScheduling{"CooperativeScheduling",
|
||||
|
||||
// Enables crash reporting via Reporting API.
|
||||
// https://www.w3.org/TR/reporting/#crash-report
|
||||
-const base::Feature kCrashReporting{"CrashReporting",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+const base::Feature kCrashReporting{"CrashReporting", // disabled by default on Bromite
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT}; // ^
|
||||
|
||||
// Enables support for the `Critical-CH` response header.
|
||||
// https://github.com/WICG/client-hints-infrastructure/blob/master/reliability.md#critical-ch
|
||||
--
|
||||
2.25.1
|
||||
@@ -3,15 +3,15 @@ Date: Thu, 19 Dec 2019 22:52:53 +0100
|
||||
Subject: Disable feeds support by default
|
||||
|
||||
---
|
||||
.../org/chromium/chrome/browser/feed/FeedFeatures.java | 8 +-------
|
||||
.../chromium/chrome/browser/feed/shared/FeedFeatures.java | 8 +-------
|
||||
.../chromium/chrome/browser/flags/CachedFeatureFlags.java | 2 +-
|
||||
components/feed/feed_feature_list.cc | 4 ++--
|
||||
3 files changed, 4 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
|
||||
--- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
|
||||
+++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
|
||||
@@ -43,13 +43,7 @@ public final class FeedFeatures {
|
||||
diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/shared/FeedFeatures.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/shared/FeedFeatures.java
|
||||
--- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/shared/FeedFeatures.java
|
||||
+++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/shared/FeedFeatures.java
|
||||
@@ -35,13 +35,7 @@ public final class FeedFeatures {
|
||||
* the user is signed in and confirms it's not a child profile.
|
||||
*/
|
||||
public static boolean isWebFeedUIEnabled() {
|
||||
@@ -29,13 +29,13 @@ diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/fe
|
||||
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
|
||||
@@ -82,7 +82,7 @@ public class CachedFeatureFlags {
|
||||
@@ -77,7 +77,7 @@ public class CachedFeatureFlags {
|
||||
.put(ChromeFeatureList.TAB_TO_GTS_ANIMATION, true)
|
||||
.put(ChromeFeatureList.TEST_DEFAULT_DISABLED, false)
|
||||
.put(ChromeFeatureList.TEST_DEFAULT_ENABLED, true)
|
||||
- .put(ChromeFeatureList.INTEREST_FEED_V2, true)
|
||||
+ .put(ChromeFeatureList.INTEREST_FEED_V2, false)
|
||||
.put(ChromeFeatureList.THEME_REFACTOR_ANDROID, true)
|
||||
.put(ChromeFeatureList.THEME_REFACTOR_ANDROID, false)
|
||||
.put(ChromeFeatureList.USE_CHIME_ANDROID_SDK, false)
|
||||
.put(ChromeFeatureList.CCT_INCOGNITO_AVAILABLE_TO_THIRD_PARTY, false)
|
||||
diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc
|
||||
@@ -56,5 +56,6 @@ diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature
|
||||
|
||||
const base::Feature kInterestFeedV2Autoplay{"InterestFeedV2Autoplay",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -2,185 +2,14 @@ From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 8 Jul 2018 18:16:34 +0200
|
||||
Subject: Disable fetching of all field trials
|
||||
|
||||
Disable seed-based field trials
|
||||
---
|
||||
android_webview/nonembedded/BUILD.gn | 2 --
|
||||
.../services/VariationsSeedServer.java | 2 --
|
||||
.../chrome_metrics_services_manager_client.cc | 2 ++
|
||||
components/ukm/ukm_recorder_impl.cc | 3 ++
|
||||
.../firstrun/VariationsSeedBridge.java | 2 +-
|
||||
.../firstrun/VariationsSeedFetcher.java | 28 ++++---------------
|
||||
.../variations/net/omnibox_http_headers.cc | 2 +-
|
||||
.../variations/net/variations_http_headers.cc | 3 ++
|
||||
.../service/variations_field_trial_creator.cc | 3 +-
|
||||
.../variations/service/variations_service.cc | 15 ++--------
|
||||
10 files changed, 21 insertions(+), 41 deletions(-)
|
||||
.../variations/service/variations_service.cc | 14 ++------------
|
||||
1 file changed, 2 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/android_webview/nonembedded/BUILD.gn b/android_webview/nonembedded/BUILD.gn
|
||||
--- a/android_webview/nonembedded/BUILD.gn
|
||||
+++ b/android_webview/nonembedded/BUILD.gn
|
||||
@@ -101,7 +101,6 @@ android_library("services_java") {
|
||||
sources = [
|
||||
"java/src/org/chromium/android_webview/services/AwMinidumpUploadJobService.java",
|
||||
"java/src/org/chromium/android_webview/services/AwMinidumpUploaderDelegate.java",
|
||||
- "java/src/org/chromium/android_webview/services/AwVariationsSeedFetcher.java",
|
||||
"java/src/org/chromium/android_webview/services/ComponentUpdaterSafeModeUtils.java",
|
||||
"java/src/org/chromium/android_webview/services/ComponentsProviderPathUtil.java",
|
||||
"java/src/org/chromium/android_webview/services/ComponentsProviderService.java",
|
||||
@@ -112,7 +111,6 @@ android_library("services_java") {
|
||||
"java/src/org/chromium/android_webview/services/MetricsUploadService.java",
|
||||
"java/src/org/chromium/android_webview/services/SafeModeContentProvider.java",
|
||||
"java/src/org/chromium/android_webview/services/SafeModeService.java",
|
||||
- "java/src/org/chromium/android_webview/services/VariationsSeedHolder.java",
|
||||
"java/src/org/chromium/android_webview/services/VariationsSeedServer.java",
|
||||
]
|
||||
deps = [
|
||||
diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java
|
||||
--- a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java
|
||||
+++ b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java
|
||||
@@ -30,8 +30,6 @@ public class VariationsSeedServer extends Service {
|
||||
@Override
|
||||
public void getSeed(ParcelFileDescriptor newSeedFile, long oldSeedDate,
|
||||
IVariationsSeedServerCallback callback) {
|
||||
- maybeReportMetrics(callback);
|
||||
- VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate);
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
|
||||
--- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
|
||||
+++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
|
||||
@@ -189,6 +189,8 @@ ChromeMetricsServicesManagerClient::GetMetricsStateManagerForTesting() {
|
||||
void ChromeMetricsServicesManagerClient::CreateFallbackSamplingTrial(
|
||||
version_info::Channel channel,
|
||||
base::FeatureList* feature_list) {
|
||||
+ if ((true))
|
||||
+ return;
|
||||
// The trial name must be kept in sync with the server config controlling
|
||||
// sampling. If they don't match, then clients will be shuffled into different
|
||||
// groups when the server config takes over from the fallback trial.
|
||||
diff --git a/components/ukm/ukm_recorder_impl.cc b/components/ukm/ukm_recorder_impl.cc
|
||||
--- a/components/ukm/ukm_recorder_impl.cc
|
||||
+++ b/components/ukm/ukm_recorder_impl.cc
|
||||
@@ -192,6 +192,9 @@ UkmRecorderImpl::~UkmRecorderImpl() = default;
|
||||
void UkmRecorderImpl::CreateFallbackSamplingTrial(
|
||||
bool is_stable_channel,
|
||||
base::FeatureList* feature_list) {
|
||||
+ if ((true))
|
||||
+ return;
|
||||
+
|
||||
static const char kSampledGroup_Stable[] = "Sampled_NoSeed_Stable";
|
||||
static const char kSampledGroup_Other[] = "Sampled_NoSeed_Other";
|
||||
const char* sampled_group = kSampledGroup_Other;
|
||||
diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java
|
||||
--- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java
|
||||
+++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java
|
||||
@@ -51,7 +51,7 @@ public class VariationsSeedBridge {
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
- private static void clearFirstRunPrefs() {
|
||||
+ public static void clearFirstRunPrefs() {
|
||||
ContextUtils.getAppSharedPreferences()
|
||||
.edit()
|
||||
.remove(VARIATIONS_FIRST_RUN_SEED_BASE64)
|
||||
diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java
|
||||
--- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java
|
||||
+++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java
|
||||
@@ -80,7 +80,7 @@ public class VariationsSeedFetcher {
|
||||
}
|
||||
|
||||
private static final String VARIATIONS_SERVER_URL =
|
||||
- "https://clientservices.googleapis.com/chrome-variations/seed?osname=";
|
||||
+ "https://clientservices.9oo91apis.qjz9zk/chrome-variations/seed?osname=";
|
||||
|
||||
private static final int READ_TIMEOUT = 3000; // time in ms
|
||||
private static final int REQUEST_TIMEOUT = 1000; // time in ms
|
||||
@@ -337,29 +337,13 @@ public class VariationsSeedFetcher {
|
||||
*/
|
||||
public void fetchSeed(String restrictMode, String milestone, String channel) {
|
||||
assert !ThreadUtils.runningOnUiThread();
|
||||
- // Prevent multiple simultaneous fetches
|
||||
- synchronized (sLock) {
|
||||
- SharedPreferences prefs = ContextUtils.getAppSharedPreferences();
|
||||
- // Early return if an attempt has already been made to fetch the seed, even if it
|
||||
- // failed. Only attempt to get the initial Java seed once, since a failure probably
|
||||
- // indicates a network problem that is unlikely to be resolved by a second attempt.
|
||||
- // Note that VariationsSeedBridge.hasNativePref() is a pure Java function, reading an
|
||||
- // Android preference that is set when the seed is fetched by the native code.
|
||||
- if (prefs.getBoolean(VARIATIONS_INITIALIZED_PREF, false)
|
||||
- || VariationsSeedBridge.hasNativePref()) {
|
||||
- return;
|
||||
- }
|
||||
+ synchronized (sLock) {
|
||||
+ VariationsSeedBridge.clearFirstRunPrefs();
|
||||
|
||||
- SeedFetchInfo fetchInfo = downloadContent(
|
||||
- VariationsPlatform.ANDROID, restrictMode, milestone, channel, null);
|
||||
- if (fetchInfo.seedInfo != null) {
|
||||
- SeedInfo info = fetchInfo.seedInfo;
|
||||
- VariationsSeedBridge.setVariationsFirstRunSeed(info.seedData, info.signature,
|
||||
- info.country, info.date, info.isGzipCompressed);
|
||||
- }
|
||||
+ SharedPreferences prefs = ContextUtils.getAppSharedPreferences();
|
||||
// VARIATIONS_INITIALIZED_PREF should still be set to true when exceptions occur
|
||||
prefs.edit().putBoolean(VARIATIONS_INITIALIZED_PREF, true).apply();
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
|
||||
private void recordFetchResultOrCode(int resultOrCode) {
|
||||
@@ -402,7 +386,7 @@ public class VariationsSeedFetcher {
|
||||
* @param curSeedInfo optional currently saved seed info to set the `If-None-Match` header.
|
||||
* @return the object holds the request result and seed data with its related header fields.
|
||||
*/
|
||||
- public SeedFetchInfo downloadContent(@VariationsPlatform int platform, String restrictMode,
|
||||
+ private SeedFetchInfo downloadContent(@VariationsPlatform int platform, String restrictMode,
|
||||
String milestone, String channel, @Nullable SeedInfo curSeedInfo) {
|
||||
SeedFetchInfo fetchInfo = new SeedFetchInfo();
|
||||
HttpURLConnection connection = null;
|
||||
diff --git a/components/variations/net/omnibox_http_headers.cc b/components/variations/net/omnibox_http_headers.cc
|
||||
--- a/components/variations/net/omnibox_http_headers.cc
|
||||
+++ b/components/variations/net/omnibox_http_headers.cc
|
||||
@@ -21,7 +21,7 @@ const char kOmniboxOnDeviceSuggestionsHeader[] =
|
||||
// Whether to enable reporting the header. Included as a quick escape hatch in
|
||||
// case of crashes.
|
||||
const base::Feature kReportOmniboxOnDeviceSuggestionsHeader{
|
||||
- "ReportOmniboxOnDeviceSuggestionsHeader", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ "ReportOmniboxOnDeviceSuggestionsHeader", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
std::string GetHeaderValue() {
|
||||
const std::string group =
|
||||
diff --git a/components/variations/net/variations_http_headers.cc b/components/variations/net/variations_http_headers.cc
|
||||
--- a/components/variations/net/variations_http_headers.cc
|
||||
+++ b/components/variations/net/variations_http_headers.cc
|
||||
@@ -257,6 +257,9 @@ class VariationsHeaderHelper {
|
||||
VariationsHeaderHelper& operator=(const VariationsHeaderHelper&) = delete;
|
||||
|
||||
bool AppendHeaderIfNeeded(const GURL& url, InIncognito incognito) {
|
||||
+ if((true))
|
||||
+ return false;
|
||||
+
|
||||
AppendOmniboxOnDeviceSuggestionsHeaderIfNeeded(url, resource_request_);
|
||||
|
||||
// Note the criteria for attaching client experiment headers:
|
||||
diff --git a/components/variations/service/variations_field_trial_creator.cc b/components/variations/service/variations_field_trial_creator.cc
|
||||
--- a/components/variations/service/variations_field_trial_creator.cc
|
||||
+++ b/components/variations/service/variations_field_trial_creator.cc
|
||||
@@ -159,7 +159,8 @@ Study::CpuArchitecture GetCurrentCpuArchitecture() {
|
||||
// "--variations-server-url" switches are passed. It is however possible to
|
||||
// apply the testing config as well as specify additional field trials (using
|
||||
// "--force-fieldtrials") by using the "--enable-field-trial-config" switch.
|
||||
-bool ShouldUseFieldTrialTestingConfig(const base::CommandLine* command_line) {
|
||||
+bool ShouldUseFieldTrialTestingConfig(const base::CommandLine* command_line) { // disabled in Bromite
|
||||
+ if ((true)) return false;
|
||||
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
return command_line->HasSwitch(switches::kEnableFieldTrialTestingConfig);
|
||||
#else
|
||||
diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc
|
||||
--- a/components/variations/service/variations_service.cc
|
||||
+++ b/components/variations/service/variations_service.cc
|
||||
@@ -235,17 +235,8 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers,
|
||||
@@ -240,17 +240,7 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers,
|
||||
// Variations seed fetching is only enabled in official Chrome builds, if a URL
|
||||
// is specified on the command line, and for testing.
|
||||
bool IsFetchingEnabled() {
|
||||
@@ -195,12 +24,11 @@ diff --git a/components/variations/service/variations_service.cc b/components/va
|
||||
- }
|
||||
-#endif
|
||||
- return true;
|
||||
+ // set to false even if not used on Android
|
||||
+ return false;
|
||||
}
|
||||
|
||||
std::unique_ptr<SeedResponse> MaybeImportFirstRunSeed(
|
||||
@@ -603,7 +594,7 @@ bool VariationsService::DoFetchFromURL(const GURL& url, bool is_http_retry) {
|
||||
@@ -610,7 +600,7 @@ bool VariationsService::DoFetchFromURL(const GURL& url, bool is_http_retry) {
|
||||
// debugger or if the machine was suspended) and OnURLFetchComplete() hasn't
|
||||
// had a chance to run yet from the previous request. In this case, don't
|
||||
// start a new request and just let the previous one finish.
|
||||
@@ -209,5 +37,6 @@ diff --git a/components/variations/service/variations_service.cc b/components/va
|
||||
return false;
|
||||
|
||||
last_request_was_http_retry_ = is_http_retry;
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 19 Feb 2022 12:01:33 +0100
|
||||
Subject: Disable idle detection
|
||||
|
||||
---
|
||||
content/public/common/content_features.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
|
||||
--- a/content/public/common/content_features.cc
|
||||
+++ b/content/public/common/content_features.cc
|
||||
@@ -426,7 +426,7 @@ const base::Feature kGreaseUACH{"GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
// this feature, the experimental web platform features flag should be set,
|
||||
// or the site should obtain an Origin Trial token.
|
||||
const base::Feature kIdleDetection{"IdleDetection",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// Historically most navigations required IPC from browser to renderer and
|
||||
// from renderer back to browser. This was done to check for before-unload
|
||||
--
|
||||
2.25.1
|
||||
@@ -16,5 +16,6 @@ diff --git a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc b/c
|
||||
- registry->RegisterBooleanPref(omnibox::kLockIconInAddressBarEnabled, false);
|
||||
+ registry->RegisterBooleanPref(omnibox::kLockIconInAddressBarEnabled, true);
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -3,16 +3,17 @@ Date: Thu, 4 Jul 2019 19:08:52 -0400
|
||||
Subject: Disable media router and remoting by default
|
||||
|
||||
---
|
||||
.../media/router/media_router_feature.cc | 27 ++++++-------------
|
||||
.../media/router/media_router_feature.cc | 25 ++++++-------------
|
||||
chrome/browser/profiles/profile.cc | 2 +-
|
||||
chrome/browser/profiles/profile_impl.cc | 2 +-
|
||||
2 files changed, 9 insertions(+), 20 deletions(-)
|
||||
3 files changed, 9 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc
|
||||
--- a/chrome/browser/media/router/media_router_feature.cc
|
||||
+++ b/chrome/browser/media/router/media_router_feature.cc
|
||||
@@ -50,26 +50,15 @@ const base::Feature kGlobalMediaControlsCastStartStop{
|
||||
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
@@ -37,26 +37,15 @@ const base::Feature kAllowAllSitesToInitiateMirroring{
|
||||
"AllowAllSitesToInitiateMirroring", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
#endif // !defined(OS_ANDROID)
|
||||
|
||||
-namespace {
|
||||
-const PrefService::Preference* GetMediaRouterPref(
|
||||
@@ -40,38 +41,42 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#if !defined(OS_ANDROID)
|
||||
if (!base::FeatureList::IsEnabled(kMediaRouter))
|
||||
return false;
|
||||
@@ -93,7 +82,7 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
|
||||
@@ -80,7 +69,7 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
|
||||
return allowed;
|
||||
}
|
||||
return true;
|
||||
-}
|
||||
+}*/
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#if !defined(OS_ANDROID)
|
||||
void RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
|
||||
@@ -106,7 +95,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
||||
PrefRegistry::PUBLIC);
|
||||
|
||||
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
|
||||
--- a/chrome/browser/profiles/profile.cc
|
||||
+++ b/chrome/browser/profiles/profile.cc
|
||||
@@ -356,7 +356,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
media_router::prefs::kMediaRouterEnableCloudServices, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(
|
||||
- media_router::prefs::kMediaRouterMediaRemotingEnabled, true);
|
||||
+ media_router::prefs::kMediaRouterMediaRemotingEnabled, false); // disabled in Bromite
|
||||
+ media_router::prefs::kMediaRouterMediaRemotingEnabled, false);
|
||||
registry->RegisterListPref(
|
||||
media_router::prefs::kMediaRouterTabMirroringSources);
|
||||
|
||||
#endif
|
||||
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
||||
--- a/chrome/browser/profiles/profile_impl.cc
|
||||
+++ b/chrome/browser/profiles/profile_impl.cc
|
||||
@@ -417,7 +417,7 @@ void ProfileImpl::RegisterProfilePrefs(
|
||||
@@ -434,7 +434,7 @@ void ProfileImpl::RegisterProfilePrefs(
|
||||
#endif
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
|
||||
- registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kEnableMediaRouter, false);
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
#if !defined(OS_ANDROID)
|
||||
registry->RegisterBooleanPref(prefs::kShowCastIconInToolbar, false);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
--
|
||||
2.25.1
|
||||
#endif // !defined(OS_ANDROID)
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Wed, 20 Feb 2019 21:41:26 +0100
|
||||
Subject: Disable metrics collection for NTP tiles
|
||||
|
||||
---
|
||||
.../browser/android/ntp/most_visited_sites_bridge.cc | 10 ++--------
|
||||
components/ntp_tiles/BUILD.gn | 3 ---
|
||||
2 files changed, 2 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "chrome/browser/profiles/profile_android.h"
|
||||
#include "components/favicon_base/favicon_types.h"
|
||||
#include "components/history/core/browser/history_service.h"
|
||||
-#include "components/ntp_tiles/metrics.h"
|
||||
#include "components/ntp_tiles/most_visited_sites.h"
|
||||
#include "components/ntp_tiles/section_type.h"
|
||||
#include "ui/gfx/android/java_bitmap.h"
|
||||
@@ -45,7 +44,6 @@ using ntp_tiles::NTPTilesVector;
|
||||
using ntp_tiles::SectionType;
|
||||
using ntp_tiles::TileTitleSource;
|
||||
using ntp_tiles::TileSource;
|
||||
-using ntp_tiles::TileVisualType;
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -233,7 +231,6 @@ void MostVisitedSitesBridge::RecordPageImpression(
|
||||
JNIEnv* env,
|
||||
const JavaParamRef<jobject>& obj,
|
||||
jint jtiles_count) {
|
||||
- ntp_tiles::metrics::RecordPageImpression(jtiles_count);
|
||||
}
|
||||
|
||||
void MostVisitedSitesBridge::RecordTileImpression(
|
||||
@@ -245,6 +242,7 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
jint jtitle_source,
|
||||
jint jsource,
|
||||
const JavaParamRef<jobject>& jurl) {
|
||||
+#if 0
|
||||
std::unique_ptr<GURL> url = url::GURLAndroid::ToNativeGURL(env, jurl);
|
||||
TileTitleSource title_source = static_cast<TileTitleSource>(jtitle_source);
|
||||
TileSource source = static_cast<TileSource>(jsource);
|
||||
@@ -254,6 +252,7 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
|
||||
ntp_tiles::metrics::RecordTileImpression(ntp_tiles::NTPTileImpression(
|
||||
jindex, source, title_source, visual_type, icon_type, *url));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
@@ -263,11 +262,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
jint tile_type,
|
||||
jint title_source,
|
||||
jint source) {
|
||||
- ntp_tiles::metrics::RecordTileClick(ntp_tiles::NTPTileImpression(
|
||||
- index, static_cast<TileSource>(source),
|
||||
- static_cast<TileTitleSource>(title_source),
|
||||
- static_cast<TileVisualType>(tile_type), favicon_base::IconType::kInvalid,
|
||||
- /*url_for_rappor=*/GURL()));
|
||||
}
|
||||
|
||||
static jlong JNI_MostVisitedSitesBridge_Init(
|
||||
diff --git a/components/ntp_tiles/BUILD.gn b/components/ntp_tiles/BUILD.gn
|
||||
--- a/components/ntp_tiles/BUILD.gn
|
||||
+++ b/components/ntp_tiles/BUILD.gn
|
||||
@@ -20,8 +20,6 @@ static_library("ntp_tiles") {
|
||||
"icon_cacher.h",
|
||||
"icon_cacher_impl.cc",
|
||||
"icon_cacher_impl.h",
|
||||
- "metrics.cc",
|
||||
- "metrics.h",
|
||||
"most_visited_sites.cc",
|
||||
"most_visited_sites.h",
|
||||
"ntp_tile.cc",
|
||||
@@ -83,7 +81,6 @@ source_set("unit_tests") {
|
||||
"custom_links_manager_impl_unittest.cc",
|
||||
"custom_links_store_unittest.cc",
|
||||
"icon_cacher_impl_unittest.cc",
|
||||
- "metrics_unittest.cc",
|
||||
"most_visited_sites_unittest.cc",
|
||||
"popular_sites_impl_unittest.cc",
|
||||
]
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Wed, 25 Apr 2018 10:23:51 +0200
|
||||
Subject: Disable metrics on all I/O threads
|
||||
|
||||
---
|
||||
chrome/browser/browser_process_impl.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
|
||||
--- a/chrome/browser/browser_process_impl.cc
|
||||
+++ b/chrome/browser/browser_process_impl.cc
|
||||
@@ -965,7 +965,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled,
|
||||
- GoogleUpdateSettings::GetCollectStatsConsent());
|
||||
+ false);
|
||||
registry->RegisterBooleanPref(prefs::kDevToolsRemoteDebuggingAllowed, true);
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 27 Feb 2022 23:58:22 +0100
|
||||
Subject: Disable minidump upload scheduling
|
||||
|
||||
---
|
||||
chrome/browser/endpoint_fetcher/endpoint_fetcher.cc | 2 +-
|
||||
.../minidump_uploader/MinidumpUploadJobService.java | 5 ++++-
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
|
||||
--- a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
|
||||
+++ b/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
|
||||
@@ -337,7 +337,7 @@ void EndpointFetcher::OnResponseFetched(
|
||||
auto response = std::make_unique<EndpointResponse>();
|
||||
// TODO(crbug.com/993393) Add more detailed error messaging
|
||||
std::string net_error = net::ErrorToString(simple_url_loader_->NetError());
|
||||
- VLOG(1) << __func__ << " with response error: " << net_error;
|
||||
+ LOG(ERROR) << __func__ << " with response error: " << net_error;
|
||||
response->response = "There was a response error";
|
||||
simple_url_loader_.reset();
|
||||
std::move(endpoint_fetcher_callback).Run(std::move(response));
|
||||
diff --git a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java
|
||||
--- a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java
|
||||
+++ b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java
|
||||
@@ -44,7 +44,10 @@ public abstract class MinidumpUploadJobService extends JobService {
|
||||
* to build an upload job for scheduling.
|
||||
*/
|
||||
public static void scheduleUpload(JobInfo.Builder jobInfoBuilder) {
|
||||
- Log.i(TAG, "Scheduling upload of all pending minidumps.");
|
||||
+ Log.i(TAG, "Scheduling upload of all pending minidumps is disabled.");
|
||||
+ if ((true)) {
|
||||
+ return;
|
||||
+ }
|
||||
JobScheduler scheduler =
|
||||
(JobScheduler) ContextUtils.getApplicationContext().getSystemService(
|
||||
Context.JOB_SCHEDULER_SERVICE);
|
||||
--
|
||||
2.25.1
|
||||
+5
-3
@@ -1,6 +1,7 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 30 May 2019 03:37:45 +0200
|
||||
Subject: Disable offline pages in CCT
|
||||
Subject: Disable offline pages in the downloads home to be opened in CCT by
|
||||
default
|
||||
|
||||
---
|
||||
components/offline_pages/core/offline_page_feature.cc | 2 +-
|
||||
@@ -18,5 +19,6 @@ diff --git a/components/offline_pages/core/offline_page_feature.cc b/components/
|
||||
|
||||
const base::Feature kOfflineIndicatorFeature{"OfflineIndicator",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -23,7 +23,7 @@ diff --git a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc b/c
|
||||
diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc
|
||||
--- a/components/url_formatter/url_formatter.cc
|
||||
+++ b/components/url_formatter/url_formatter.cc
|
||||
@@ -492,13 +492,13 @@ bool HasTwoViewSourceSchemes(base::StringPiece spec) {
|
||||
@@ -463,13 +463,13 @@ ComponentResult IDNToUnicodeOneComponent(
|
||||
} // namespace
|
||||
|
||||
const FormatUrlType kFormatUrlOmitNothing = 0;
|
||||
@@ -44,5 +44,6 @@ diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatte
|
||||
const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8;
|
||||
|
||||
const FormatUrlType kFormatUrlOmitDefaults =
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -3,21 +3,25 @@ Date: Thu, 22 Mar 2018 22:38:00 +0100
|
||||
Subject: Disable plugins enumeration
|
||||
|
||||
---
|
||||
third_party/blink/renderer/core/frame/local_frame.cc | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
third_party/blink/renderer/core/frame/local_frame.cc | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -1913,9 +1913,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
|
||||
@@ -1851,10 +1851,8 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
|
||||
}
|
||||
|
||||
PluginData* LocalFrame::GetPluginData() const {
|
||||
- if (!Loader().AllowPlugins())
|
||||
return nullptr;
|
||||
- return GetPage()->GetPluginData();
|
||||
- return nullptr;
|
||||
- return GetPage()->GetPluginData(
|
||||
- Tree().Top().GetSecurityContext()->GetSecurityOrigin());
|
||||
+ // what about no
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
void LocalFrame::SetAdTrackerForTesting(AdTracker* ad_tracker) {
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Subject: Disable references to fonts.googleapis.com
|
||||
diff --git a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
|
||||
--- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
|
||||
+++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
|
||||
@@ -298,7 +298,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest(
|
||||
@@ -300,7 +300,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest(
|
||||
std::string DomDistillerViewerSource::GetContentSecurityPolicy(
|
||||
network::mojom::CSPDirectiveName directive) {
|
||||
if (directive == network::mojom::CSPDirectiveName::StyleSrc) {
|
||||
@@ -58,5 +58,6 @@ diff --git a/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css b/th
|
||||
|
||||
body,
|
||||
table,
|
||||
--
|
||||
2.25.1
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 27 Oct 2019 10:21:19 +0100
|
||||
Subject: Disable requests for single-word Omnibar searches
|
||||
|
||||
Patch from https://github.com/Eloston/ungoogled-chromium/issues/814#issuecomment-526873727
|
||||
---
|
||||
.../ui/omnibox/chrome_omnibox_navigation_observer.cc | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
|
||||
--- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
|
||||
+++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc
|
||||
@@ -251,13 +251,6 @@ ChromeOmniboxNavigationObserver::ChromeOmniboxNavigationObserver(
|
||||
profile_(profile),
|
||||
show_infobar_(std::move(show_infobar)) {
|
||||
NavigationUserData::CreateForNavigationHandle(navigation, this);
|
||||
- if (alternative_nav_match_.destination_url.is_valid()) {
|
||||
- loader_ = std::make_unique<AlternativeNavigationURLLoader>(
|
||||
- alternative_nav_match.destination_url, this,
|
||||
- base::BindOnce(
|
||||
- &ChromeOmniboxNavigationObserver::OnAlternativeLoaderDone, this),
|
||||
- GetURLLoaderFactory(loader_factory, profile));
|
||||
- }
|
||||
}
|
||||
|
||||
ChromeOmniboxNavigationObserver::~ChromeOmniboxNavigationObserver() {
|
||||
--
|
||||
2.25.1
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,120 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 6 Mar 2022 17:39:15 +0100
|
||||
Subject: Disable safety check
|
||||
|
||||
---
|
||||
chrome/android/BUILD.gn | 5 -----
|
||||
chrome/android/chrome_java_sources.gni | 1 -
|
||||
.../browser/app/omnibox/OmniboxPedalDelegateImpl.java | 8 --------
|
||||
.../chrome/browser/settings/SettingsActivity.java | 6 ------
|
||||
chrome/browser/BUILD.gn | 1 -
|
||||
5 files changed, 21 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
||||
--- a/chrome/android/BUILD.gn
|
||||
+++ b/chrome/android/BUILD.gn
|
||||
@@ -405,7 +405,6 @@ android_library("chrome_java") {
|
||||
"//chrome/browser/privacy_sandbox/android:java",
|
||||
"//chrome/browser/profiles/android:java",
|
||||
"//chrome/browser/safe_browsing/android:java",
|
||||
- "//chrome/browser/safety_check/android:java",
|
||||
"//chrome/browser/search_engines/android:java",
|
||||
"//chrome/browser/segmentation_platform:factory_java",
|
||||
"//chrome/browser/settings:java",
|
||||
@@ -999,8 +998,6 @@ junit_binary("chrome_junit_tests") {
|
||||
"//chrome/browser/preferences:java",
|
||||
"//chrome/browser/preferences:preferences_junit_tests",
|
||||
"//chrome/browser/profiles/android:java",
|
||||
- "//chrome/browser/safety_check/android:java",
|
||||
- "//chrome/browser/safety_check/android:junit",
|
||||
"//chrome/browser/search_engines/android:java",
|
||||
"//chrome/browser/share:java",
|
||||
"//chrome/browser/signin/services/android:java",
|
||||
@@ -1380,8 +1377,6 @@ android_library("chrome_test_java") {
|
||||
"//chrome/browser/profiles/android:java",
|
||||
"//chrome/browser/safe_browsing/android:java",
|
||||
"//chrome/browser/safe_browsing/android:javatests",
|
||||
- "//chrome/browser/safety_check/android:java",
|
||||
- "//chrome/browser/safety_check/android:javatests",
|
||||
"//chrome/browser/search_engines/android:java",
|
||||
"//chrome/browser/settings:java",
|
||||
"//chrome/browser/settings:javatests",
|
||||
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
|
||||
--- a/chrome/android/chrome_java_sources.gni
|
||||
+++ b/chrome/android/chrome_java_sources.gni
|
||||
@@ -941,7 +941,6 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingPasswordReuseDialogBridge.java",
|
||||
"java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingReferringAppBridge.java",
|
||||
"java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingSettingsLauncher.java",
|
||||
- "java/src/org/chromium/chrome/browser/safety_check/SafetyCheckUpdatesDelegateImpl.java",
|
||||
"java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java",
|
||||
"java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java",
|
||||
"java/src/org/chromium/chrome/browser/searchwidget/SearchBoxDataProvider.java",
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/omnibox/OmniboxPedalDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/omnibox/OmniboxPedalDelegateImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/omnibox/OmniboxPedalDelegateImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/omnibox/OmniboxPedalDelegateImpl.java
|
||||
@@ -27,7 +27,6 @@ import org.chromium.chrome.browser.omnibox.suggestions.OmniboxPedalDelegate;
|
||||
import org.chromium.chrome.browser.omnibox.suggestions.pedal.PedalSuggestionViewProperties.PedalIcon;
|
||||
import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer;
|
||||
import org.chromium.chrome.browser.password_manager.PasswordManagerLauncher;
|
||||
-import org.chromium.chrome.browser.safety_check.SafetyCheckSettingsFragment;
|
||||
import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
|
||||
import org.chromium.components.browser_ui.accessibility.AccessibilitySettings;
|
||||
import org.chromium.components.browser_ui.settings.SettingsLauncher;
|
||||
@@ -77,12 +76,6 @@ public class OmniboxPedalDelegateImpl implements OmniboxPedalDelegate {
|
||||
startActivity(intent);
|
||||
}
|
||||
break;
|
||||
- case OmniboxPedalType.RUN_CHROME_SAFETY_CHECK:
|
||||
- settingsLauncher.launchSettingsActivity(mActivity,
|
||||
- SafetyCheckSettingsFragment.class,
|
||||
- SafetyCheckSettingsFragment.createBundle(
|
||||
- /*runSafetyCheckImmediately=*/true));
|
||||
- break;
|
||||
case OmniboxPedalType.MANAGE_SITE_SETTINGS:
|
||||
settingsLauncher.launchSettingsActivity(mActivity, SiteSettings.class);
|
||||
break;
|
||||
@@ -158,7 +151,6 @@ public class OmniboxPedalDelegateImpl implements OmniboxPedalDelegate {
|
||||
case OmniboxPedalType.MANAGE_PASSWORDS:
|
||||
case OmniboxPedalType.UPDATE_CREDIT_CARD:
|
||||
case OmniboxPedalType.LAUNCH_INCOGNITO:
|
||||
- case OmniboxPedalType.RUN_CHROME_SAFETY_CHECK:
|
||||
case OmniboxPedalType.MANAGE_SITE_SETTINGS:
|
||||
case OmniboxPedalType.MANAGE_CHROME_SETTINGS:
|
||||
case OmniboxPedalType.VIEW_CHROME_HISTORY:
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
|
||||
@@ -56,9 +56,6 @@ import org.chromium.chrome.browser.privacy_sandbox.FlocSettingsFragment;
|
||||
import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment;
|
||||
import org.chromium.chrome.browser.profiles.Profile;
|
||||
import org.chromium.chrome.browser.profiles.ProfileManagerUtils;
|
||||
-import org.chromium.chrome.browser.safety_check.SafetyCheckCoordinator;
|
||||
-import org.chromium.chrome.browser.safety_check.SafetyCheckSettingsFragment;
|
||||
-import org.chromium.chrome.browser.safety_check.SafetyCheckUpdatesDelegateImpl;
|
||||
import org.chromium.chrome.browser.search_engines.settings.SearchEngineSettings;
|
||||
import org.chromium.chrome.browser.site_settings.ChromeSiteSettingsDelegate;
|
||||
import org.chromium.chrome.browser.ui.messages.snackbar.INeedSnackbarManager;
|
||||
@@ -370,9 +367,6 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
|
||||
fragmentHelpAndFeedbackLauncher.setHelpAndFeedbackLauncher(
|
||||
HelpAndFeedbackLauncherImpl.getInstance());
|
||||
}
|
||||
- if (fragment instanceof SafetyCheckSettingsFragment) {
|
||||
- // not supported
|
||||
- }
|
||||
if (fragment instanceof PasswordCheckFragmentView) {
|
||||
PasswordCheckComponentUiFactory.create((PasswordCheckFragmentView) fragment,
|
||||
HelpAndFeedbackLauncherImpl.getInstance(), mSettingsLauncher,
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -3370,7 +3370,6 @@ static_library("browser") {
|
||||
"//chrome/browser/privacy_sandbox/android:jni_headers",
|
||||
"//chrome/browser/reading_list/android",
|
||||
"//chrome/browser/safe_browsing/android:safe_browsing_enums",
|
||||
- "//chrome/browser/safety_check/android",
|
||||
"//chrome/browser/share/android:jni_headers",
|
||||
"//chrome/browser/signin/services/android:jni_headers",
|
||||
"//chrome/browser/sync/android:jni_headers",
|
||||
--
|
||||
2.25.1
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user