Compare commits
126
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9662da1da9 | ||
|
|
bdf169a864 | ||
|
|
62455cbd5a | ||
|
|
57634d6021 | ||
|
|
be7404a961 | ||
|
|
d804ba7400 | ||
|
|
986d04a2c9 | ||
|
|
23485dc259 | ||
|
|
a865bcdedd | ||
|
|
3a9a367259 | ||
|
|
ea53b99aa1 | ||
|
|
631072f5d6 | ||
|
|
6d9c47e8e6 | ||
|
|
d65477e14a | ||
|
|
5b28504837 | ||
|
|
90635707e9 | ||
|
|
5daca63561 | ||
|
|
9b30907ddd | ||
|
|
576f8eb7d0 | ||
|
|
bfd783f62a | ||
|
|
21c6b87914 | ||
|
|
6717730428 | ||
|
|
46985eced7 | ||
|
|
d0e9d700f1 | ||
|
|
bc58f108fc | ||
|
|
5da292bc15 | ||
|
|
34bc3555dc | ||
|
|
74767e397a | ||
|
|
67dc28859d | ||
|
|
c65e5bbda4 | ||
|
|
ce75c13b20 | ||
|
|
a6df80f815 | ||
|
|
15e75eeb88 | ||
|
|
5dd2efd498 | ||
|
|
28c2972673 | ||
|
|
6dbdeec051 | ||
|
|
90a40e41a8 | ||
|
|
f241d0183c | ||
|
|
5479f2e978 | ||
|
|
bec74e52f4 | ||
|
|
d1e398ce3a | ||
|
|
225e19cf99 | ||
|
|
ae1fec5f3e | ||
|
|
96671ab221 | ||
|
|
166c05b5c5 | ||
|
|
f513eb76ec | ||
|
|
2de59b6a0c | ||
|
|
4eff892d17 | ||
|
|
a634e3ac81 | ||
|
|
84a9001629 | ||
|
|
265ab75e24 | ||
|
|
f82057aabf | ||
|
|
ab94462f0a | ||
|
|
08874f25ee | ||
|
|
ae8ad945c1 | ||
|
|
47f4e2f650 | ||
|
|
c1ecd4c36a | ||
|
|
398a3aa344 | ||
|
|
95e1be4eb2 | ||
|
|
f210af1b51 | ||
|
|
c63223848d | ||
|
|
d9ebf3fd67 | ||
|
|
e9f00816c3 | ||
|
|
9fd6b12319 | ||
|
|
a7e311242a | ||
|
|
746bf414a2 | ||
|
|
4c4dd71824 | ||
|
|
08f4eacdff | ||
|
|
a52d7ffd83 | ||
|
|
6f3ded493a | ||
|
|
b6ed0c18db | ||
|
|
3be92ec2b6 | ||
|
|
dd87f6cf0a | ||
|
|
65bd5c1df9 | ||
|
|
45df4acfe5 | ||
|
|
c8825825e4 | ||
|
|
15f047e484 | ||
|
|
0170036187 | ||
|
|
fe93fa8497 | ||
|
|
88030934c7 | ||
|
|
2140ce4f53 | ||
|
|
0132b51132 | ||
|
|
41f3eb6400 | ||
|
|
154ff73784 | ||
|
|
6981d4ee4c | ||
|
|
3c9c050df0 | ||
|
|
119088d986 | ||
|
|
d12c186bbc | ||
|
|
95dca6a146 | ||
|
|
3c510a3a8e | ||
|
|
7f15412ae0 | ||
|
|
406bedb7a2 | ||
|
|
c696b6f939 | ||
|
|
97ad845a27 | ||
|
|
a6ca6a5cee | ||
|
|
7c25daa521 | ||
|
|
f5275180b4 | ||
|
|
e7d8daac10 | ||
|
|
7c6ba84acd | ||
|
|
8d85bfa7d0 | ||
|
|
152903d847 | ||
|
|
4fad3bf5bc | ||
|
|
1cc0dfb1ff | ||
|
|
0d00af6e73 | ||
|
|
b902ec74ad | ||
|
|
e9ba098f8e | ||
|
|
410fc50a21 | ||
|
|
24320da307 | ||
|
|
8d85b59eac | ||
|
|
00411eb209 | ||
|
|
a56884e75e | ||
|
|
1f363eba23 | ||
|
|
6f5d36bc5c | ||
|
|
a500255598 | ||
|
|
af8378b675 | ||
|
|
3c916480b2 | ||
|
|
dbf32840c6 | ||
|
|
4b8e47060b | ||
|
|
43bf98a956 | ||
|
|
b94b80e096 | ||
|
|
52202a3ffb | ||
|
|
4e5c7c36a1 | ||
|
|
d1fb4d4974 | ||
|
|
edaf4c0f17 | ||
|
|
4a9cbe673d | ||
|
|
6340bb4398 |
@@ -4,9 +4,16 @@ 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?
|
||||
-->
|
||||
|
||||
### Bromite version
|
||||
|
||||
Version: `76.0...`
|
||||
Version: `83.0...`
|
||||
Arch: `arm` or `arm64` or `x86`
|
||||
Android version: (example: `9.0`)
|
||||
Device model: (example: `SM-G960UZKABST`)
|
||||
@@ -14,37 +21,41 @@ Device model: (example: `SM-G960UZKABST`)
|
||||
### Is this bug about the SystemWebView?
|
||||
Yes/No
|
||||
|
||||
No support for SystemWebView installations is provided.
|
||||
<!-- No support for SystemWebView installations is provided. -->
|
||||
|
||||
### Is the bug reproducible with latest version?
|
||||
|
||||
Do not report bugs which are not reproducible with latest version
|
||||
<!-- Do not report bugs which are not reproducible with latest version. -->
|
||||
|
||||
### 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.
|
||||
-->
|
||||
|
||||
### Is the bug a crash?
|
||||
|
||||
<!--
|
||||
If yes then individuate and post the logcat dump (remove privacy sensitive information, if any), otherwise remove this section.
|
||||
-->
|
||||
|
||||
### Describe the bug
|
||||
|
||||
Write here a clear and concise description of the bug.
|
||||
<!-- Write here a clear and concise description of the bug. -->
|
||||
|
||||
### Steps to reproduce the bug
|
||||
|
||||
Steps to reproduce the behavior:
|
||||
Steps to reproduce the bug:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
2. Click on '...'
|
||||
3. Scroll down to '...'
|
||||
4. See error
|
||||
|
||||
### Expected behavior
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
<!-- 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.
|
||||
<!-- If applicable, add screenshots to help explain your problem. Otherwise remove this section. -->
|
||||
|
||||
@@ -4,20 +4,29 @@ 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
|
||||
-->
|
||||
|
||||
<!-- 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 unlikely to be considered.
|
||||
<!-- 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.
|
||||
<!-- 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.
|
||||
<!-- 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.
|
||||
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.
|
||||
<!-- A clear and concise description of any alternative solutions or features you have considered. -->
|
||||
|
||||
+156
@@ -1,3 +1,158 @@
|
||||
# 85.0.4183.94
|
||||
* disable the DIAL repeating discovery
|
||||
* removed patch for session-only cookies support
|
||||
* add timezone customization patch (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/331)
|
||||
* fixed bug happening when configuring proxies in incognito mode (thanks to @uazo)
|
||||
|
||||
# 85.0.4183.86
|
||||
* fix LocationBarPhone app crash at startup (fixes https://github.com/bromite/bromite/issues/565)
|
||||
|
||||
# 85.0.4183.84
|
||||
* fix crash in About page (fixes https://github.com/bromite/bromite/issues/710)
|
||||
* fix adding more than one proxy (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/679)
|
||||
* fix system proxy configuration (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/377)
|
||||
|
||||
# 85.0.4183.82
|
||||
* fixes bookmark button not working with always-incognito (fixes https://github.com/bromite/bromite/issues/654)
|
||||
* disable scroll-to-text-fragment
|
||||
* remove NTP blocklisted URLs when adding an URL as bookmark
|
||||
* removed duet flags
|
||||
* unexpire `#darken-websites-checkbox-in-themes-setting` flag
|
||||
* rollback dav1d upgrade which breaks x86
|
||||
|
||||
# 84.0.4147.132
|
||||
* fix exit menu item not always working (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/673)
|
||||
* session-only cookies site settings option (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/142)
|
||||
* add setting to enable history on incognito mode (thanks to @uazo)
|
||||
* removed old non-working site settings patches
|
||||
|
||||
# 84.0.4147.121
|
||||
* removed Qwant search engine
|
||||
* fixed zh_CN translations
|
||||
* added patch to not embed non-free unrar library (fixes https://github.com/bromite/bromite/issues/674)
|
||||
* enable improved cookie controls by default
|
||||
|
||||
# 84.0.4147.119
|
||||
* update zh_CN translations
|
||||
* disable CORS RFC1918 (fixes https://github.com/bromite/bromite/issues/664)
|
||||
* restore duet flags (fixes https://github.com/bromite/bromite/issues/667)
|
||||
|
||||
# 84.0.4147.113
|
||||
* block gateway attacks via websockets (fixes https://github.com/bromite/bromite/issues/590)
|
||||
* enable prefetch-privacy-changes by default (fixes https://github.com/bromite/bromite/issues/659)
|
||||
* enable reduced-referrer-granularity by default (fixes https://github.com/bromite/bromite/issues/659)
|
||||
|
||||
# 84.0.4147.106
|
||||
* fixed bug with Javascript site settings not showing
|
||||
* add exit menu item to overview menu (fixes https://github.com/bromite/bromite/issues/619)
|
||||
|
||||
# 84.0.4147.95
|
||||
* show warnings for TLSv1.0/TLSv1.1 connections (fixes https://github.com/bromite/bromite/issues/645)
|
||||
* fix bug with unconfigured DoH (fixes https://github.com/bromite/bromite/issues/646)
|
||||
|
||||
# 84.0.4147.90
|
||||
* added menu item to view source of current page
|
||||
* fixed dialog for SSL/TLS errors (fixes https://github.com/bromite/bromite/issues/638)
|
||||
* build with feeds support due to upstream build flags combination bugs
|
||||
|
||||
# 83.0.4103.119
|
||||
* restored non-CFI builds for x86
|
||||
|
||||
# 83.0.4103.101
|
||||
* enable HEVC and Dolby Vision
|
||||
|
||||
# 83.0.4103.93
|
||||
* fix undesired replacement for search engines (fixes https://github.com/bromite/bromite/issues/595)
|
||||
* fix resume flag not visible
|
||||
|
||||
# 83.0.4103.76
|
||||
* fixed inverted Omnibox flag
|
||||
* fixed LocationBarPhone/LocationBarTablet crash (fixes https://github.com/bromite/bromite/issues/565)
|
||||
|
||||
# 83.0.4103.53
|
||||
* updated zh_CN translations
|
||||
* mitigation for LocationBarPhone crash (https://github.com/bromite/bromite/issues/565)
|
||||
|
||||
# 83.0.4103.46
|
||||
* add zh_CN missing translations (fixes https://github.com/bromite/bromite/issues/546)
|
||||
* change default mode for WebRTC (fixes https://github.com/bromite/bromite/issues/553)
|
||||
* add flag to allow screenshots of incognito tabs (fixes https://github.com/bromite/bromite/issues/551)
|
||||
* reintroduced patches for disabling AImageReader
|
||||
* fixed DevTools issue with domain substitution (fixes https://github.com/bromite/bromite/issues/526)
|
||||
* drop patch to disable QUIC by default
|
||||
* drop patch for DoH minimum timeout (upstream also implemented it)
|
||||
* dropped patch for removal of support of CCT dynamic modules (upstream also removed it)
|
||||
* removed upstream patch for SD card not found issue (upstream merged it)
|
||||
|
||||
# 81.0.4044.127
|
||||
* fix always-incognito crashes (https://github.com/bromite/bromite/issues/135 and https://github.com/bromite/bromite/pull/529)
|
||||
* improved crash uploader mock by calling done callback
|
||||
|
||||
# 81.0.4044.106
|
||||
* remove option to add NTP as homepage (fixes https://github.com/bromite/bromite/issues/517)
|
||||
|
||||
# 81.0.4044.97
|
||||
* disable browser auto-login by default
|
||||
* show download prompt again
|
||||
|
||||
# 81.0.4044.83
|
||||
|
||||
# 81.0.4044.76
|
||||
|
||||
# 81.0.4044.70
|
||||
* backport surface control fix (fixes https://github.com/bromite/bromite/issues/445)
|
||||
|
||||
# 81.0.4044.63
|
||||
* use upstream fix for SD card not found issue (fixes https://github.com/bromite/bromite/issues/485)
|
||||
* do not compile QR code sharing
|
||||
* remove obsolete patch for GCM experiment status
|
||||
* drop 2 patches for AImageReader crash fix (upstream has the same revert patches)
|
||||
|
||||
# 80.0.3987.118
|
||||
* disable AImageReader for all ARM64 devices (fixes https://github.com/bromite/bromite/issues/497)
|
||||
* use upstream possible workaround for SD card not found issue (fixes https://github.com/bromite/bromite/issues/485)
|
||||
|
||||
# 80.0.3987.109
|
||||
* restored GPU workaround for the ARM/ARM64 AImageReader crash (https://github.com/bromite/bromite/issues/445)
|
||||
|
||||
# 80.0.3987.95
|
||||
* enable user-agent freeze (fixes https://github.com/bromite/bromite/issues/483)
|
||||
* fix issue with AMP (fixes https://github.com/bromite/bromite/issues/488)
|
||||
* fix crash on home page (fixes https://github.com/bromite/bromite/issues/484)
|
||||
|
||||
# 80.0.3987.78
|
||||
* removed ungoogled-chromium patch for non-remote developer tools resources
|
||||
* removed patch for 64-bit webview (it is now a default from upstream)
|
||||
* removed patch for enabling dark mode menu entry by default (it is now a default from upstream)
|
||||
* removed patch for enabling download rename by default (it is now a default from upstream)
|
||||
* removed some redundant Iridium safe browsing patches
|
||||
|
||||
# 79.0.3945.139
|
||||
* remove patch to automatically disable video decoding acceleration on Android 10+ and arm64
|
||||
* fix referral headers bug in non-DoH requests (fixes https://github.com/bromite/bromite/issues/470)
|
||||
* disable smart selection by default, enable web search in incognito mode
|
||||
* disable DRM media pre-provisioning (fixes https://github.com/bromite/bromite/issues/471)
|
||||
|
||||
# 79.0.3945.123
|
||||
* updated User-agent version
|
||||
* increase minimum DoH timeout to 400ms (fixes https://github.com/bromite/bromite/issues/437)
|
||||
|
||||
# 79.0.3945.111
|
||||
* automatically disable video decoding acceleration on Android 10+ and arm64
|
||||
* restore enable-horizontal-tab-switcher flag
|
||||
* remove non-working contextual search settings
|
||||
* disable QUIC by default
|
||||
* remove logging for DoH timeouts
|
||||
|
||||
# 79.0.3945.107
|
||||
* always show cookies, javascript and ads site settings (fixes https://github.com/bromite/bromite/issues/133)
|
||||
* remove global ads and javascript menu options
|
||||
|
||||
# 79.0.3945.100
|
||||
* log timeout values for DoH
|
||||
* enable DFM (fixes https://github.com/bromite/bromite/issues/441)
|
||||
* updated User-agent version
|
||||
|
||||
# 79.0.3945.94
|
||||
* removed patches which do not apply anymore (Widevine version punting, always show homepage settings, network errors UMA recording)
|
||||
* removed split APKs support (Play integration)
|
||||
@@ -181,6 +336,7 @@
|
||||
* use adblock engine also in SystemWebView
|
||||
* add back uBlock Origin and EasyList filters
|
||||
* added Fanboy's Annoyance List
|
||||
* remove AdGuard filters
|
||||
|
||||
# 72.0.3626.119
|
||||
* use AdGuard filters
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## Does Google Sync/Translate/Data saver work?
|
||||
No.
|
||||
This is not a limitation of Bromite but of all Chromium-based projects in general, as general public is not allowed to use Google's APIs for free unless when using Chrome.
|
||||
|
||||
Additionally, these features would not be privacy-friendly.
|
||||
|
||||
## Does Bromite require root?
|
||||
No.
|
||||
|
||||
## Is Bromite de-googled?
|
||||
|
||||
Yes, although this has not been verified (and hardly can be) under all situations; if you were to find connections to cloud-based services please report them via the issue tracker.
|
||||
Bromite uses [ungoogled-chromium's python script](https://github.com/Eloston/ungoogled-chromium/blob/master/utils/domain_substitution.py) to disable URLs in the codebase since version `78.0.3904.93`.
|
||||
|
||||
Projects which follow a strict approach on this are [Iridium](https://iridiumbrowser.de/) and [Inox patchset](https://github.com/gcarq/inox-patchset).
|
||||
|
||||
## Does Bromite support DRM media?
|
||||
|
||||
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 -> 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.
|
||||
|
||||
See also [the wiki page](https://github.com/bromite/bromite/wiki/Installing-SystemWebView) for community-contributed installation instructions.
|
||||
|
||||
Ad-blocking was present and always enabled in the SystemWebView from version `72.0.3626.120` till version `77.0.3865.104`, when it stopped working due to [upstream NetworkService changes](https://docs.google.com/document/d/1TZEuPvr2KAbP4_TZpuuwtEEArQsyAkc2HDu68l66YwU/edit?ts=598244df#heading=h.ougoi5i6508y).
|
||||
|
||||
## How to enable DNS-over-HTTPS?
|
||||
|
||||
See [this wiki page](https://github.com/bromite/bromite/wiki/Enabling-DNS-over-HTTPS).
|
||||
|
||||
## Can you add HTTPS everywhere?
|
||||
No.
|
||||
We cannot add add-ons to Bromite (merely some features).
|
||||
|
||||
## Is Bromite on Play Store?
|
||||
No, and this is unlikely to change. Many limitations apply for submissions there, including which ads are allowed to be blocked.
|
||||
|
||||
Bromite favors user freedom in software choice: the device is yours so you get to choose which software to run on it, end of the story.
|
||||
|
||||
## Is Bromite on F-Droid?
|
||||
It is not on the official F-Droid repository and there are no (more) plans to submit it.
|
||||
|
||||
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?
|
||||
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.
|
||||
|
||||
For an Android browser using an alternative engine see [Fennec F-Droid](https://f-droid.org/en/packages/org.mozilla.fennec_fdroid/).
|
||||
|
||||
## Does Bromite support extensions?
|
||||
No; Bromite will support extensions only if upstream (Chromium) does, or similarly another project maintains the patch and functionality.
|
||||
|
||||
## Why do push notifications not work on this website?
|
||||
|
||||
The [Chromium Blink engine](https://www.chromium.org/blink) uses [GCM](https://en.wikipedia.org/wiki/Google_Cloud_Messaging) to deliver messages
|
||||
when websites use the [Push API](https://w3c.github.io/push-api/); this will not work in Bromite because cloud integrations are disabled (GCM in this case).
|
||||
|
||||
[ServiceWorker notifications](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification) do work instead since they use
|
||||
[android.app.Notification](https://developer.android.com/guide/topics/ui/notifiers/notifications).
|
||||
|
||||
## Can PWAs be installed?
|
||||
|
||||
PWAs are only supported as home shortcuts; WebAPKs will not work because they are generated server-side on googleapis.com (which is not allowed in Bromite).
|
||||
|
||||
## Does Bromite support the Android autofill framework?
|
||||
|
||||
No; the only autofill available in Chromium browsers requires integration with the Play Store binary blobs.
|
||||
Some apps use accessibility services as a workaround.
|
||||
@@ -4,12 +4,16 @@
|
||||
|
||||
<img title="Bromite - take back your browser!" src="https://www.bromite.org/android-icon-192x192.png" width="96" alt="Bromite" />
|
||||
|
||||
Bromite is [Chromium](https://www.chromium.org/Home) plus some patches for ad blocking and enhanced privacy.
|
||||
Bromite is a [Chromium](https://www.chromium.org/Home) fork with support for ad blocking and enhanced privacy.
|
||||
|
||||
Bromite is only available for Android v4.4 and above.
|
||||
Bromite is only available for Android Lollipop (v5.0, API level 21) and above.
|
||||
|
||||
<img src="https://www.bromite.org/bromite_bromite_gh_downloads.svg" alt="downloads on Github" title="downloads on Github" />
|
||||
|
||||
For the Frequently Asked Questions see [F.A.Q.](./FAQ.md).
|
||||
|
||||
For documentation see the [wiki](https://github.com/bromite/bromite/wiki).
|
||||
|
||||
# Goals
|
||||
|
||||
Bromite aims at providing a no-clutter browsing experience without privacy-invasive features and with the addition of a fast ad-blocking engine.
|
||||
@@ -21,83 +25,76 @@ 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:3MkC3idL61npQSCxL1gceksmRTkNkiCPcG">BTC donations address</a>: `3MkC3idL61npQSCxL1gceksmRTkNkiCPcG`
|
||||
<a href="bitcoin:bc1qmpyuqsvs3tz3uaysplmwjr33gg4rzu6cqweaq834ehc25vduxppqkrszel">BTC donations address</a>: `bc1qmpyuqsvs3tz3uaysplmwjr33gg4rzu6cqweaq834ehc25vduxppqkrszel`
|
||||
|
||||
ETH donations address: `0xf47ff39223d828f99fec5ab53bd068c5c0522042`
|
||||
|
||||
# F.A.Q.
|
||||
|
||||
## Does Google Sync/Translate/Data saver work?
|
||||
No.
|
||||
This is not a limitation of Bromite but of all Chromium-based projects in general, as general public is not allowed to use Google's APIs for free unless when using Chrome.
|
||||
|
||||
Additionally, these features would not be privacy-friendly.
|
||||
|
||||
## Does Bromite require root?
|
||||
No.
|
||||
|
||||
## Is Bromite de-googled?
|
||||
|
||||
Yes, although this has not been verified (and hardly can be) under all situations; if you were to find connections to cloud-based services please report them via the issue tracker.
|
||||
Projects which follow a strict approach on this are [Iridium](https://iridiumbrowser.de/) and [Inox patchset](https://github.com/gcarq/inox-patchset).
|
||||
|
||||
## 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.
|
||||
|
||||
See also [the wiki page](https://github.com/bromite/bromite/wiki/Installing-SystemWebView) for community-contributed installation instructions.
|
||||
|
||||
## How to enable DNS-over-HTTPS?
|
||||
|
||||
See [this wiki page](https://github.com/bromite/bromite/wiki/Enabling-DNS-over-HTTPS).
|
||||
|
||||
## Can you add HTTPS everywhere?
|
||||
No.
|
||||
We cannot add add-ons to Bromite (merely some features).
|
||||
|
||||
## Is Bromite on Play Store?
|
||||
No, and this is unlikely to change. Many limitations apply for submissions there, including which ads are allowed to be blocked.
|
||||
|
||||
Bromite favors user freedom in software choice: the device is yours so you get to choose which software to run on it, end of the story.
|
||||
|
||||
## Is Bromite on F-Droid?
|
||||
It is not on the official F-Droid repository and there are no (more) plans to submit it.
|
||||
|
||||
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?
|
||||
Yes, since version 69. While the desktop version of Chromium has an option to disable it (video/audio site settings), the Android version cannot.
|
||||
|
||||
# Features
|
||||
|
||||
* native adblock engine
|
||||
* customizable adblock filters via user-provided URL (see https://www.bromite.org/custom-filters)
|
||||
* remove click-tracking and AMP from search results
|
||||
* DNS-over-HTTPS support via Google, Cloudflare, Quad9 and AdGuard servers
|
||||
* [proxy configuration page](https://github.com/bromite/bromite/wiki/ProxyConfiguration) with PAC and custom proxy lists support
|
||||
* [StartPage](https://startpage.com/), [DuckDuckGo](https://duckduckgo.com/) and [Qwant](https://www.qwant.com/) search engines
|
||||
* chrome flags to disable custom intents and clear session on exit
|
||||
* DNS-over-HTTPS support with any valid IETF DoH endpoint
|
||||
* always-incognito mode
|
||||
* completely removed safe browsing and other privacy-unfriendly features
|
||||
* anti-fingerprinting mitigations for canvas, audio, client rects, webGL and sensor APIs
|
||||
* use fixed User-Agent to conceal real model and browser version
|
||||
* disable all field trials permanently
|
||||
* disable smart search by default, allow web search from incognito mode
|
||||
* 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
|
||||
* disable media router and remoting by default
|
||||
* disable dynamic module loading
|
||||
* show warnings for TLSv1.0/TLSv1.1 pages
|
||||
* enable site-per-process isolation for all devices with memory > 1GB
|
||||
* completely remove safe browsing and other privacy-unfriendly features
|
||||
* [proxy configuration page](https://github.com/bromite/bromite/wiki/ProxyConfiguration) with PAC and custom proxy lists support
|
||||
* settings to disable custom intents and clear session on exit
|
||||
* flags to toggle anti-fingerprinting mitigations for canvas, audio, client rects, webGL and sensor APIs (see full list below for all the new flags)
|
||||
* use frozen User-Agent to conceal real model and browser version
|
||||
* privacy enhancement patches from [Iridium](https://iridiumbrowser.de/), [Inox patchset](https://github.com/gcarq/inox-patchset), [Brave](https://brave.com/) and [ungoogled-chromium](https://github.com/Eloston/ungoogled-chromium) projects
|
||||
* security enhancement patches from [GrapheneOS](https://github.com/GrapheneOS) project
|
||||
* disable scroll-to-text-fragment
|
||||
|
||||
## Features not related to privacy
|
||||
* import/export bookmarks
|
||||
* 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)
|
||||
* [dav1d](https://code.videolan.org/videolan/dav1d) decoder enabled by default
|
||||
* built with official speed optimizations
|
||||
* increase number of autocomplete matches from 5 to 10
|
||||
* allow changing default download storage location
|
||||
* do not ignore save prompt for users without SD cards
|
||||
* disable articles and increase number of icons on new tab page
|
||||
* adding an URL as bookmark will clear its blocked status for the NTP tiles
|
||||
|
||||
You can inspect all functionality/privacy changes by reading the patches: https://github.com/bromite/bromite/tree/master/build/patches
|
||||
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).
|
||||
|
||||
### Flags
|
||||
|
||||
Flags which have been retired from upstream Chromium but are still available in Bromite.
|
||||
|
||||
* `#enable-horizontal-tab-switcher`
|
||||
* `#pull-to-refresh`
|
||||
* `#enable-search-ready-omnibox`
|
||||
* `#darken-websites-checkbox-in-themes-setting`
|
||||
|
||||
New flags:
|
||||
|
||||
* `#enable-incognito-snapshots-in-android-recents`
|
||||
* `#max-connections-per-host`
|
||||
* `#resume-background-video`
|
||||
* `#ipv6-probing`
|
||||
* `#disable-webgl`
|
||||
* `#enable-device-motion` and `#enable-device-orientation`
|
||||
* `#show-legacy-tls-warnings`
|
||||
|
||||
# Privacy limitations
|
||||
|
||||
Bromite's privacy features, including anti-fingerprinting mitigations (which can be easily circumvented), **are not to be considered useful for journalists and people living in countries with freedom limitations**, please look at [Tor Browser](https://2019.www.torproject.org/projects/torbrowser.html.en) in such cases.
|
||||
Bromite's privacy features, including anti-fingerprinting mitigations (which are not comprehensive), **are not to be considered useful for journalists and people living in countries with freedom limitations**, please look at [Tor Browser](https://www.torproject.org/download/) in such cases.
|
||||
|
||||
# Releases
|
||||
|
||||
All built versions are available as [releases](https://github.com/bromite/bromite/releases); the [official website](https://www.bromite.org/) points to those releases and - when browsing via Android - it will automatically select the one apt for your device (or none otherwise).
|
||||
All built versions are available as [releases](https://github.com/bromite/bromite/releases); the [official website](https://www.bromite.org/) points to those releases and - when browsing via Android - it will automatically highlight the one apt for your device (or none otherwise).
|
||||
|
||||
Each tag corresponds to a Chromium Stable release tag.
|
||||
|
||||
@@ -116,8 +113,6 @@ arm64_ChromePublic.apk: OK
|
||||
arm64_ChromeModernPublic.apk: OK
|
||||
```
|
||||
|
||||
If you prefer an UI-based tool, you might want to look into [GtkHash](https://github.com/tristanheaven/gtkhash).
|
||||
|
||||
You can verify authenticity, e.g. that the author ([csagan5](https://github.com/csagan5)) released the file, by using gpg2:
|
||||
```
|
||||
$ gpg2 --quiet --verify brm_68.0.3440.54.sha256.txt.asc
|
||||
@@ -128,14 +123,13 @@ gpg: Good signature from "csagan5 <32685696+csagan5@users.noreply.github.com>"
|
||||
|
||||
You can download csagan5's public GnuPG key from here: [csagan5.asc](./csagan5.asc).
|
||||
|
||||
**NOTE:** releases before v68 did not have published signed hashes files.
|
||||
|
||||
# How to build
|
||||
|
||||
The [Bromite main repository](https://github.com/bromite/bromite) contains tags for each corresponding Chromium release (see https://chromium.googlesource.com/chromium/src.git).
|
||||
|
||||
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: [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`).
|
||||
|
||||
@@ -161,6 +155,7 @@ Bromite uses an unindexed filter file, which is periodically published at https:
|
||||
* [EasyPrivacy](https://easylist.to/#easyprivacy)
|
||||
* [uBlock Origin](https://github.com/uBlockOrigin)
|
||||
* [Peter Lowe's Ad and tracking server list](https://pgl.yoyo.org/adservers/)
|
||||
|
||||
# License
|
||||
|
||||
The patches published as part of the Bromite project are released under [GNU GPL v3](./LICENSE).
|
||||
|
||||
+7
-11
@@ -1,15 +1,13 @@
|
||||
android_channel="stable"
|
||||
blink_symbol_level=0
|
||||
blink_symbol_level=1
|
||||
dcheck_always_on=false
|
||||
debuggable_apks=false
|
||||
dfmify_dev_ui=true
|
||||
dfmify_dev_ui=false
|
||||
disable_android_lint=true
|
||||
disable_autofill_assistant_dfm=false
|
||||
disable_tab_ui_dfm=false
|
||||
disable_autofill_assistant_dfm=true
|
||||
disable_tab_ui_dfm=true
|
||||
enable_av1_decoder=true
|
||||
enable_dav1d_decoder=true
|
||||
enable_feed_in_chrome=false
|
||||
enable_gvr_services=false
|
||||
enable_hangout_services_extension=false
|
||||
enable_iterator_debugging=false
|
||||
@@ -17,26 +15,24 @@ enable_mdns=false
|
||||
enable_mse_mpeg2ts_stream_parser=true ffmpeg_branding="Chrome" proprietary_codecs=true
|
||||
enable_nacl=false
|
||||
enable_nacl_nonsfi=false
|
||||
enable_platform_dolby_vision=true
|
||||
enable_platform_hevc=true
|
||||
enable_remoting=false
|
||||
enable_reporting=false
|
||||
enable_reporting=true
|
||||
enable_resource_whitelist_generation=false
|
||||
enable_vr=false
|
||||
fieldtrial_testing_like_official_build=true
|
||||
icu_use_data_file=true
|
||||
is_cfi=true
|
||||
is_component_build=false
|
||||
is_debug=false
|
||||
is_official_build=true
|
||||
rtc_build_examples=false
|
||||
safe_browsing_mode=0
|
||||
strip_absolute_paths_from_debug_symbols=true
|
||||
strip_debug_info=true
|
||||
symbol_level=0
|
||||
symbol_level=1
|
||||
target_os="android"
|
||||
use_debug_fission=true
|
||||
use_errorprone_java_compiler=false
|
||||
use_jumbo_build=false
|
||||
use_official_google_api_keys=false
|
||||
use_openh264=true chrome_pgo_phase=0 full_wpo_on_official=true
|
||||
use_openh264=true chrome_pgo_phase=0
|
||||
use_sysroot=false
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
85.0.4183.94
|
||||
@@ -1,73 +1,61 @@
|
||||
Disable-third-party-cookies-by-default.patch
|
||||
Revert-Remove-pre-unified-consent-code-in-sync-and-privacy-directory.patch
|
||||
Revert-Remove-pre-unified-consent-code.patch
|
||||
Restore-classic-new-tab-page.patch
|
||||
Always-use-new-tab-page-for-default-home-page.patch
|
||||
Always-allow-partner-customisation.patch
|
||||
battery_status_service-disable-more-privacy-nightmares.patch
|
||||
Battery-API-return-nothing.patch
|
||||
google-cloud-messaging-disable-experiment-status-check.patch
|
||||
updater-disable-updater-pings.patch
|
||||
prefs-only-keep-cookies-until-exit.patch
|
||||
Remove-EV-certificates.patch
|
||||
promo-disable-Google-promotion-fetching.patch
|
||||
Disable-omission-of-URL-elements-in-Omnibox.patch
|
||||
Modify-default-preferences.patch
|
||||
Disable-contextual-search-by-default.patch
|
||||
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
|
||||
Disable-WebRTC-by-default.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-downloading.patch
|
||||
ungoogled-chromium-Disable-profile-avatar.patch
|
||||
ungoogled-chromium-Disable-intranet-redirect-detector.patch
|
||||
ungoogled-chromium-Disable-Google-host-detection.patch
|
||||
ungoogled-chromium-Disable-GCM.patch
|
||||
ungoogled-chromium-Disable-Gaia.patch
|
||||
ungoogled-chromium-Disable-domain-reliability.patch
|
||||
ungoogled-chromium-Disable-Network-Time-Tracker.patch
|
||||
ungoogled-chromium-Always-use-local-DevTools-files-instead-of-remote-files-from-Google.patch
|
||||
safe_browsing-disable-incident-reporting.patch
|
||||
safe_browsing-disable-reporting-of-safebrowsing-override.patch
|
||||
safe_browsing-disable-cookie-transmission.patch
|
||||
Disable-safe-browsing.patch
|
||||
Skip-the-first-run-and-metrics.patch
|
||||
Disable-all-promo-dialogs.patch
|
||||
Disable-sync-services-menu-entry.patch
|
||||
Remove-signin-and-data-saver-integrations.patch
|
||||
Remove-background-sync-and-translate-menu-options.patch
|
||||
Hide-passwords-manager-link.patch
|
||||
Disable-Omaha-update-checks.patch
|
||||
Disable-update-scheduler.patch
|
||||
Add-English-only-search-engine.patch
|
||||
Add-DuckDuckGo-Lite-search-engine.patch
|
||||
Add-Qwant-search-engine.patch
|
||||
Fix-crash-when-accessing-page-info-site-settings.patch
|
||||
openH264-enable-ARM-ARM64-optimizations.patch
|
||||
Switch-to-fstack-protector-strong.patch
|
||||
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
|
||||
build-remove-calling-untrusted-hooks.patch
|
||||
AV1-codec-support.patch
|
||||
Inject-scripts-for-AMP-tracking-ads-and-video-functionality.patch
|
||||
Inject-scripts-for-AMP-tracking-ads-and-video.patch
|
||||
Allow-playing-audio-in-background.patch
|
||||
Add-flag-to-control-video-playback-resume-feature.patch
|
||||
Open-YouTube-links-in-Bromite.patch
|
||||
Add-exit-menu-item.patch
|
||||
Remove-help-menu-item.patch
|
||||
Add-menu-option-to-toggle-global-Javascript-preference.patch
|
||||
Add-menu-option-to-toggle-ad-blocker.patch
|
||||
User-Agent-anonymize.patch
|
||||
AudioBuffer-AnalyserNode-fingerprinting-mitigations-via-IDL.patch
|
||||
AudioBuffer-AnalyserNode-fp-mitigations.patch
|
||||
Multiple-fingerprinting-mitigations-for-canvas-text-and-client-rectangles.patch
|
||||
Add-flags-to-disable-device-motion-and-orientation-APIs.patch
|
||||
Add-flags-to-disable-device-motion-orientation-APIs.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
|
||||
Add-site-settings-option-for-session-only-cookies.patch
|
||||
Add-bookmark-import-export-actions.patch
|
||||
Disable-promos-displayed-in-bookmarks-manager.patch
|
||||
Add-an-always-incognito-mode.patch
|
||||
@@ -93,12 +81,14 @@ kill-GCM.patch
|
||||
Remove-dependency-on-com.google.android.gcm.patch
|
||||
Remove-dependency-on-com.google.android.gms.gcm.patch
|
||||
Remove-dependency-on-com.google.android.play.patch
|
||||
Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
|
||||
Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
|
||||
Remove-dependency-on-com.google.android.gms.fido-com.google.android.gms.iid-com.google.android.gms.instantapps-com.google.android.gms.location.patch
|
||||
Remove-dependency-on-vision-clearcut-and-phenotype.patch
|
||||
Remove-dependency-on-flags-places-and-stats.patch
|
||||
Remove-dependency-on-fido-iid-instantapps-location.patch
|
||||
Remove-dependency-on-com.google.android.gms.cast.patch
|
||||
Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
|
||||
Remove-dependency-on-auth-signin-dynamic-and-tasks.patch
|
||||
Remove-google_services_gcm.patch
|
||||
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
|
||||
Do-not-grant-notifications-to-default-search-engine.patch
|
||||
@@ -108,31 +98,21 @@ Do-not-ignore-download-location-prompt-setting.patch
|
||||
Disable-previews-by-default.patch
|
||||
Use-4-tile-rows-never-show-logo.patch
|
||||
Disable-metrics-collection-for-NTP-tiles.patch
|
||||
Enable-site-per-process-isolation-for-devices-with-enough-memory.patch
|
||||
Use-64-bit-WebView-processes.patch
|
||||
Add-option-to-use-home-page-as-NTP.patch
|
||||
Enable-night-mode-menu-entry-by-default.patch
|
||||
Disable-dynamic-module-loading.patch
|
||||
Enable-SPPI-for-devices-with-enough-memory.patch
|
||||
prefs-disable-signinallowed-by-default.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
|
||||
Enable-changing-default-downloads-storage-location-by-default.patch
|
||||
Enable-download-rename-option-by-default.patch
|
||||
disable-payment-support-by-default.patch
|
||||
disable-background-sync-by-default.patch
|
||||
disable-sensors-access-site-setting-by-default.patch
|
||||
Disable-media-router-and-remoting-by-default.patch
|
||||
Disable-unified-consent-on-Android.patch
|
||||
Revert-Cleanup-Search-Ready-Omnibox-flag-since-it-has-launched.patch
|
||||
Disable-search-ready-omnibox-by-default.patch
|
||||
Restore-Search-Ready-Omnibox-flag.patch
|
||||
disable-AdsBlockedInfoBar.patch
|
||||
Bromite-AdBlockUpdaterService.patch
|
||||
Add-option-to-configure-the-ad-blocker-filters-URL.patch
|
||||
Revert-Merge-to-M78-Enable-AImageReader-by-default.patch
|
||||
Replace-DoH-probe-domain-with-RIPE-domain.patch
|
||||
Increase-number-of-autocomplete-matches-from-5-to-10.patch
|
||||
Disable-HEAD-requests-for-single-word-Omnibar-searches.patch
|
||||
Block-all-connection-requests-with-qjz9zk-in-the-domain-name-or-with-a-trk-scheme.patch
|
||||
Disable-some-signed-exchange-features.patch
|
||||
Add-flag-to-disable-WebGL.patch
|
||||
Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
|
||||
@@ -140,6 +120,34 @@ 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-password-reuse-detection-on-android.patch
|
||||
Unified-consent-miscellanous-backport-fixes.patch
|
||||
Allow-building-without-feed-support.patch
|
||||
Disable-addresses-autofill-by-default.patch
|
||||
Disable-feeds-support-by-default.patch
|
||||
Disable-autofill-assistant-by-default.patch
|
||||
Show-site-settings-for-cookies-javascript-and-ads.patch
|
||||
Restore-enable-horizontal-tab-switcher-flag.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
|
||||
Revert-gpu-android-Remove-setup-for-disabling-AImageReader.patch
|
||||
Revert-Remove-flags-to-enable-disable-AImageReader.patch
|
||||
Disable-AImageReader-for-ARM64-P-and-ARM64-Q.patch
|
||||
Restore-GPU-bug-blacklist-for-AImageReader-on-ARM-CPUs.patch
|
||||
Update-i18n-zh_CN-support.patch
|
||||
Add-a-flag-to-allow-screenshots-in-Incognito-mode.patch
|
||||
Add-menu-item-to-view-source.patch
|
||||
Enable-legacy-TLS-interstitital-warning.patch
|
||||
Block-gateway-attacks-via-websockets.patch
|
||||
Enable-prefetch-privacy-changes-by-default.patch
|
||||
Enable-reduced-referrer-granularity-by-default.patch
|
||||
Disable-support-for-RAR-files-inspection.patch
|
||||
Enable-improved-cookie-controls-by-default.patch
|
||||
Add-history-support-in-incognito-mode.patch
|
||||
Enable-darken-websites-checkbox-in-themes.patch
|
||||
Remove-blocklisted-URLs-upon-bookmark-creation.patch
|
||||
Disable-scroll-to-text-fragment.patch
|
||||
Rollback-dav1d-upgrades-that-break-x86.patch
|
||||
Disable-the-DIAL-repeating-discovery.patch
|
||||
Timezone-customization.patch
|
||||
Block-all-connection-requests-with-qjz9zk-in-the-domain-name-or-with-a-trk-scheme.patch
|
||||
Automated-domain-substitution.patch
|
||||
Remove-some-params-from-search-url.patch
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Revert-Remove-pre-unified-consent-code-in-sync-and-privacy-directory.patch
|
||||
Disable-unified-consent-on-Android.patch
|
||||
Unified-consent-miscellanous-backport-fixes.patch
|
||||
Revert-Remove-pre-unified-consent-code.patch
|
||||
AV1-codec-support.patch
|
||||
Switch-to-fstack-protector-strong.patch
|
||||
Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
|
||||
Disable-password-reuse-detection-on-android.patch
|
||||
Disable-feeds-support-by-default.patch
|
||||
Rollback-dav1d-upgrades-that-break-x86.patch
|
||||
|
||||
@@ -25,7 +25,7 @@ Report AV1 as playable on Android
|
||||
diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc
|
||||
--- a/media/base/mime_util_internal.cc
|
||||
+++ b/media/base/mime_util_internal.cc
|
||||
@@ -564,9 +564,13 @@ bool MimeUtil::IsCodecSupportedOnAndroid(
|
||||
@@ -563,9 +563,13 @@ bool MimeUtil::IsCodecSupportedOnAndroid(
|
||||
case THEORA:
|
||||
return false;
|
||||
|
||||
@@ -43,16 +43,16 @@ diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc
|
||||
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
|
||||
@@ -74,7 +74,7 @@ if (enable_libaom_decoder) {
|
||||
sources = aom_dsp_common_asm_sse2
|
||||
sources += aom_dsp_common_asm_ssse3
|
||||
sources += aom_ports_asm_x86
|
||||
@@ -81,7 +81,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
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ if (enable_libaom_decoder) {
|
||||
@@ -184,7 +184,7 @@ if (enable_libaom) {
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
if (current_cpu == "arm") {
|
||||
configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
|
||||
@@ -61,7 +61,7 @@ diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
|
||||
}
|
||||
configs += [ ":libaom_config" ]
|
||||
|
||||
@@ -203,6 +203,8 @@ if (enable_libaom_decoder) {
|
||||
@@ -233,6 +233,8 @@ if (enable_libaom) {
|
||||
if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
|
||||
cpu_arch_full == "arm-neon-cpu-detect") {
|
||||
deps += [ ":libaom_intrinsics_neon" ]
|
||||
@@ -73,7 +73,7 @@ diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
|
||||
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
|
||||
@@ -488,6 +488,11 @@ aom_mem_sources = [
|
||||
@@ -656,6 +656,11 @@ aom_mem_sources = [
|
||||
|
||||
aom_ports_asm_x86 = [ "//third_party/libaom/source/libaom/aom_ports/emms.asm" ]
|
||||
|
||||
@@ -83,152 +83,152 @@ diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs
|
||||
+ ]
|
||||
+
|
||||
aom_rtcd_sources = [
|
||||
"//third_party/libaom/source/libaom/aom_dsp/aom_dsp_rtcd_defs.pl",
|
||||
"//third_party/libaom/source/libaom/aom_dsp/aom_dsp_rtcd.c",
|
||||
"//third_party/libaom/source/libaom/aom_scale/aom_scale_rtcd.c",
|
||||
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
|
||||
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
@@ -44,7 +44,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
CONFIG_NN_V2 equ 0
|
||||
CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_ONE_PASS_SVM equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 0
|
||||
CONFIG_RUNTIME_CPU_DETECT equ 1
|
||||
CONFIG_SHARED equ 0
|
||||
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
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
#define CONFIG_NN_V2 0
|
||||
#define CONFIG_NORMAL_TILE_MODE 1
|
||||
#define CONFIG_ONE_PASS_SVM 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 0
|
||||
#define CONFIG_RUNTIME_CPU_DETECT 1
|
||||
#define CONFIG_SHARED 0
|
||||
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
|
||||
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
@@ -44,7 +44,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
CONFIG_NN_V2 equ 0
|
||||
CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_ONE_PASS_SVM equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 0
|
||||
CONFIG_RUNTIME_CPU_DETECT equ 0
|
||||
CONFIG_SHARED equ 0
|
||||
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
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
#define CONFIG_NN_V2 0
|
||||
#define CONFIG_NORMAL_TILE_MODE 1
|
||||
#define CONFIG_ONE_PASS_SVM 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 0
|
||||
#define CONFIG_RUNTIME_CPU_DETECT 0
|
||||
#define CONFIG_SHARED 0
|
||||
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
|
||||
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
@@ -44,7 +44,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
CONFIG_NN_V2 equ 0
|
||||
CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_ONE_PASS_SVM equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 0
|
||||
CONFIG_RUNTIME_CPU_DETECT equ 0
|
||||
CONFIG_SHARED equ 0
|
||||
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
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
#define CONFIG_NN_V2 0
|
||||
#define CONFIG_NORMAL_TILE_MODE 1
|
||||
#define CONFIG_ONE_PASS_SVM 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 0
|
||||
#define CONFIG_RUNTIME_CPU_DETECT 0
|
||||
#define CONFIG_SHARED 0
|
||||
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
|
||||
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
@@ -44,7 +44,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
CONFIG_NN_V2 equ 0
|
||||
CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_ONE_PASS_SVM equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 0
|
||||
CONFIG_RUNTIME_CPU_DETECT equ 0
|
||||
CONFIG_SHARED equ 0
|
||||
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
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
#define CONFIG_NN_V2 0
|
||||
#define CONFIG_NORMAL_TILE_MODE 1
|
||||
#define CONFIG_ONE_PASS_SVM 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 0
|
||||
#define CONFIG_RUNTIME_CPU_DETECT 0
|
||||
#define CONFIG_SHARED 0
|
||||
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
|
||||
@@ -45,7 +45,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
@@ -44,7 +44,7 @@ CONFIG_MULTITHREAD equ 1
|
||||
CONFIG_NN_V2 equ 0
|
||||
CONFIG_NORMAL_TILE_MODE equ 1
|
||||
CONFIG_ONE_PASS_SVM equ 0
|
||||
CONFIG_OS_SUPPORT equ 1
|
||||
-CONFIG_PIC equ 0
|
||||
+CONFIG_PIC equ 1
|
||||
CONFIG_RD_DEBUG equ 0
|
||||
CONFIG_REALTIME_ONLY equ 0
|
||||
CONFIG_RUNTIME_CPU_DETECT equ 1
|
||||
CONFIG_SHARED equ 0
|
||||
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
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
#define CONFIG_NN_V2 0
|
||||
#define CONFIG_NORMAL_TILE_MODE 1
|
||||
#define CONFIG_ONE_PASS_SVM 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 0
|
||||
#define CONFIG_RUNTIME_CPU_DETECT 1
|
||||
#define CONFIG_SHARED 0
|
||||
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
|
||||
@@ -35,7 +35,7 @@
|
||||
@@ -34,7 +34,7 @@
|
||||
%define CONFIG_NN_V2 0
|
||||
%define CONFIG_NORMAL_TILE_MODE 1
|
||||
%define CONFIG_ONE_PASS_SVM 0
|
||||
%define CONFIG_OS_SUPPORT 1
|
||||
-%define CONFIG_PIC 0
|
||||
+%define CONFIG_PIC 1
|
||||
%define CONFIG_RD_DEBUG 0
|
||||
%define CONFIG_REALTIME_ONLY 0
|
||||
%define CONFIG_RUNTIME_CPU_DETECT 1
|
||||
%define CONFIG_SHARED 0
|
||||
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
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
#define CONFIG_NN_V2 0
|
||||
#define CONFIG_NORMAL_TILE_MODE 1
|
||||
#define CONFIG_ONE_PASS_SVM 0
|
||||
#define CONFIG_OS_SUPPORT 1
|
||||
-#define CONFIG_PIC 0
|
||||
+#define CONFIG_PIC 1
|
||||
#define CONFIG_RD_DEBUG 0
|
||||
#define CONFIG_REALTIME_ONLY 0
|
||||
#define CONFIG_RUNTIME_CPU_DETECT 1
|
||||
#define CONFIG_SHARED 0
|
||||
--
|
||||
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
|
||||
@@ -122,6 +122,27 @@
|
||||
@@ -132,6 +132,27 @@
|
||||
"id": 1
|
||||
},
|
||||
|
||||
@@ -44,9 +44,9 @@ 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
|
||||
@@ -68,6 +68,7 @@ enum SearchEngineType {
|
||||
SEARCH_ENGINE_PARSIJOO,
|
||||
SEARCH_ENGINE_QWANT,
|
||||
@@ -75,6 +75,7 @@ enum SearchEngineType {
|
||||
SEARCH_ENGINE_PRIVACYWALL,
|
||||
SEARCH_ENGINE_ECOSIA,
|
||||
|
||||
+ SEARCH_ENGINE_GOOGLE_EN,
|
||||
SEARCH_ENGINE_MAX // Bounding value needed for UMA histogram macro.
|
||||
@@ -73,7 +73,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -49,7 +49,7 @@ const PrepopulatedEngine* const engines_AE[] = {
|
||||
@@ -50,7 +50,7 @@ const PrepopulatedEngine* const engines_AE[] = {
|
||||
|
||||
// Albania
|
||||
const PrepopulatedEngine* const engines_AL[] = {
|
||||
@@ -81,8 +81,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&ask,
|
||||
@@ -57,7 +57,7 @@ const PrepopulatedEngine* const engines_AL[] = {
|
||||
&duckduckgo,
|
||||
@@ -59,7 +59,7 @@ const PrepopulatedEngine* const engines_AL[] = {
|
||||
|
||||
// Argentina
|
||||
const PrepopulatedEngine* const engines_AR[] = {
|
||||
@@ -91,34 +91,34 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_ar,
|
||||
&duckduckgo,
|
||||
@@ -65,7 +65,7 @@ const PrepopulatedEngine* const engines_AR[] = {
|
||||
@@ -68,7 +68,7 @@ const PrepopulatedEngine* const engines_AR[] = {
|
||||
|
||||
// Austria
|
||||
const PrepopulatedEngine* const engines_AT[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_at,
|
||||
&duckduckgo,
|
||||
@@ -73,7 +73,7 @@ const PrepopulatedEngine* const engines_AT[] = {
|
||||
&yahoo_at,
|
||||
@@ -77,7 +77,7 @@ const PrepopulatedEngine* const engines_AT[] = {
|
||||
|
||||
// Australia
|
||||
const PrepopulatedEngine* const engines_AU[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_au,
|
||||
&duckduckgo,
|
||||
@@ -81,7 +81,7 @@ const PrepopulatedEngine* const engines_AU[] = {
|
||||
&yahoo_au,
|
||||
@@ -86,7 +86,7 @@ const PrepopulatedEngine* const engines_AU[] = {
|
||||
|
||||
// Bosnia and Herzegovina
|
||||
const PrepopulatedEngine* const engines_BA[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&ask,
|
||||
@@ -89,7 +89,7 @@ const PrepopulatedEngine* const engines_BA[] = {
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -95,7 +95,7 @@ const PrepopulatedEngine* const engines_BA[] = {
|
||||
|
||||
// Belgium
|
||||
const PrepopulatedEngine* const engines_BE[] = {
|
||||
@@ -126,8 +126,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -97,7 +97,7 @@ const PrepopulatedEngine* const engines_BE[] = {
|
||||
&ecosia,
|
||||
@@ -104,7 +104,7 @@ const PrepopulatedEngine* const engines_BE[] = {
|
||||
|
||||
// Bulgaria
|
||||
const PrepopulatedEngine* const engines_BG[] = {
|
||||
@@ -135,8 +135,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -105,7 +105,7 @@ const PrepopulatedEngine* const engines_BG[] = {
|
||||
&duckduckgo,
|
||||
@@ -113,7 +113,7 @@ const PrepopulatedEngine* const engines_BG[] = {
|
||||
|
||||
// Bahrain
|
||||
const PrepopulatedEngine* const engines_BH[] = {
|
||||
@@ -144,8 +144,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -113,7 +113,7 @@ const PrepopulatedEngine* const engines_BH[] = {
|
||||
&duckduckgo,
|
||||
@@ -122,7 +122,7 @@ const PrepopulatedEngine* const engines_BH[] = {
|
||||
|
||||
// Burundi
|
||||
const PrepopulatedEngine* const engines_BI[] = {
|
||||
@@ -153,8 +153,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -121,7 +121,7 @@ const PrepopulatedEngine* const engines_BI[] = {
|
||||
&duckduckgo,
|
||||
@@ -131,7 +131,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,
|
||||
@@ -129,7 +129,7 @@ const PrepopulatedEngine* const engines_BN[] = {
|
||||
@@ -140,7 +140,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,
|
||||
@@ -137,7 +137,7 @@ const PrepopulatedEngine* const engines_BO[] = {
|
||||
@@ -149,7 +149,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,
|
||||
@@ -145,7 +145,7 @@ const PrepopulatedEngine* const engines_BR[] = {
|
||||
@@ -158,7 +158,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,
|
||||
@@ -153,7 +153,7 @@ const PrepopulatedEngine* const engines_BY[] = {
|
||||
@@ -167,7 +167,7 @@ const PrepopulatedEngine* const engines_BY[] = {
|
||||
|
||||
// Belize
|
||||
const PrepopulatedEngine* const engines_BZ[] = {
|
||||
@@ -199,13 +199,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -161,12 +161,12 @@ const PrepopulatedEngine* const engines_BZ[] = {
|
||||
@@ -176,7 +176,7 @@ const PrepopulatedEngine* const engines_BZ[] = {
|
||||
|
||||
// Canada
|
||||
const PrepopulatedEngine* const engines_CA[] = {
|
||||
- &google, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo,
|
||||
+ &googleen, &google, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo,
|
||||
};
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_ca,
|
||||
&duckduckgo,
|
||||
@@ -185,7 +185,7 @@ const PrepopulatedEngine* const engines_CA[] = {
|
||||
|
||||
// Switzerland
|
||||
const PrepopulatedEngine* const engines_CH[] = {
|
||||
@@ -214,7 +217,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo_ch,
|
||||
@@ -174,7 +174,7 @@ const PrepopulatedEngine* const engines_CH[] = {
|
||||
@@ -194,7 +194,7 @@ const PrepopulatedEngine* const engines_CH[] = {
|
||||
|
||||
// Chile
|
||||
const PrepopulatedEngine* const engines_CL[] = {
|
||||
@@ -223,22 +226,24 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_cl,
|
||||
&duckduckgo,
|
||||
@@ -182,12 +182,12 @@ const PrepopulatedEngine* const engines_CL[] = {
|
||||
|
||||
// China
|
||||
@@ -205,14 +205,14 @@ const PrepopulatedEngine* const engines_CL[] = {
|
||||
const PrepopulatedEngine* const engines_CN[] = {
|
||||
- &baidu, &so_360, &google, &sogou, &bing,
|
||||
+ &baidu, &so_360, &googleen, &google, &sogou, &bing,
|
||||
&baidu,
|
||||
&sogou,
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&so_360,
|
||||
&bing,
|
||||
};
|
||||
|
||||
// Colombia
|
||||
const PrepopulatedEngine* const engines_CO[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo_co,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -195,7 +195,7 @@ const PrepopulatedEngine* const engines_CO[] = {
|
||||
&yahoo_co,
|
||||
&ecosia,
|
||||
@@ -221,7 +221,7 @@ const PrepopulatedEngine* const engines_CO[] = {
|
||||
|
||||
// Costa Rica
|
||||
const PrepopulatedEngine* const engines_CR[] = {
|
||||
@@ -247,16 +252,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -203,7 +203,7 @@ const PrepopulatedEngine* const engines_CR[] = {
|
||||
@@ -230,7 +230,7 @@ const PrepopulatedEngine* const engines_CR[] = {
|
||||
|
||||
// Czech Republic
|
||||
const PrepopulatedEngine* const engines_CZ[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&seznam,
|
||||
&seznam_cz,
|
||||
&bing,
|
||||
&yahoo,
|
||||
@@ -211,7 +211,7 @@ const PrepopulatedEngine* const engines_CZ[] = {
|
||||
@@ -239,7 +239,7 @@ const PrepopulatedEngine* const engines_CZ[] = {
|
||||
|
||||
// Germany
|
||||
const PrepopulatedEngine* const engines_DE[] = {
|
||||
@@ -265,7 +270,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_de,
|
||||
&duckduckgo,
|
||||
@@ -219,7 +219,7 @@ const PrepopulatedEngine* const engines_DE[] = {
|
||||
@@ -248,7 +248,7 @@ const PrepopulatedEngine* const engines_DE[] = {
|
||||
|
||||
// Denmark
|
||||
const PrepopulatedEngine* const engines_DK[] = {
|
||||
@@ -274,7 +279,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_dk,
|
||||
&duckduckgo,
|
||||
@@ -227,7 +227,7 @@ const PrepopulatedEngine* const engines_DK[] = {
|
||||
@@ -257,7 +257,7 @@ const PrepopulatedEngine* const engines_DK[] = {
|
||||
|
||||
// Dominican Republic
|
||||
const PrepopulatedEngine* const engines_DO[] = {
|
||||
@@ -283,7 +288,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -235,7 +235,7 @@ const PrepopulatedEngine* const engines_DO[] = {
|
||||
@@ -266,7 +266,7 @@ const PrepopulatedEngine* const engines_DO[] = {
|
||||
|
||||
// Algeria
|
||||
const PrepopulatedEngine* const engines_DZ[] = {
|
||||
@@ -292,7 +297,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -243,7 +243,7 @@ const PrepopulatedEngine* const engines_DZ[] = {
|
||||
@@ -275,7 +275,7 @@ const PrepopulatedEngine* const engines_DZ[] = {
|
||||
|
||||
// Ecuador
|
||||
const PrepopulatedEngine* const engines_EC[] = {
|
||||
@@ -300,8 +305,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -251,7 +251,7 @@ const PrepopulatedEngine* const engines_EC[] = {
|
||||
&ecosia,
|
||||
@@ -284,7 +284,7 @@ const PrepopulatedEngine* const engines_EC[] = {
|
||||
|
||||
// Estonia
|
||||
const PrepopulatedEngine* const engines_EE[] = {
|
||||
@@ -309,8 +314,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
&neti,
|
||||
@@ -259,7 +259,7 @@ const PrepopulatedEngine* const engines_EE[] = {
|
||||
&yahoo,
|
||||
@@ -293,7 +293,7 @@ const PrepopulatedEngine* const engines_EE[] = {
|
||||
|
||||
// Egypt
|
||||
const PrepopulatedEngine* const engines_EG[] = {
|
||||
@@ -319,7 +324,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -267,7 +267,7 @@ const PrepopulatedEngine* const engines_EG[] = {
|
||||
@@ -302,7 +302,7 @@ const PrepopulatedEngine* const engines_EG[] = {
|
||||
|
||||
// Spain
|
||||
const PrepopulatedEngine* const engines_ES[] = {
|
||||
@@ -328,7 +333,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_es,
|
||||
&duckduckgo,
|
||||
@@ -275,7 +275,7 @@ const PrepopulatedEngine* const engines_ES[] = {
|
||||
@@ -311,7 +311,7 @@ const PrepopulatedEngine* const engines_ES[] = {
|
||||
|
||||
// Finland
|
||||
const PrepopulatedEngine* const engines_FI[] = {
|
||||
@@ -337,16 +342,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_fi,
|
||||
&duckduckgo,
|
||||
@@ -283,7 +283,7 @@ const PrepopulatedEngine* const engines_FI[] = {
|
||||
@@ -320,7 +320,7 @@ const PrepopulatedEngine* const engines_FI[] = {
|
||||
|
||||
// Faroe Islands
|
||||
const PrepopulatedEngine* const engines_FO[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yahoo_dk,
|
||||
&duckduckgo,
|
||||
@@ -291,7 +291,7 @@ const PrepopulatedEngine* const engines_FO[] = {
|
||||
@@ -329,7 +329,7 @@ const PrepopulatedEngine* const engines_FO[] = {
|
||||
|
||||
// France
|
||||
const PrepopulatedEngine* const engines_FR[] = {
|
||||
@@ -355,7 +360,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_fr,
|
||||
&qwant,
|
||||
@@ -299,7 +299,7 @@ const PrepopulatedEngine* const engines_FR[] = {
|
||||
@@ -338,7 +338,7 @@ const PrepopulatedEngine* const engines_FR[] = {
|
||||
|
||||
// United Kingdom
|
||||
const PrepopulatedEngine* const engines_GB[] = {
|
||||
@@ -364,7 +369,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_uk,
|
||||
&duckduckgo,
|
||||
@@ -307,7 +307,7 @@ const PrepopulatedEngine* const engines_GB[] = {
|
||||
@@ -347,7 +347,7 @@ const PrepopulatedEngine* const engines_GB[] = {
|
||||
|
||||
// Greece
|
||||
const PrepopulatedEngine* const engines_GR[] = {
|
||||
@@ -373,7 +378,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -315,7 +315,7 @@ const PrepopulatedEngine* const engines_GR[] = {
|
||||
@@ -356,7 +356,7 @@ const PrepopulatedEngine* const engines_GR[] = {
|
||||
|
||||
// Guatemala
|
||||
const PrepopulatedEngine* const engines_GT[] = {
|
||||
@@ -381,8 +386,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -323,7 +323,7 @@ const PrepopulatedEngine* const engines_GT[] = {
|
||||
&ecosia,
|
||||
@@ -365,7 +365,7 @@ const PrepopulatedEngine* const engines_GT[] = {
|
||||
|
||||
// Hong Kong
|
||||
const PrepopulatedEngine* const engines_HK[] = {
|
||||
@@ -390,8 +395,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&yahoo_hk,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -331,7 +331,7 @@ const PrepopulatedEngine* const engines_HK[] = {
|
||||
&yandex_com,
|
||||
@@ -374,7 +374,7 @@ const PrepopulatedEngine* const engines_HK[] = {
|
||||
|
||||
// Honduras
|
||||
const PrepopulatedEngine* const engines_HN[] = {
|
||||
@@ -399,8 +404,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -339,7 +339,7 @@ const PrepopulatedEngine* const engines_HN[] = {
|
||||
&yandex_ru,
|
||||
@@ -383,7 +383,7 @@ const PrepopulatedEngine* const engines_HN[] = {
|
||||
|
||||
// Croatia
|
||||
const PrepopulatedEngine* const engines_HR[] = {
|
||||
@@ -409,16 +414,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -347,7 +347,7 @@ const PrepopulatedEngine* const engines_HR[] = {
|
||||
@@ -392,7 +392,7 @@ const PrepopulatedEngine* const engines_HR[] = {
|
||||
|
||||
// Hungary
|
||||
const PrepopulatedEngine* const engines_HU[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -355,7 +355,7 @@ const PrepopulatedEngine* const engines_HU[] = {
|
||||
@@ -401,7 +401,7 @@ const PrepopulatedEngine* const engines_HU[] = {
|
||||
|
||||
// Indonesia
|
||||
const PrepopulatedEngine* const engines_ID[] = {
|
||||
@@ -427,7 +432,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo_id,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -363,7 +363,7 @@ const PrepopulatedEngine* const engines_ID[] = {
|
||||
@@ -410,7 +410,7 @@ const PrepopulatedEngine* const engines_ID[] = {
|
||||
|
||||
// Ireland
|
||||
const PrepopulatedEngine* const engines_IE[] = {
|
||||
@@ -436,7 +441,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -371,7 +371,7 @@ const PrepopulatedEngine* const engines_IE[] = {
|
||||
@@ -419,7 +419,7 @@ const PrepopulatedEngine* const engines_IE[] = {
|
||||
|
||||
// Israel
|
||||
const PrepopulatedEngine* const engines_IL[] = {
|
||||
@@ -445,7 +450,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -379,7 +379,7 @@ const PrepopulatedEngine* const engines_IL[] = {
|
||||
@@ -428,7 +428,7 @@ const PrepopulatedEngine* const engines_IL[] = {
|
||||
|
||||
// India
|
||||
const PrepopulatedEngine* const engines_IN[] = {
|
||||
@@ -454,7 +459,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo_in,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -387,7 +387,7 @@ const PrepopulatedEngine* const engines_IN[] = {
|
||||
@@ -437,7 +437,7 @@ const PrepopulatedEngine* const engines_IN[] = {
|
||||
|
||||
// Iraq
|
||||
const PrepopulatedEngine* const engines_IQ[] = {
|
||||
@@ -463,7 +468,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -395,14 +395,14 @@ const PrepopulatedEngine* const engines_IQ[] = {
|
||||
@@ -446,7 +446,7 @@ const PrepopulatedEngine* const engines_IQ[] = {
|
||||
|
||||
// Iran
|
||||
const PrepopulatedEngine* const engines_IR[] = {
|
||||
@@ -471,16 +476,17 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
};
|
||||
&yandex_ru,
|
||||
@@ -455,7 +455,7 @@ const PrepopulatedEngine* const engines_IR[] = {
|
||||
|
||||
// Iceland
|
||||
const PrepopulatedEngine* const engines_IS[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -410,7 +410,7 @@ const PrepopulatedEngine* const engines_IS[] = {
|
||||
&yahoo,
|
||||
@@ -464,7 +464,7 @@ const PrepopulatedEngine* const engines_IS[] = {
|
||||
|
||||
// Italy
|
||||
const PrepopulatedEngine* const engines_IT[] = {
|
||||
@@ -489,7 +495,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -418,7 +418,7 @@ const PrepopulatedEngine* const engines_IT[] = {
|
||||
@@ -473,7 +473,7 @@ const PrepopulatedEngine* const engines_IT[] = {
|
||||
|
||||
// Jamaica
|
||||
const PrepopulatedEngine* const engines_JM[] = {
|
||||
@@ -498,16 +504,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -426,7 +426,7 @@ const PrepopulatedEngine* const engines_JM[] = {
|
||||
@@ -482,7 +482,7 @@ const PrepopulatedEngine* const engines_JM[] = {
|
||||
|
||||
// Jordan
|
||||
const PrepopulatedEngine* const engines_JO[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -434,7 +434,7 @@ const PrepopulatedEngine* const engines_JO[] = {
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -491,7 +491,7 @@ const PrepopulatedEngine* const engines_JO[] = {
|
||||
|
||||
// Japan
|
||||
const PrepopulatedEngine* const engines_JP[] = {
|
||||
@@ -516,25 +522,25 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo_jp,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -442,7 +442,7 @@ const PrepopulatedEngine* const engines_JP[] = {
|
||||
@@ -500,7 +500,7 @@ const PrepopulatedEngine* const engines_JP[] = {
|
||||
|
||||
// Kenya
|
||||
const PrepopulatedEngine* const engines_KE[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -450,7 +450,7 @@ const PrepopulatedEngine* const engines_KE[] = {
|
||||
@@ -509,7 +509,7 @@ const PrepopulatedEngine* const engines_KE[] = {
|
||||
|
||||
// South Korea
|
||||
const PrepopulatedEngine* const engines_KR[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&naver,
|
||||
&daum,
|
||||
&bing,
|
||||
@@ -458,7 +458,7 @@ const PrepopulatedEngine* const engines_KR[] = {
|
||||
&daum,
|
||||
@@ -518,7 +518,7 @@ const PrepopulatedEngine* const engines_KR[] = {
|
||||
|
||||
// Kuwait
|
||||
const PrepopulatedEngine* const engines_KW[] = {
|
||||
@@ -542,8 +548,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -466,7 +466,7 @@ const PrepopulatedEngine* const engines_KW[] = {
|
||||
&duckduckgo,
|
||||
@@ -527,7 +527,7 @@ const PrepopulatedEngine* const engines_KW[] = {
|
||||
|
||||
// Kazakhstan
|
||||
const PrepopulatedEngine* const engines_KZ[] = {
|
||||
@@ -552,7 +558,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yandex_kz,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
@@ -474,7 +474,7 @@ const PrepopulatedEngine* const engines_KZ[] = {
|
||||
@@ -536,7 +536,7 @@ const PrepopulatedEngine* const engines_KZ[] = {
|
||||
|
||||
// Lebanon
|
||||
const PrepopulatedEngine* const engines_LB[] = {
|
||||
@@ -561,7 +567,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -482,7 +482,7 @@ const PrepopulatedEngine* const engines_LB[] = {
|
||||
@@ -545,7 +545,7 @@ const PrepopulatedEngine* const engines_LB[] = {
|
||||
|
||||
// Liechtenstein
|
||||
const PrepopulatedEngine* const engines_LI[] = {
|
||||
@@ -570,7 +576,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo,
|
||||
@@ -490,7 +490,7 @@ const PrepopulatedEngine* const engines_LI[] = {
|
||||
@@ -554,7 +554,7 @@ const PrepopulatedEngine* const engines_LI[] = {
|
||||
|
||||
// Lithuania
|
||||
const PrepopulatedEngine* const engines_LT[] = {
|
||||
@@ -579,7 +585,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -498,7 +498,7 @@ const PrepopulatedEngine* const engines_LT[] = {
|
||||
@@ -563,7 +563,7 @@ const PrepopulatedEngine* const engines_LT[] = {
|
||||
|
||||
// Luxembourg
|
||||
const PrepopulatedEngine* const engines_LU[] = {
|
||||
@@ -588,16 +594,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo,
|
||||
@@ -506,7 +506,7 @@ const PrepopulatedEngine* const engines_LU[] = {
|
||||
@@ -572,7 +572,7 @@ const PrepopulatedEngine* const engines_LU[] = {
|
||||
|
||||
// Latvia
|
||||
const PrepopulatedEngine* const engines_LV[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
&bing,
|
||||
&yahoo,
|
||||
@@ -514,7 +514,7 @@ const PrepopulatedEngine* const engines_LV[] = {
|
||||
@@ -581,7 +581,7 @@ const PrepopulatedEngine* const engines_LV[] = {
|
||||
|
||||
// Libya
|
||||
const PrepopulatedEngine* const engines_LY[] = {
|
||||
@@ -606,7 +612,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_com,
|
||||
@@ -522,7 +522,7 @@ const PrepopulatedEngine* const engines_LY[] = {
|
||||
@@ -590,7 +590,7 @@ const PrepopulatedEngine* const engines_LY[] = {
|
||||
|
||||
// Morocco
|
||||
const PrepopulatedEngine* const engines_MA[] = {
|
||||
@@ -614,17 +620,17 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -530,7 +530,7 @@ const PrepopulatedEngine* const engines_MA[] = {
|
||||
&duckduckgo,
|
||||
@@ -599,7 +599,7 @@ const PrepopulatedEngine* const engines_MA[] = {
|
||||
|
||||
// Monaco
|
||||
const PrepopulatedEngine* const engines_MC[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -538,7 +538,7 @@ const PrepopulatedEngine* const engines_MC[] = {
|
||||
&yahoo,
|
||||
@@ -608,7 +608,7 @@ const PrepopulatedEngine* const engines_MC[] = {
|
||||
|
||||
// Moldova
|
||||
const PrepopulatedEngine* const engines_MD[] = {
|
||||
@@ -633,25 +639,25 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yandex_ru,
|
||||
&mail_ru,
|
||||
&duckduckgo,
|
||||
@@ -546,7 +546,7 @@ const PrepopulatedEngine* const engines_MD[] = {
|
||||
@@ -617,7 +617,7 @@ const PrepopulatedEngine* const engines_MD[] = {
|
||||
|
||||
// Montenegro
|
||||
const PrepopulatedEngine* const engines_ME[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -554,7 +554,7 @@ const PrepopulatedEngine* const engines_ME[] = {
|
||||
@@ -626,7 +626,7 @@ const PrepopulatedEngine* const engines_ME[] = {
|
||||
|
||||
// Macedonia
|
||||
const PrepopulatedEngine* const engines_MK[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -562,7 +562,7 @@ const PrepopulatedEngine* const engines_MK[] = {
|
||||
@@ -635,7 +635,7 @@ const PrepopulatedEngine* const engines_MK[] = {
|
||||
|
||||
// Mexico
|
||||
const PrepopulatedEngine* const engines_MX[] = {
|
||||
@@ -659,17 +665,17 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_mx,
|
||||
&duckduckgo,
|
||||
@@ -570,7 +570,7 @@ const PrepopulatedEngine* const engines_MX[] = {
|
||||
&ecosia,
|
||||
@@ -644,7 +644,7 @@ const PrepopulatedEngine* const engines_MX[] = {
|
||||
|
||||
// Malaysia
|
||||
const PrepopulatedEngine* const engines_MY[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo_my,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -578,7 +578,7 @@ const PrepopulatedEngine* const engines_MY[] = {
|
||||
&yahoo_my,
|
||||
&duckduckgo,
|
||||
@@ -653,7 +653,7 @@ const PrepopulatedEngine* const engines_MY[] = {
|
||||
|
||||
// Nicaragua
|
||||
const PrepopulatedEngine* const engines_NI[] = {
|
||||
@@ -678,7 +684,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -586,7 +586,7 @@ const PrepopulatedEngine* const engines_NI[] = {
|
||||
@@ -662,7 +662,7 @@ const PrepopulatedEngine* const engines_NI[] = {
|
||||
|
||||
// Netherlands
|
||||
const PrepopulatedEngine* const engines_NL[] = {
|
||||
@@ -687,7 +693,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_nl,
|
||||
&duckduckgo,
|
||||
@@ -594,7 +594,7 @@ const PrepopulatedEngine* const engines_NL[] = {
|
||||
@@ -671,7 +671,7 @@ const PrepopulatedEngine* const engines_NL[] = {
|
||||
|
||||
// Norway
|
||||
const PrepopulatedEngine* const engines_NO[] = {
|
||||
@@ -696,7 +702,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -602,7 +602,7 @@ const PrepopulatedEngine* const engines_NO[] = {
|
||||
@@ -680,7 +680,7 @@ const PrepopulatedEngine* const engines_NO[] = {
|
||||
|
||||
// New Zealand
|
||||
const PrepopulatedEngine* const engines_NZ[] = {
|
||||
@@ -705,7 +711,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&yahoo_nz,
|
||||
@@ -610,7 +610,7 @@ const PrepopulatedEngine* const engines_NZ[] = {
|
||||
@@ -689,7 +689,7 @@ const PrepopulatedEngine* const engines_NZ[] = {
|
||||
|
||||
// Oman
|
||||
const PrepopulatedEngine* const engines_OM[] = {
|
||||
@@ -713,8 +719,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -618,7 +618,7 @@ const PrepopulatedEngine* const engines_OM[] = {
|
||||
&duckduckgo,
|
||||
@@ -698,7 +698,7 @@ const PrepopulatedEngine* const engines_OM[] = {
|
||||
|
||||
// Panama
|
||||
const PrepopulatedEngine* const engines_PA[] = {
|
||||
@@ -723,16 +729,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -626,7 +626,7 @@ const PrepopulatedEngine* const engines_PA[] = {
|
||||
@@ -707,7 +707,7 @@ const PrepopulatedEngine* const engines_PA[] = {
|
||||
|
||||
// Peru
|
||||
const PrepopulatedEngine* const engines_PE[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yahoo_pe,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -634,7 +634,7 @@ const PrepopulatedEngine* const engines_PE[] = {
|
||||
&yahoo_pe,
|
||||
&ecosia,
|
||||
@@ -716,7 +716,7 @@ const PrepopulatedEngine* const engines_PE[] = {
|
||||
|
||||
// Philippines
|
||||
const PrepopulatedEngine* const engines_PH[] = {
|
||||
@@ -740,8 +746,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&yahoo_ph,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -642,7 +642,7 @@ const PrepopulatedEngine* const engines_PH[] = {
|
||||
&ecosia,
|
||||
@@ -725,7 +725,7 @@ const PrepopulatedEngine* const engines_PH[] = {
|
||||
|
||||
// Pakistan
|
||||
const PrepopulatedEngine* const engines_PK[] = {
|
||||
@@ -749,8 +755,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -650,7 +650,7 @@ const PrepopulatedEngine* const engines_PK[] = {
|
||||
&duckduckgo,
|
||||
@@ -734,7 +734,7 @@ const PrepopulatedEngine* const engines_PK[] = {
|
||||
|
||||
// Poland
|
||||
const PrepopulatedEngine* const engines_PL[] = {
|
||||
@@ -759,7 +765,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -658,7 +658,7 @@ const PrepopulatedEngine* const engines_PL[] = {
|
||||
@@ -743,7 +743,7 @@ const PrepopulatedEngine* const engines_PL[] = {
|
||||
|
||||
// Puerto Rico
|
||||
const PrepopulatedEngine* const engines_PR[] = {
|
||||
@@ -768,7 +774,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -666,7 +666,7 @@ const PrepopulatedEngine* const engines_PR[] = {
|
||||
@@ -752,7 +752,7 @@ const PrepopulatedEngine* const engines_PR[] = {
|
||||
|
||||
// Portugal
|
||||
const PrepopulatedEngine* const engines_PT[] = {
|
||||
@@ -777,7 +783,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -674,7 +674,7 @@ const PrepopulatedEngine* const engines_PT[] = {
|
||||
@@ -761,7 +761,7 @@ const PrepopulatedEngine* const engines_PT[] = {
|
||||
|
||||
// Paraguay
|
||||
const PrepopulatedEngine* const engines_PY[] = {
|
||||
@@ -786,7 +792,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -682,7 +682,7 @@ const PrepopulatedEngine* const engines_PY[] = {
|
||||
@@ -770,7 +770,7 @@ const PrepopulatedEngine* const engines_PY[] = {
|
||||
|
||||
// Qatar
|
||||
const PrepopulatedEngine* const engines_QA[] = {
|
||||
@@ -794,8 +800,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -690,7 +690,7 @@ const PrepopulatedEngine* const engines_QA[] = {
|
||||
&duckduckgo,
|
||||
@@ -779,7 +779,7 @@ const PrepopulatedEngine* const engines_QA[] = {
|
||||
|
||||
// Romania
|
||||
const PrepopulatedEngine* const engines_RO[] = {
|
||||
@@ -804,7 +810,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -698,7 +698,7 @@ const PrepopulatedEngine* const engines_RO[] = {
|
||||
@@ -788,7 +788,7 @@ const PrepopulatedEngine* const engines_RO[] = {
|
||||
|
||||
// Serbia
|
||||
const PrepopulatedEngine* const engines_RS[] = {
|
||||
@@ -813,15 +819,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -707,14 +707,14 @@ const PrepopulatedEngine* const engines_RS[] = {
|
||||
@@ -797,7 +797,7 @@ const PrepopulatedEngine* const engines_RS[] = {
|
||||
|
||||
// Russia
|
||||
const PrepopulatedEngine* const engines_RU[] = {
|
||||
&yandex_ru,
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yandex_ru,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
};
|
||||
@@ -806,7 +806,7 @@ const PrepopulatedEngine* const engines_RU[] = {
|
||||
|
||||
// Rwanda
|
||||
const PrepopulatedEngine* const engines_RW[] = {
|
||||
@@ -829,8 +836,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -722,7 +722,7 @@ const PrepopulatedEngine* const engines_RW[] = {
|
||||
&duckduckgo,
|
||||
@@ -815,7 +815,7 @@ const PrepopulatedEngine* const engines_RW[] = {
|
||||
|
||||
// Saudi Arabia
|
||||
const PrepopulatedEngine* const engines_SA[] = {
|
||||
@@ -839,7 +846,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_com,
|
||||
@@ -730,7 +730,7 @@ const PrepopulatedEngine* const engines_SA[] = {
|
||||
@@ -824,7 +824,7 @@ const PrepopulatedEngine* const engines_SA[] = {
|
||||
|
||||
// Sweden
|
||||
const PrepopulatedEngine* const engines_SE[] = {
|
||||
@@ -848,25 +855,25 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo_se,
|
||||
&duckduckgo,
|
||||
@@ -738,7 +738,7 @@ const PrepopulatedEngine* const engines_SE[] = {
|
||||
@@ -833,7 +833,7 @@ const PrepopulatedEngine* const engines_SE[] = {
|
||||
|
||||
// Singapore
|
||||
const PrepopulatedEngine* const engines_SG[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo_sg,
|
||||
&yandex_com,
|
||||
@@ -746,7 +746,7 @@ const PrepopulatedEngine* const engines_SG[] = {
|
||||
&yahoo_sg,
|
||||
@@ -842,7 +842,7 @@ const PrepopulatedEngine* const engines_SG[] = {
|
||||
|
||||
// Slovenia
|
||||
const PrepopulatedEngine* const engines_SI[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -754,7 +754,7 @@ const PrepopulatedEngine* const engines_SI[] = {
|
||||
&yahoo,
|
||||
@@ -851,7 +851,7 @@ const PrepopulatedEngine* const engines_SI[] = {
|
||||
|
||||
// Slovakia
|
||||
const PrepopulatedEngine* const engines_SK[] = {
|
||||
@@ -875,7 +882,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -762,7 +762,7 @@ const PrepopulatedEngine* const engines_SK[] = {
|
||||
@@ -860,7 +860,7 @@ const PrepopulatedEngine* const engines_SK[] = {
|
||||
|
||||
// El Salvador
|
||||
const PrepopulatedEngine* const engines_SV[] = {
|
||||
@@ -884,7 +891,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -770,7 +770,7 @@ const PrepopulatedEngine* const engines_SV[] = {
|
||||
@@ -869,7 +869,7 @@ const PrepopulatedEngine* const engines_SV[] = {
|
||||
|
||||
// Syria
|
||||
const PrepopulatedEngine* const engines_SY[] = {
|
||||
@@ -893,7 +900,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -778,7 +778,7 @@ const PrepopulatedEngine* const engines_SY[] = {
|
||||
@@ -878,7 +878,7 @@ const PrepopulatedEngine* const engines_SY[] = {
|
||||
|
||||
// Thailand
|
||||
const PrepopulatedEngine* const engines_TH[] = {
|
||||
@@ -901,8 +908,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&yahoo_th,
|
||||
&bing,
|
||||
&ask,
|
||||
@@ -786,7 +786,7 @@ const PrepopulatedEngine* const engines_TH[] = {
|
||||
&duckduckgo,
|
||||
@@ -887,7 +887,7 @@ const PrepopulatedEngine* const engines_TH[] = {
|
||||
|
||||
// Tunisia
|
||||
const PrepopulatedEngine* const engines_TN[] = {
|
||||
@@ -911,7 +918,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -794,7 +794,7 @@ const PrepopulatedEngine* const engines_TN[] = {
|
||||
@@ -896,7 +896,7 @@ const PrepopulatedEngine* const engines_TN[] = {
|
||||
|
||||
// Turkey
|
||||
const PrepopulatedEngine* const engines_TR[] = {
|
||||
@@ -920,7 +927,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yandex_tr,
|
||||
&yahoo_tr,
|
||||
&bing,
|
||||
@@ -802,7 +802,7 @@ const PrepopulatedEngine* const engines_TR[] = {
|
||||
@@ -905,7 +905,7 @@ const PrepopulatedEngine* const engines_TR[] = {
|
||||
|
||||
// Trinidad and Tobago
|
||||
const PrepopulatedEngine* const engines_TT[] = {
|
||||
@@ -929,7 +936,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -810,7 +810,7 @@ const PrepopulatedEngine* const engines_TT[] = {
|
||||
@@ -914,7 +914,7 @@ const PrepopulatedEngine* const engines_TT[] = {
|
||||
|
||||
// Taiwan
|
||||
const PrepopulatedEngine* const engines_TW[] = {
|
||||
@@ -938,7 +945,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo_tw,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -818,7 +818,7 @@ const PrepopulatedEngine* const engines_TW[] = {
|
||||
@@ -923,7 +923,7 @@ const PrepopulatedEngine* const engines_TW[] = {
|
||||
|
||||
// Tanzania
|
||||
const PrepopulatedEngine* const engines_TZ[] = {
|
||||
@@ -946,17 +953,17 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -826,7 +826,7 @@ const PrepopulatedEngine* const engines_TZ[] = {
|
||||
&duckduckgo,
|
||||
@@ -932,7 +932,7 @@ const PrepopulatedEngine* const engines_TZ[] = {
|
||||
|
||||
// Ukraine
|
||||
const PrepopulatedEngine* const engines_UA[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&yandex_ua,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
@@ -834,7 +834,7 @@ const PrepopulatedEngine* const engines_UA[] = {
|
||||
&mail_ru,
|
||||
@@ -941,7 +941,7 @@ const PrepopulatedEngine* const engines_UA[] = {
|
||||
|
||||
// United States
|
||||
const PrepopulatedEngine* const engines_US[] = {
|
||||
@@ -965,7 +972,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -842,7 +842,7 @@ const PrepopulatedEngine* const engines_US[] = {
|
||||
@@ -950,7 +950,7 @@ const PrepopulatedEngine* const engines_US[] = {
|
||||
|
||||
// Uruguay
|
||||
const PrepopulatedEngine* const engines_UY[] = {
|
||||
@@ -974,7 +981,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -850,7 +850,7 @@ const PrepopulatedEngine* const engines_UY[] = {
|
||||
@@ -959,7 +959,7 @@ const PrepopulatedEngine* const engines_UY[] = {
|
||||
|
||||
// Venezuela
|
||||
const PrepopulatedEngine* const engines_VE[] = {
|
||||
@@ -983,16 +990,16 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&yahoo_ve,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -858,7 +858,7 @@ const PrepopulatedEngine* const engines_VE[] = {
|
||||
@@ -968,7 +968,7 @@ const PrepopulatedEngine* const engines_VE[] = {
|
||||
|
||||
// Vietnam
|
||||
const PrepopulatedEngine* const engines_VN[] = {
|
||||
- &google,
|
||||
+ &googleen, &google,
|
||||
&coccoc,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yahoo_vn,
|
||||
@@ -866,7 +866,7 @@ const PrepopulatedEngine* const engines_VN[] = {
|
||||
@@ -977,7 +977,7 @@ const PrepopulatedEngine* const engines_VN[] = {
|
||||
|
||||
// Yemen
|
||||
const PrepopulatedEngine* const engines_YE[] = {
|
||||
@@ -1000,8 +1007,8 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&baidu,
|
||||
@@ -874,7 +874,7 @@ const PrepopulatedEngine* const engines_YE[] = {
|
||||
&yandex_ru,
|
||||
@@ -986,7 +986,7 @@ const PrepopulatedEngine* const engines_YE[] = {
|
||||
|
||||
// South Africa
|
||||
const PrepopulatedEngine* const engines_ZA[] = {
|
||||
@@ -1010,7 +1017,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -882,7 +882,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
|
||||
@@ -995,7 +995,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
|
||||
|
||||
// Zimbabwe
|
||||
const PrepopulatedEngine* const engines_ZW[] = {
|
||||
@@ -1018,7 +1025,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon
|
||||
+ &googleen, &google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&baidu,
|
||||
&ask,
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,992 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 12 Mar 2018 20:31:44 +0100
|
||||
Subject: Add Qwant search engine
|
||||
|
||||
Specify image URL in upstream engine definition
|
||||
Make search engine selectable in default list
|
||||
---
|
||||
.../search_engines/prepopulated_engines.json | 1 +
|
||||
.../template_url_prepopulate_data.cc | 216 +++++++++---------
|
||||
2 files changed, 109 insertions(+), 108 deletions(-)
|
||||
|
||||
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
|
||||
@@ -183,6 +183,7 @@
|
||||
"favicon_url": "https://www.qwant.com/favicon.ico",
|
||||
"search_url": "https://www.qwant.com/?q={searchTerms}&client=opensearch",
|
||||
"suggest_url": "https://api.qwant.com/api/suggest/?q={searchTerms}&client=opensearch",
|
||||
+ "image_url": "https://www.qwant.com/?t=images&q={searchTerms}",
|
||||
"type": "SEARCH_ENGINE_QWANT",
|
||||
"id": 94
|
||||
},
|
||||
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
|
||||
@@ -32,7 +32,7 @@ namespace {
|
||||
|
||||
// Default (for countries with no better engine set)
|
||||
const PrepopulatedEngine* const engines_default[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -42,7 +42,7 @@ const PrepopulatedEngine* const engines_default[] = {
|
||||
// Engine selection by country ------------------------------------------------
|
||||
// United Arab Emirates
|
||||
const PrepopulatedEngine* const engines_AE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -50,7 +50,7 @@ const PrepopulatedEngine* const engines_AE[] = {
|
||||
|
||||
// Albania
|
||||
const PrepopulatedEngine* const engines_AL[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&ask,
|
||||
@@ -58,7 +58,7 @@ const PrepopulatedEngine* const engines_AL[] = {
|
||||
|
||||
// Argentina
|
||||
const PrepopulatedEngine* const engines_AR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_ar,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -66,7 +66,7 @@ const PrepopulatedEngine* const engines_AR[] = {
|
||||
|
||||
// Austria
|
||||
const PrepopulatedEngine* const engines_AT[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_at,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -74,7 +74,7 @@ const PrepopulatedEngine* const engines_AT[] = {
|
||||
|
||||
// Australia
|
||||
const PrepopulatedEngine* const engines_AU[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_au,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -82,7 +82,7 @@ const PrepopulatedEngine* const engines_AU[] = {
|
||||
|
||||
// Bosnia and Herzegovina
|
||||
const PrepopulatedEngine* const engines_BA[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&ask,
|
||||
@@ -90,7 +90,7 @@ const PrepopulatedEngine* const engines_BA[] = {
|
||||
|
||||
// Belgium
|
||||
const PrepopulatedEngine* const engines_BE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -98,7 +98,7 @@ const PrepopulatedEngine* const engines_BE[] = {
|
||||
|
||||
// Bulgaria
|
||||
const PrepopulatedEngine* const engines_BG[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -106,7 +106,7 @@ const PrepopulatedEngine* const engines_BG[] = {
|
||||
|
||||
// Bahrain
|
||||
const PrepopulatedEngine* const engines_BH[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -114,7 +114,7 @@ const PrepopulatedEngine* const engines_BH[] = {
|
||||
|
||||
// Burundi
|
||||
const PrepopulatedEngine* const engines_BI[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -122,7 +122,7 @@ const PrepopulatedEngine* const engines_BI[] = {
|
||||
|
||||
// Brunei
|
||||
const PrepopulatedEngine* const engines_BN[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -130,7 +130,7 @@ const PrepopulatedEngine* const engines_BN[] = {
|
||||
|
||||
// Bolivia
|
||||
const PrepopulatedEngine* const engines_BO[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -138,7 +138,7 @@ const PrepopulatedEngine* const engines_BO[] = {
|
||||
|
||||
// Brazil
|
||||
const PrepopulatedEngine* const engines_BR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_br,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -146,7 +146,7 @@ const PrepopulatedEngine* const engines_BR[] = {
|
||||
|
||||
// Belarus
|
||||
const PrepopulatedEngine* const engines_BY[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yandex_by,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
@@ -154,7 +154,7 @@ const PrepopulatedEngine* const engines_BY[] = {
|
||||
|
||||
// Belize
|
||||
const PrepopulatedEngine* const engines_BZ[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -163,12 +163,12 @@ const PrepopulatedEngine* const engines_BZ[] = {
|
||||
|
||||
// Canada
|
||||
const PrepopulatedEngine* const engines_CA[] = {
|
||||
- &googleen, &google, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo, &duckduckgo_light,
|
||||
+ &googleen, &google, &qwant, &bing, &yahoo_ca, &yahoo_qc, &duckduckgo, &duckduckgo_light,
|
||||
};
|
||||
|
||||
// Switzerland
|
||||
const PrepopulatedEngine* const engines_CH[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&duckduckgo_light,
|
||||
@@ -177,7 +177,7 @@ const PrepopulatedEngine* const engines_CH[] = {
|
||||
|
||||
// Chile
|
||||
const PrepopulatedEngine* const engines_CL[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_cl,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -185,12 +185,12 @@ const PrepopulatedEngine* const engines_CL[] = {
|
||||
|
||||
// China
|
||||
const PrepopulatedEngine* const engines_CN[] = {
|
||||
- &baidu, &so_360, &googleen, &google, &sogou, &bing,
|
||||
+ &baidu, &so_360, &googleen, &google, &qwant, &sogou, &bing,
|
||||
};
|
||||
|
||||
// Colombia
|
||||
const PrepopulatedEngine* const engines_CO[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_co,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -198,7 +198,7 @@ const PrepopulatedEngine* const engines_CO[] = {
|
||||
|
||||
// Costa Rica
|
||||
const PrepopulatedEngine* const engines_CR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -206,7 +206,7 @@ const PrepopulatedEngine* const engines_CR[] = {
|
||||
|
||||
// Czech Republic
|
||||
const PrepopulatedEngine* const engines_CZ[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&seznam,
|
||||
&bing,
|
||||
&yahoo,
|
||||
@@ -214,7 +214,7 @@ const PrepopulatedEngine* const engines_CZ[] = {
|
||||
|
||||
// Germany
|
||||
const PrepopulatedEngine* const engines_DE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_de,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -222,7 +222,7 @@ const PrepopulatedEngine* const engines_DE[] = {
|
||||
|
||||
// Denmark
|
||||
const PrepopulatedEngine* const engines_DK[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_dk,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -230,7 +230,7 @@ const PrepopulatedEngine* const engines_DK[] = {
|
||||
|
||||
// Dominican Republic
|
||||
const PrepopulatedEngine* const engines_DO[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -238,7 +238,7 @@ const PrepopulatedEngine* const engines_DO[] = {
|
||||
|
||||
// Algeria
|
||||
const PrepopulatedEngine* const engines_DZ[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -246,7 +246,7 @@ const PrepopulatedEngine* const engines_DZ[] = {
|
||||
|
||||
// Ecuador
|
||||
const PrepopulatedEngine* const engines_EC[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -254,7 +254,7 @@ const PrepopulatedEngine* const engines_EC[] = {
|
||||
|
||||
// Estonia
|
||||
const PrepopulatedEngine* const engines_EE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
&neti,
|
||||
@@ -262,7 +262,7 @@ const PrepopulatedEngine* const engines_EE[] = {
|
||||
|
||||
// Egypt
|
||||
const PrepopulatedEngine* const engines_EG[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -270,7 +270,7 @@ const PrepopulatedEngine* const engines_EG[] = {
|
||||
|
||||
// Spain
|
||||
const PrepopulatedEngine* const engines_ES[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_es,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -278,7 +278,7 @@ const PrepopulatedEngine* const engines_ES[] = {
|
||||
|
||||
// Finland
|
||||
const PrepopulatedEngine* const engines_FI[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_fi,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -286,7 +286,7 @@ const PrepopulatedEngine* const engines_FI[] = {
|
||||
|
||||
// Faroe Islands
|
||||
const PrepopulatedEngine* const engines_FO[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -294,7 +294,7 @@ const PrepopulatedEngine* const engines_FO[] = {
|
||||
|
||||
// France
|
||||
const PrepopulatedEngine* const engines_FR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_fr,
|
||||
&qwant,
|
||||
@@ -302,7 +302,7 @@ const PrepopulatedEngine* const engines_FR[] = {
|
||||
|
||||
// United Kingdom
|
||||
const PrepopulatedEngine* const engines_GB[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_uk,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -310,7 +310,7 @@ const PrepopulatedEngine* const engines_GB[] = {
|
||||
|
||||
// Greece
|
||||
const PrepopulatedEngine* const engines_GR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -318,7 +318,7 @@ const PrepopulatedEngine* const engines_GR[] = {
|
||||
|
||||
// Guatemala
|
||||
const PrepopulatedEngine* const engines_GT[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -326,7 +326,7 @@ const PrepopulatedEngine* const engines_GT[] = {
|
||||
|
||||
// Hong Kong
|
||||
const PrepopulatedEngine* const engines_HK[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_hk,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -334,7 +334,7 @@ const PrepopulatedEngine* const engines_HK[] = {
|
||||
|
||||
// Honduras
|
||||
const PrepopulatedEngine* const engines_HN[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -342,7 +342,7 @@ const PrepopulatedEngine* const engines_HN[] = {
|
||||
|
||||
// Croatia
|
||||
const PrepopulatedEngine* const engines_HR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -350,7 +350,7 @@ const PrepopulatedEngine* const engines_HR[] = {
|
||||
|
||||
// Hungary
|
||||
const PrepopulatedEngine* const engines_HU[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -358,7 +358,7 @@ const PrepopulatedEngine* const engines_HU[] = {
|
||||
|
||||
// Indonesia
|
||||
const PrepopulatedEngine* const engines_ID[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_id,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -366,7 +366,7 @@ const PrepopulatedEngine* const engines_ID[] = {
|
||||
|
||||
// Ireland
|
||||
const PrepopulatedEngine* const engines_IE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -374,7 +374,7 @@ const PrepopulatedEngine* const engines_IE[] = {
|
||||
|
||||
// Israel
|
||||
const PrepopulatedEngine* const engines_IL[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -382,7 +382,7 @@ const PrepopulatedEngine* const engines_IL[] = {
|
||||
|
||||
// India
|
||||
const PrepopulatedEngine* const engines_IN[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_in,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -390,7 +390,7 @@ const PrepopulatedEngine* const engines_IN[] = {
|
||||
|
||||
// Iraq
|
||||
const PrepopulatedEngine* const engines_IQ[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -398,14 +398,14 @@ const PrepopulatedEngine* const engines_IQ[] = {
|
||||
|
||||
// Iran
|
||||
const PrepopulatedEngine* const engines_IR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
};
|
||||
|
||||
// Iceland
|
||||
const PrepopulatedEngine* const engines_IS[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -413,7 +413,7 @@ const PrepopulatedEngine* const engines_IS[] = {
|
||||
|
||||
// Italy
|
||||
const PrepopulatedEngine* const engines_IT[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -421,7 +421,7 @@ const PrepopulatedEngine* const engines_IT[] = {
|
||||
|
||||
// Jamaica
|
||||
const PrepopulatedEngine* const engines_JM[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -429,7 +429,7 @@ const PrepopulatedEngine* const engines_JM[] = {
|
||||
|
||||
// Jordan
|
||||
const PrepopulatedEngine* const engines_JO[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -437,7 +437,7 @@ const PrepopulatedEngine* const engines_JO[] = {
|
||||
|
||||
// Japan
|
||||
const PrepopulatedEngine* const engines_JP[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_jp,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -445,7 +445,7 @@ const PrepopulatedEngine* const engines_JP[] = {
|
||||
|
||||
// Kenya
|
||||
const PrepopulatedEngine* const engines_KE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -453,7 +453,7 @@ const PrepopulatedEngine* const engines_KE[] = {
|
||||
|
||||
// South Korea
|
||||
const PrepopulatedEngine* const engines_KR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&naver,
|
||||
&daum,
|
||||
&bing,
|
||||
@@ -461,7 +461,7 @@ const PrepopulatedEngine* const engines_KR[] = {
|
||||
|
||||
// Kuwait
|
||||
const PrepopulatedEngine* const engines_KW[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -469,7 +469,7 @@ const PrepopulatedEngine* const engines_KW[] = {
|
||||
|
||||
// Kazakhstan
|
||||
const PrepopulatedEngine* const engines_KZ[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yandex_kz,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
@@ -477,7 +477,7 @@ const PrepopulatedEngine* const engines_KZ[] = {
|
||||
|
||||
// Lebanon
|
||||
const PrepopulatedEngine* const engines_LB[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -486,7 +486,7 @@ const PrepopulatedEngine* const engines_LB[] = {
|
||||
|
||||
// Liechtenstein
|
||||
const PrepopulatedEngine* const engines_LI[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
&duckduckgo_light,
|
||||
@@ -495,7 +495,7 @@ const PrepopulatedEngine* const engines_LI[] = {
|
||||
|
||||
// Lithuania
|
||||
const PrepopulatedEngine* const engines_LT[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -503,7 +503,7 @@ const PrepopulatedEngine* const engines_LT[] = {
|
||||
|
||||
// Luxembourg
|
||||
const PrepopulatedEngine* const engines_LU[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
&yahoo,
|
||||
@@ -511,7 +511,7 @@ const PrepopulatedEngine* const engines_LU[] = {
|
||||
|
||||
// Latvia
|
||||
const PrepopulatedEngine* const engines_LV[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
&yahoo,
|
||||
@@ -519,7 +519,7 @@ const PrepopulatedEngine* const engines_LV[] = {
|
||||
|
||||
// Libya
|
||||
const PrepopulatedEngine* const engines_LY[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_com,
|
||||
@@ -527,7 +527,7 @@ const PrepopulatedEngine* const engines_LY[] = {
|
||||
|
||||
// Morocco
|
||||
const PrepopulatedEngine* const engines_MA[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -535,7 +535,7 @@ const PrepopulatedEngine* const engines_MA[] = {
|
||||
|
||||
// Monaco
|
||||
const PrepopulatedEngine* const engines_MC[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -543,7 +543,7 @@ const PrepopulatedEngine* const engines_MC[] = {
|
||||
|
||||
// Moldova
|
||||
const PrepopulatedEngine* const engines_MD[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yandex_ru,
|
||||
&mail_ru,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -551,7 +551,7 @@ const PrepopulatedEngine* const engines_MD[] = {
|
||||
|
||||
// Montenegro
|
||||
const PrepopulatedEngine* const engines_ME[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -559,7 +559,7 @@ const PrepopulatedEngine* const engines_ME[] = {
|
||||
|
||||
// Macedonia
|
||||
const PrepopulatedEngine* const engines_MK[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -567,7 +567,7 @@ const PrepopulatedEngine* const engines_MK[] = {
|
||||
|
||||
// Mexico
|
||||
const PrepopulatedEngine* const engines_MX[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_mx,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -575,7 +575,7 @@ const PrepopulatedEngine* const engines_MX[] = {
|
||||
|
||||
// Malaysia
|
||||
const PrepopulatedEngine* const engines_MY[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_my,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -583,7 +583,7 @@ const PrepopulatedEngine* const engines_MY[] = {
|
||||
|
||||
// Nicaragua
|
||||
const PrepopulatedEngine* const engines_NI[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -591,7 +591,7 @@ const PrepopulatedEngine* const engines_NI[] = {
|
||||
|
||||
// Netherlands
|
||||
const PrepopulatedEngine* const engines_NL[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_nl,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -599,7 +599,7 @@ const PrepopulatedEngine* const engines_NL[] = {
|
||||
|
||||
// Norway
|
||||
const PrepopulatedEngine* const engines_NO[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo,
|
||||
@@ -608,7 +608,7 @@ const PrepopulatedEngine* const engines_NO[] = {
|
||||
|
||||
// New Zealand
|
||||
const PrepopulatedEngine* const engines_NZ[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
&yahoo_nz,
|
||||
@@ -616,7 +616,7 @@ const PrepopulatedEngine* const engines_NZ[] = {
|
||||
|
||||
// Oman
|
||||
const PrepopulatedEngine* const engines_OM[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -624,7 +624,7 @@ const PrepopulatedEngine* const engines_OM[] = {
|
||||
|
||||
// Panama
|
||||
const PrepopulatedEngine* const engines_PA[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -632,7 +632,7 @@ const PrepopulatedEngine* const engines_PA[] = {
|
||||
|
||||
// Peru
|
||||
const PrepopulatedEngine* const engines_PE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_pe,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -640,7 +640,7 @@ const PrepopulatedEngine* const engines_PE[] = {
|
||||
|
||||
// Philippines
|
||||
const PrepopulatedEngine* const engines_PH[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_ph,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -648,7 +648,7 @@ const PrepopulatedEngine* const engines_PH[] = {
|
||||
|
||||
// Pakistan
|
||||
const PrepopulatedEngine* const engines_PK[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -656,7 +656,7 @@ const PrepopulatedEngine* const engines_PK[] = {
|
||||
|
||||
// Poland
|
||||
const PrepopulatedEngine* const engines_PL[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -664,7 +664,7 @@ const PrepopulatedEngine* const engines_PL[] = {
|
||||
|
||||
// Puerto Rico
|
||||
const PrepopulatedEngine* const engines_PR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -672,7 +672,7 @@ const PrepopulatedEngine* const engines_PR[] = {
|
||||
|
||||
// Portugal
|
||||
const PrepopulatedEngine* const engines_PT[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -680,7 +680,7 @@ const PrepopulatedEngine* const engines_PT[] = {
|
||||
|
||||
// Paraguay
|
||||
const PrepopulatedEngine* const engines_PY[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -688,7 +688,7 @@ const PrepopulatedEngine* const engines_PY[] = {
|
||||
|
||||
// Qatar
|
||||
const PrepopulatedEngine* const engines_QA[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&ask,
|
||||
@@ -696,7 +696,7 @@ const PrepopulatedEngine* const engines_QA[] = {
|
||||
|
||||
// Romania
|
||||
const PrepopulatedEngine* const engines_RO[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -704,7 +704,7 @@ const PrepopulatedEngine* const engines_RO[] = {
|
||||
|
||||
// Serbia
|
||||
const PrepopulatedEngine* const engines_RS[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -713,14 +713,14 @@ const PrepopulatedEngine* const engines_RS[] = {
|
||||
// Russia
|
||||
const PrepopulatedEngine* const engines_RU[] = {
|
||||
&yandex_ru,
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
};
|
||||
|
||||
// Rwanda
|
||||
const PrepopulatedEngine* const engines_RW[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -728,7 +728,7 @@ const PrepopulatedEngine* const engines_RW[] = {
|
||||
|
||||
// Saudi Arabia
|
||||
const PrepopulatedEngine* const engines_SA[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_com,
|
||||
@@ -736,7 +736,7 @@ const PrepopulatedEngine* const engines_SA[] = {
|
||||
|
||||
// Sweden
|
||||
const PrepopulatedEngine* const engines_SE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_se,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -744,7 +744,7 @@ const PrepopulatedEngine* const engines_SE[] = {
|
||||
|
||||
// Singapore
|
||||
const PrepopulatedEngine* const engines_SG[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo_sg,
|
||||
&yandex_com,
|
||||
@@ -752,7 +752,7 @@ const PrepopulatedEngine* const engines_SG[] = {
|
||||
|
||||
// Slovenia
|
||||
const PrepopulatedEngine* const engines_SI[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -760,7 +760,7 @@ const PrepopulatedEngine* const engines_SI[] = {
|
||||
|
||||
// Slovakia
|
||||
const PrepopulatedEngine* const engines_SK[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -768,7 +768,7 @@ const PrepopulatedEngine* const engines_SK[] = {
|
||||
|
||||
// El Salvador
|
||||
const PrepopulatedEngine* const engines_SV[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -776,7 +776,7 @@ const PrepopulatedEngine* const engines_SV[] = {
|
||||
|
||||
// Syria
|
||||
const PrepopulatedEngine* const engines_SY[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -784,7 +784,7 @@ const PrepopulatedEngine* const engines_SY[] = {
|
||||
|
||||
// Thailand
|
||||
const PrepopulatedEngine* const engines_TH[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_th,
|
||||
&bing,
|
||||
&ask,
|
||||
@@ -792,7 +792,7 @@ const PrepopulatedEngine* const engines_TH[] = {
|
||||
|
||||
// Tunisia
|
||||
const PrepopulatedEngine* const engines_TN[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo,
|
||||
&bing,
|
||||
&yandex_ru,
|
||||
@@ -800,7 +800,7 @@ const PrepopulatedEngine* const engines_TN[] = {
|
||||
|
||||
// Turkey
|
||||
const PrepopulatedEngine* const engines_TR[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yandex_tr,
|
||||
&yahoo_tr,
|
||||
&bing,
|
||||
@@ -808,7 +808,7 @@ const PrepopulatedEngine* const engines_TR[] = {
|
||||
|
||||
// Trinidad and Tobago
|
||||
const PrepopulatedEngine* const engines_TT[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -816,7 +816,7 @@ const PrepopulatedEngine* const engines_TT[] = {
|
||||
|
||||
// Taiwan
|
||||
const PrepopulatedEngine* const engines_TW[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_tw,
|
||||
&bing,
|
||||
&baidu,
|
||||
@@ -824,7 +824,7 @@ const PrepopulatedEngine* const engines_TW[] = {
|
||||
|
||||
// Tanzania
|
||||
const PrepopulatedEngine* const engines_TZ[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&yandex_ru,
|
||||
@@ -832,7 +832,7 @@ const PrepopulatedEngine* const engines_TZ[] = {
|
||||
|
||||
// Ukraine
|
||||
const PrepopulatedEngine* const engines_UA[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yandex_ua,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
@@ -840,7 +840,7 @@ const PrepopulatedEngine* const engines_UA[] = {
|
||||
|
||||
// United States
|
||||
const PrepopulatedEngine* const engines_US[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -848,7 +848,7 @@ const PrepopulatedEngine* const engines_US[] = {
|
||||
|
||||
// Uruguay
|
||||
const PrepopulatedEngine* const engines_UY[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -856,7 +856,7 @@ const PrepopulatedEngine* const engines_UY[] = {
|
||||
|
||||
// Venezuela
|
||||
const PrepopulatedEngine* const engines_VE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&yahoo_ve,
|
||||
&bing,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -864,7 +864,7 @@ const PrepopulatedEngine* const engines_VE[] = {
|
||||
|
||||
// Vietnam
|
||||
const PrepopulatedEngine* const engines_VN[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&coccoc,
|
||||
&bing,
|
||||
&yahoo_vn,
|
||||
@@ -872,7 +872,7 @@ const PrepopulatedEngine* const engines_VN[] = {
|
||||
|
||||
// Yemen
|
||||
const PrepopulatedEngine* const engines_YE[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&baidu,
|
||||
@@ -880,7 +880,7 @@ const PrepopulatedEngine* const engines_YE[] = {
|
||||
|
||||
// South Africa
|
||||
const PrepopulatedEngine* const engines_ZA[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&duckduckgo, &duckduckgo_light,
|
||||
@@ -888,7 +888,7 @@ const PrepopulatedEngine* const engines_ZA[] = {
|
||||
|
||||
// Zimbabwe
|
||||
const PrepopulatedEngine* const engines_ZW[] = {
|
||||
- &googleen, &google,
|
||||
+ &googleen, &google, &qwant,
|
||||
&bing,
|
||||
&yahoo,
|
||||
&baidu,
|
||||
--
|
||||
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
|
||||
@@ -4499,6 +4499,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kEnableAmbientAuthenticationInIncognito)},
|
||||
|
||||
+#if defined(OS_ANDROID)
|
||||
+ {switches::kEnableIncognitoSnapshotsInAndroidRecents, flag_descriptions::kEnableIncognitoSnapshotsInAndroidRecentsName,
|
||||
+ flag_descriptions::kEnableIncognitoSnapshotsInAndroidRecentsDescription, kOsAndroid,
|
||||
+ SINGLE_VALUE_TYPE(switches::kEnableIncognitoSnapshotsInAndroidRecents)},
|
||||
+#endif
|
||||
+
|
||||
{"enable-ambient-authentication-in-guest-session",
|
||||
flag_descriptions::kEnableAmbientAuthenticationInGuestSessionName,
|
||||
flag_descriptions::kEnableAmbientAuthenticationInGuestSessionDescription,
|
||||
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
|
||||
@@ -515,6 +515,11 @@ const char kEnableAmbientAuthenticationInIncognitoDescription[] =
|
||||
"Enables ambient authentication in Incognito mode. This flag may be "
|
||||
"overriden by policies.";
|
||||
|
||||
+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 kEnableAmbientAuthenticationInGuestSessionName[] =
|
||||
"Enable Ambient Authentication in Guest session.";
|
||||
const char kEnableAmbientAuthenticationInGuestSessionDescription[] =
|
||||
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
|
||||
@@ -316,6 +316,9 @@ extern const char kEnableAccessibilityObjectModelDescription[];
|
||||
extern const char kEnableAmbientAuthenticationInIncognitoName[];
|
||||
extern const char kEnableAmbientAuthenticationInIncognitoDescription[];
|
||||
|
||||
+extern const char kEnableIncognitoSnapshotsInAndroidRecentsName[];
|
||||
+extern const char kEnableIncognitoSnapshotsInAndroidRecentsDescription[];
|
||||
+
|
||||
extern const char kEnableAmbientAuthenticationInGuestSessionName[];
|
||||
extern const char kEnableAmbientAuthenticationInGuestSessionDescription[];
|
||||
|
||||
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
|
||||
@@ -144,10 +144,6 @@ public abstract class ChromeSwitches {{
|
||||
/** Switch for enabling the Chrome Survey. */
|
||||
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
|
||||
@@ -339,6 +339,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
|
||||
@@ -107,6 +107,7 @@ extern const char kForceFirstRun[];
|
||||
extern const char kForceStackedTabStripLayout[];
|
||||
extern const char kHomePage[];
|
||||
extern const char kIncognito[];
|
||||
+extern const char kEnableIncognitoSnapshotsInAndroidRecents[];
|
||||
extern const char kInstallAutogeneratedTheme[];
|
||||
extern const char kInstallChromeApp[];
|
||||
extern const char kInstallSupervisedUserWhitelists[];
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -13,20 +13,20 @@ Offer auto-complete for the proxy page URL.
|
||||
chrome/browser/browser_resources.grd | 6 +
|
||||
.../prefs/chrome_command_line_pref_store.cc | 2 +-
|
||||
chrome/browser/resources/proxy_config.css | 61 +++
|
||||
chrome/browser/resources/proxy_config.html | 78 ++++
|
||||
chrome/browser/resources/proxy_config.js | 252 +++++++++++
|
||||
chrome/browser/resources/proxy_config.html | 79 ++++
|
||||
chrome/browser/resources/proxy_config.js | 262 +++++++++++
|
||||
chrome/browser/ui/BUILD.gn | 2 +
|
||||
.../webui/chrome_web_ui_controller_factory.cc | 3 +
|
||||
chrome/browser/ui/webui/proxy_config_ui.cc | 395 ++++++++++++++++++
|
||||
chrome/browser/ui/webui/proxy_config_ui.cc | 413 ++++++++++++++++++
|
||||
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 +-
|
||||
.../proxy_config/proxy_config_dictionary.cc | 22 +-
|
||||
.../proxy_config/proxy_config_dictionary.h | 6 +-
|
||||
net/proxy_resolution/proxy_config.cc | 45 ++
|
||||
net/proxy_resolution/proxy_config.cc | 52 ++-
|
||||
net/proxy_resolution/proxy_config.h | 3 +
|
||||
19 files changed, 913 insertions(+), 12 deletions(-)
|
||||
19 files changed, 948 insertions(+), 13 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
|
||||
@@ -36,9 +36,9 @@ Offer auto-complete for the proxy page URL.
|
||||
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
|
||||
--- a/chrome/android/java/res/values/values.xml
|
||||
+++ b/chrome/android/java/res/values/values.xml
|
||||
@@ -78,6 +78,9 @@
|
||||
<integer name="list_item_level_selected">1</integer>
|
||||
<integer name="list_item_level_incognito">2</integer>
|
||||
@@ -66,6 +66,9 @@
|
||||
<!-- Our manage space activity. Default pre-KitKat to be nothing. -->
|
||||
<string name="manage_space_activity"></string>
|
||||
|
||||
+ <string name="proxy_title">Proxy configuration</string>
|
||||
+ <string name="proxy_url">chrome://proxy</string>
|
||||
@@ -53,17 +53,17 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
+ <org.chromium.chrome.browser.preferences.HyperlinkPreference
|
||||
+ <org.chromium.chrome.browser.about_settings.HyperlinkPreference
|
||||
+ android:key="proxy"
|
||||
+ android:title="@string/proxy_title"
|
||||
+ app:url="@string/proxy_url" />
|
||||
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
|
||||
<org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
android:key="search_suggestions"
|
||||
android:title="@string/search_suggestions_title"
|
||||
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
|
||||
@@ -256,6 +256,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
|
||||
@@ -245,6 +245,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
|
||||
std::vector<base::string16> builtins_to_provide;
|
||||
builtins_to_provide.push_back(
|
||||
base::ASCIIToUTF16(chrome::kChromeUIFlagsURL));
|
||||
@@ -75,23 +75,23 @@ 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
|
||||
@@ -202,6 +202,12 @@
|
||||
<include name="IDR_HANGOUT_SERVICES_MANIFEST" file="resources\hangout_services\manifest.json" type="BINDATA" />
|
||||
@@ -111,6 +111,12 @@
|
||||
<include name="IDR_OFFLINE_INTERNALS_BROWSER_PROXY_JS" file="resources\offline_pages\offline_internals_browser_proxy.js" type="BINDATA" />
|
||||
</if>
|
||||
|
||||
+ <!-- Bromite Proxy Configuration UI. -->
|
||||
+ <!-- Bromite Proxy Configuration UI -->
|
||||
+ <if expr="is_android">
|
||||
+ <include name="IDR_PROXY_CONFIG_HTML" file="resources\proxy_config.html" flattenhtml="true" type="BINDATA" compress="gzip" />
|
||||
+ <include name="IDR_PROXY_CONFIG_JS" file="resources\proxy_config.js" type="BINDATA" compress="gzip" />
|
||||
+ </if>
|
||||
+
|
||||
<!-- App Management. -->
|
||||
<if expr="not is_android">
|
||||
<include name="IDR_APP_MANAGEMENT_BITMAP_MOJO_LITE_JS" file="${root_gen_dir}\skia\public\mojom\bitmap.mojom-lite.js" use_base_dir="false" type="BINDATA" />
|
||||
<!-- New Tab Page -->
|
||||
<part file="resources/local_ntp/icons.grdp" />
|
||||
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
|
||||
@@ -152,7 +152,7 @@ void ChromeCommandLinePrefStore::ApplyProxyMode() {
|
||||
@@ -156,7 +156,7 @@ void ChromeCommandLinePrefStore::ApplyProxyMode() {
|
||||
SetValue(
|
||||
proxy_config::prefs::kProxy,
|
||||
std::make_unique<base::Value>(ProxyConfigDictionary::CreateFixedServers(
|
||||
@@ -170,7 +170,7 @@ diff --git a/chrome/browser/resources/proxy_config.html b/chrome/browser/resourc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/resources/proxy_config.html
|
||||
@@ -0,0 +1,78 @@
|
||||
@@ -0,0 +1,79 @@
|
||||
+<!doctype html>
|
||||
+<html>
|
||||
+<head>
|
||||
@@ -217,7 +217,8 @@ new file mode 100644
|
||||
+ Reset will update the displayed configuration to match the one currently in use.
|
||||
+ </div>
|
||||
+ <div class="section-container">
|
||||
+ <input type="radio" id="empty" name="mode" value="empty" checked><label for="empty">None</label><br/>
|
||||
+ <input type="radio" id="empty" name="mode" value="empty"><label for="empty">System Default</label><br/>
|
||||
+ <input type="radio" id="direct" name="mode" value="direct"><label for="direct">Direct</label><br/>
|
||||
+ <input type="radio" id="auto-detect" name="mode" value="auto-detect"><label for="auto-detect">Auto-detect (WPAD DHCP/DNS)</label><br/>
|
||||
+ <input type="radio" id="use-pac-url" name="mode" value="use-pac-url"><label for="use-pac-url">Use PAC URL: <input id='pac-url' value="" size="40" /></label>
|
||||
+ <p><input type="checkbox" id="pac-mandatory" name="pac-mandatory"><label for="pac-mandatory">Do not allow fallback to direct connection in case PAC script fails</label></p>
|
||||
@@ -253,7 +254,7 @@ diff --git a/chrome/browser/resources/proxy_config.js b/chrome/browser/resources
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/resources/proxy_config.js
|
||||
@@ -0,0 +1,252 @@
|
||||
@@ -0,0 +1,262 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -296,6 +297,7 @@ new file mode 100644
|
||||
+ var kIdClearButton = 'clear';
|
||||
+
|
||||
+ var kIdModeEmpty = 'empty';
|
||||
+ var kIdModeDirect = 'direct';
|
||||
+ var kIdModeAutoDetect = 'auto-detect';
|
||||
+ var kIdModeUsePacURL = 'use-pac-url';
|
||||
+
|
||||
@@ -381,7 +383,7 @@ new file mode 100644
|
||||
+ "rules": {
|
||||
+ "bypass_rules": "",
|
||||
+ "reverse_bypass": false,
|
||||
+ "type": "empty"
|
||||
+ "type": "none"
|
||||
+ }
|
||||
+ };
|
||||
+ },
|
||||
@@ -394,7 +396,14 @@ new file mode 100644
|
||||
+ return {
|
||||
+ "auto_detect": false,
|
||||
+ "rules": {
|
||||
+ "type": "empty"
|
||||
+ "type": "none"
|
||||
+ }
|
||||
+ };
|
||||
+ } else if ($(kIdModeDirect).checked) {
|
||||
+ return {
|
||||
+ "auto_detect": false,
|
||||
+ "rules": {
|
||||
+ "type": "direct"
|
||||
+ }
|
||||
+ };
|
||||
+ } else if ($(kIdModeAutoDetect).checked) {
|
||||
@@ -438,15 +447,17 @@ new file mode 100644
|
||||
+ * Updates the UI to display the current proxy configuration.
|
||||
+ */
|
||||
+ renderConfig_: function() {
|
||||
+ if (this.currentConfig.auto_detect)
|
||||
+ if (this.currentConfig.auto_detect) {
|
||||
+ $(kIdModeAutoDetect).checked = true;
|
||||
+ else if (this.currentConfig.hasOwnProperty('pac_url')) {
|
||||
+ } else if (this.currentConfig.rules.type == "none") {
|
||||
+ $(kIdModeEmpty).checked = true;
|
||||
+ } else if (this.currentConfig.rules.type == "direct") {
|
||||
+ $(kIdModeDirect).checked = true;
|
||||
+ } else if (this.currentConfig.hasOwnProperty('pac_url')) {
|
||||
+ $(kIdPacURL).value = this.currentConfig.pac_url;
|
||||
+ $(kIdPacMandatory).checked = this.currentConfig.pac_mandatory;
|
||||
+ $(kIdModeUsePacURL).checked = true;
|
||||
+ } else if (this.currentConfig.rules.type == "empty")
|
||||
+ $(kIdModeEmpty).checked = true;
|
||||
+ else {
|
||||
+ } else {
|
||||
+ $(kIdBypassRules).value = this.currentConfig.rules.bypass_rules;
|
||||
+ $(kIdReverseBypass).checked = this.currentConfig.rules.reverse_bypass;
|
||||
+
|
||||
@@ -509,7 +520,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
|
||||
@@ -263,6 +263,8 @@ jumbo_static_library("ui") {
|
||||
@@ -253,6 +253,8 @@ static_library("ui") {
|
||||
"webui/metrics_handler.h",
|
||||
"webui/net_export_ui.cc",
|
||||
"webui/net_export_ui.h",
|
||||
@@ -521,7 +532,7 @@ 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
|
||||
@@ -55,6 +55,7 @@
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "chrome/browser/ui/webui/omnibox/omnibox_ui.h"
|
||||
#include "chrome/browser/ui/webui/policy_ui.h"
|
||||
#include "chrome/browser/ui/webui/predictors/predictors_ui.h"
|
||||
@@ -529,7 +540,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom
|
||||
#include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
|
||||
#include "chrome/browser/ui/webui/settings/settings_ui.h"
|
||||
#include "chrome/browser/ui/webui/settings_utils.h"
|
||||
@@ -376,6 +377,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
|
||||
@@ -464,6 +465,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
|
||||
return &NewWebUI<MemoryInternalsUI>;
|
||||
if (url.host_piece() == chrome::kChromeUINetExportHost)
|
||||
return &NewWebUI<NetExportUI>;
|
||||
@@ -542,7 +553,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,395 @@
|
||||
@@ -0,0 +1,413 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -663,7 +674,7 @@ new file mode 100644
|
||||
+ weak_ptr_factory_(this) {
|
||||
+
|
||||
+ // used to set new configuration preferences
|
||||
+ profile_ = profile;
|
||||
+ profile_ = profile->GetOriginalProfile();
|
||||
+ // observer is explicitly added only later in enableNotifyUIWithState
|
||||
+ is_observing_ = false;
|
||||
+
|
||||
@@ -700,7 +711,7 @@ new file mode 100644
|
||||
+ encodeConfig(config.value(), state);
|
||||
+ break;
|
||||
+ case net::ProxyConfigService::CONFIG_UNSET:
|
||||
+ // nothing will be populated
|
||||
+ state.SetPath({"config", "rules", "type"}, base::Value("none"));
|
||||
+ break;
|
||||
+ case net::ProxyConfigService::CONFIG_PENDING:
|
||||
+ //NOTE: this can only happen when triggered manually first time
|
||||
@@ -736,7 +747,7 @@ new file mode 100644
|
||||
+ const char *type;
|
||||
+ switch (rules.type) {
|
||||
+ case net::ProxyConfig::ProxyRules::Type::EMPTY:
|
||||
+ type = "empty";
|
||||
+ type = "direct";
|
||||
+ break;
|
||||
+ case net::ProxyConfig::ProxyRules::Type::PROXY_LIST:
|
||||
+ type = "list";
|
||||
@@ -799,13 +810,25 @@ new file mode 100644
|
||||
+
|
||||
+ net::ProxyConfigWithAnnotation config;
|
||||
+ auto availability = proxy_config_service_->GetLatestProxyConfig(&config);
|
||||
+
|
||||
+ const base::DictionaryValue* dict =
|
||||
+ profile_->GetPrefs()->GetDictionary(proxy_config::prefs::kProxy);
|
||||
+ ProxyConfigDictionary proxy_dict(dict->Clone());
|
||||
+ ProxyPrefs::ProxyMode mode;
|
||||
+ if (!proxy_dict.GetMode(&mode) || mode == ProxyPrefs::MODE_SYSTEM) {
|
||||
+ availability = net::ProxyConfigService::CONFIG_UNSET;
|
||||
+ }
|
||||
+
|
||||
+ OnProxyConfigChanged(config, availability);
|
||||
+}
|
||||
+
|
||||
+void ProxyConfigMessageHandler::OnClear(const base::ListValue* list) {
|
||||
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
+
|
||||
+ profile_->GetPrefs()->ClearPref(proxy_config::prefs::kProxy);
|
||||
+ const base::Value cfg = ProxyConfigDictionary::CreateSystem();
|
||||
+ profile_->GetPrefs()->Set(proxy_config::prefs::kProxy, cfg);
|
||||
+ profile_->GetPrefs()->CommitPendingWrite();
|
||||
+ OnEnableNotifyUIWithState(nullptr);
|
||||
+}
|
||||
+
|
||||
+void ProxyConfigMessageHandler::OnApply(const base::ListValue* list) {
|
||||
@@ -883,8 +906,11 @@ new file mode 100644
|
||||
+ proxyConfig.proxy_rules().proxies_for_ftp.SetFromPacString(ftp->GetString());
|
||||
+ proxyConfig.proxy_rules().fallback_proxies.SetFromPacString(fallback->GetString());
|
||||
+ readBypass = true;
|
||||
+ } else if (t == "empty") {
|
||||
+ } else if (t == "direct") {
|
||||
+ proxyConfig.proxy_rules().type = net::ProxyConfig::ProxyRules::Type::EMPTY;
|
||||
+ } else if (t == "none") {
|
||||
+ OnClear(nullptr);
|
||||
+ return;
|
||||
+ } else {
|
||||
+ // invalid type
|
||||
+ LOG(WARNING) << "invalid proxy configuration type";
|
||||
@@ -912,20 +938,23 @@ new file mode 100644
|
||||
+ if (proxyConfig.auto_detect()) {
|
||||
+ const base::Value cfg = ProxyConfigDictionary::CreateAutoDetect();
|
||||
+ profile_->GetPrefs()->Set(proxy_config::prefs::kProxy, cfg);
|
||||
+ return;
|
||||
+ } else if (proxyConfig.has_pac_url()) {
|
||||
+ const base::Value cfg = ProxyConfigDictionary::CreatePacScript(proxyConfig.pac_url().spec(), proxyConfig.pac_mandatory());
|
||||
+ profile_->GetPrefs()->Set(proxy_config::prefs::kProxy, cfg);
|
||||
+ return;
|
||||
+ } else if (proxyConfig.proxy_rules().type == net::ProxyConfig::ProxyRules::Type::EMPTY) {
|
||||
+ const base::Value cfg = ProxyConfigDictionary::CreateDirect();
|
||||
+ profile_->GetPrefs()->Set(proxy_config::prefs::kProxy, cfg);
|
||||
+ } else {
|
||||
+ auto proxyRulesAsString = proxyConfig.proxy_rules().ToString();
|
||||
+ auto bypassRulesAsString = proxyConfig.proxy_rules().bypass_rules.ToString();
|
||||
+
|
||||
+ // fixed servers
|
||||
+ const base::Value cfg = ProxyConfigDictionary::CreateFixedServers(proxyRulesAsString,
|
||||
+ bypassRulesAsString, proxyConfig.proxy_rules().reverse_bypass);
|
||||
+ profile_->GetPrefs()->Set(proxy_config::prefs::kProxy, cfg);
|
||||
+ }
|
||||
+
|
||||
+ auto proxyRulesAsString = proxyConfig.proxy_rules().ToString();
|
||||
+ auto bypassRulesAsString = proxyConfig.proxy_rules().bypass_rules.ToString();
|
||||
+
|
||||
+ // fixed servers
|
||||
+ const base::Value cfg = ProxyConfigDictionary::CreateFixedServers(proxyRulesAsString,
|
||||
+ bypassRulesAsString, proxyConfig.proxy_rules().reverse_bypass);
|
||||
+ profile_->GetPrefs()->Set(proxy_config::prefs::kProxy, cfg);
|
||||
+ profile_->GetPrefs()->CommitPendingWrite();
|
||||
+ OnEnableNotifyUIWithState(nullptr);
|
||||
+}
|
||||
+
|
||||
+} // namespace
|
||||
@@ -979,24 +1008,24 @@ new file mode 100644
|
||||
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
|
||||
@@ -182,6 +182,8 @@ const char kChromeUINativePhysicalWebDiagnosticsURL[] =
|
||||
const char kChromeUINativeScheme[] = "chrome-native";
|
||||
const char kChromeUIOfflineInternalsHost[] = "offline-internals";
|
||||
const char kChromeUIPhysicalWebDiagnosticsHost[] = "physical-web-diagnostics";
|
||||
@@ -32,6 +32,8 @@ const char kChromeUICertificateViewerHost[] = "view-cert";
|
||||
const char kChromeUICertificateViewerURL[] = "chrome://view-cert/";
|
||||
const char kChromeUIChromeSigninHost[] = "chrome-signin";
|
||||
const char kChromeUIChromeSigninURL[] = "chrome://chrome-signin/";
|
||||
+const char kChromeUIProxyConfigHost[] = "proxy";
|
||||
+const char kChromeUIProxyConfigURL[] = "chrome://proxy/";
|
||||
const char kChromeUISnippetsInternalsHost[] = "snippets-internals";
|
||||
const char kChromeUIWebApksHost[] = "webapks";
|
||||
#endif
|
||||
@@ -461,6 +463,7 @@ bool IsOSSettingsSubPage(const std::string& sub_page) {
|
||||
kResetSubPage,
|
||||
kSmartLockSettingsSubPage,
|
||||
kSmbSharesSubPage,
|
||||
const char kChromeUIChromeURLsHost[] = "chrome-urls";
|
||||
const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
|
||||
const char kChromeUIComponentsHost[] = "components";
|
||||
@@ -301,6 +303,7 @@ bool IsSystemWebUIHost(base::StringPiece host) {
|
||||
kChromeUIMobileSetupHost,
|
||||
kChromeUIMultiDeviceSetupHost,
|
||||
kChromeUINetworkHost,
|
||||
+ kChromeUIProxyConfigHost,
|
||||
kStorageSubPage,
|
||||
kStylusSubPage,
|
||||
kSwitchAccessSubPage,
|
||||
@@ -561,6 +564,7 @@ const char* const kChromeHostURLs[] = {
|
||||
kChromeUIOobeHost,
|
||||
kChromeUIOSCreditsHost,
|
||||
kChromeUIOSSettingsHost,
|
||||
@@ -480,6 +483,7 @@ const char* const kChromeHostURLs[] = {
|
||||
#if !defined(OS_ANDROID)
|
||||
#if !defined(OS_CHROMEOS)
|
||||
kChromeUIAppLauncherPageHost,
|
||||
@@ -1007,7 +1036,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
|
||||
@@ -105,6 +105,8 @@ extern const char kChromeUIMemoryInternalsHost[];
|
||||
@@ -108,6 +108,8 @@ extern const char kChromeUIMemoryInternalsHost[];
|
||||
extern const char kChromeUINTPTilesInternalsHost[];
|
||||
extern const char kChromeUINaClHost[];
|
||||
extern const char kChromeUINetExportHost[];
|
||||
@@ -1019,7 +1048,7 @@ diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_const
|
||||
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
|
||||
@@ -199,7 +199,7 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
|
||||
@@ -200,7 +200,7 @@ void ProxyPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
|
||||
bypass_list->GetAsString(&bypass_list_string);
|
||||
prefs->SetValue(proxy_config::prefs::kProxy,
|
||||
ProxyConfigDictionary::CreateFixedServers(
|
||||
@@ -1133,7 +1162,16 @@ diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/prox
|
||||
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
|
||||
@@ -140,6 +140,51 @@ 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;
|
||||
- return;
|
||||
+ continue;
|
||||
}
|
||||
|
||||
// Trim whitespace off the url scheme.
|
||||
@@ -141,6 +141,56 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1142,13 +1180,18 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c
|
||||
+ return "";
|
||||
+ }
|
||||
+
|
||||
+ // special case: a single proxy server specified
|
||||
+ // special case: a single proxy servers list specified
|
||||
+ if (type == Type::PROXY_LIST) {
|
||||
+ if (single_proxies.size() == 1) {
|
||||
+ return single_proxies.Get().ToURI();
|
||||
+ std::string proxy_list;
|
||||
+ for (const ProxyServer& proxy_server :
|
||||
+ single_proxies.GetAll()) {
|
||||
+ proxy_list += proxy_server.ToURI() + ";";
|
||||
+ }
|
||||
+ // more than 1 proxies or 0 proxies is unexpected
|
||||
+ return "";
|
||||
+ // remove last semicolon
|
||||
+ if (proxy_list.length() != 0 ) {
|
||||
+ proxy_list.pop_back();
|
||||
+ }
|
||||
+ return proxy_list;
|
||||
+ }
|
||||
+
|
||||
+ if (type != Type::PROXY_LIST_PER_SCHEME) {
|
||||
|
||||
@@ -4,16 +4,24 @@ Subject: Add an always-incognito mode
|
||||
|
||||
More specifically, add a preference that causes all new tabs and all
|
||||
clicked links to launch as incognito.
|
||||
Make sure initial incognito status is correctly recognized.
|
||||
Enable incognito custom tabs and fix crashes for incognito/custom tab intents (credits to @uazo)
|
||||
---
|
||||
chrome/android/chrome_java_sources.gni | 1 +
|
||||
.../java/res/xml/privacy_preferences.xml | 5 ++
|
||||
.../AlwaysIncognitoLinkInterceptor.java | 73 +++++++++++++++++++
|
||||
.../chrome/browser/ChromeActivity.java | 5 ++
|
||||
.../browser/appmenu/AppMenuHandlerImpl.java | 10 +++
|
||||
.../ChromeContextMenuPopulator.java | 9 ++-
|
||||
.../browser/tabmodel/ChromeTabCreator.java | 20 ++++-
|
||||
.../java/strings/android_chrome_strings.grd | 8 ++
|
||||
8 files changed, 129 insertions(+), 2 deletions(-)
|
||||
.../AlwaysIncognitoLinkInterceptor.java | 74 +++++++++++++++++++
|
||||
.../chrome/browser/ChromeActivity.java | 4 +
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 6 +-
|
||||
.../AppMenuPropertiesDelegateImpl.java | 6 ++
|
||||
.../ChromeContextMenuPopulator.java | 8 +-
|
||||
.../CustomTabIntentDataProvider.java | 6 ++
|
||||
.../browser/init/StartupTabPreloader.java | 11 ++-
|
||||
.../browser/tabmodel/ChromeTabCreator.java | 16 +++-
|
||||
.../tabmodel/TabModelSelectorBase.java | 8 ++
|
||||
.../browser/tabmodel/TabPersistentStore.java | 9 +++
|
||||
.../flags/android/chrome_feature_list.cc | 2 +-
|
||||
.../strings/android_chrome_strings.grd | 7 ++
|
||||
14 files changed, 155 insertions(+), 8 deletions(-)
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java
|
||||
|
||||
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
|
||||
@@ -34,19 +42,19 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
||||
android:title="@string/preload_pages_title"
|
||||
android:summary="@string/preload_pages_summary"
|
||||
android:persistent="false" />
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
+ android:key="always_incognito"
|
||||
+ android:title="@string/always_incognito_title"
|
||||
+ android:summary="@string/always_incognito_summary"
|
||||
+ android:defaultValue="false" />
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.privacy.DoNotTrackPreference"
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
|
||||
android:key="do_not_track"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java b/chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java
|
||||
@@ -0,0 +1,73 @@
|
||||
@@ -0,0 +1,74 @@
|
||||
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
@@ -57,8 +65,9 @@ new file mode 100644
|
||||
+
|
||||
+import org.chromium.chrome.browser.tab.EmptyTabObserver;
|
||||
+import org.chromium.chrome.browser.tab.Tab;
|
||||
+import org.chromium.chrome.browser.tab.TabImpl;
|
||||
+import org.chromium.chrome.browser.tabmodel.TabCreatorManager;
|
||||
+import org.chromium.chrome.browser.tabmodel.TabLaunchType;
|
||||
+import org.chromium.chrome.browser.tab.TabLaunchType;
|
||||
+import org.chromium.chrome.browser.tabmodel.TabModel;
|
||||
+import org.chromium.content_public.browser.LoadUrlParams;
|
||||
+
|
||||
@@ -72,7 +81,7 @@ new file mode 100644
|
||||
+ */
|
||||
+public class AlwaysIncognitoLinkInterceptor extends EmptyTabObserver {
|
||||
+
|
||||
+ private static final String PREF_ALWAYS_INCOGNITO = "always_incognito";
|
||||
+ public static final String PREF_ALWAYS_INCOGNITO = "always_incognito";
|
||||
+
|
||||
+ private final SharedPreferences alwaysIncognitoContainer;
|
||||
+ private final Map<Tab, String> lastUrls;
|
||||
@@ -110,7 +119,7 @@ new file mode 100644
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ tab.getActivity().getTabCreator(true).createNewTab(new LoadUrlParams(url), TabLaunchType.FROM_LINK, tab);
|
||||
+ ((ChromeTabbedActivity)tab.getWindowAndroid().getActivity().get()).getTabCreator(true).createNewTab(new LoadUrlParams(url), TabLaunchType.FROM_LINK, tab);
|
||||
+
|
||||
+ if ((url.equals(lastUrl)) || (!tab.canGoBack())) {
|
||||
+ // this call was triggered by a reload
|
||||
@@ -123,115 +132,163 @@ new file mode 100644
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
@@ -228,6 +228,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
|
||||
private static final int RECORD_MULTI_WINDOW_SCREEN_WIDTH_DELAY_MS = 5000;
|
||||
|
||||
+ private static final String PREF_ALWAYS_INCOGNITO = "always_incognito";
|
||||
+
|
||||
/**
|
||||
* Timeout in ms for reading PartnerBrowserCustomizations provider.
|
||||
*/
|
||||
@@ -1706,6 +1708,9 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
@@ -51,6 +51,7 @@ import org.chromium.base.metrics.RecordUserAction;
|
||||
import org.chromium.base.supplier.ObservableSupplier;
|
||||
import org.chromium.base.supplier.ObservableSupplierImpl;
|
||||
import org.chromium.chrome.R;
|
||||
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
import org.chromium.chrome.browser.IntentHandler.IntentHandlerDelegate;
|
||||
import org.chromium.chrome.browser.IntentHandler.TabOpenType;
|
||||
import org.chromium.chrome.browser.app.appmenu.AppMenuPropertiesDelegateImpl;
|
||||
@@ -1509,6 +1510,9 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
throw new IllegalStateException(
|
||||
"Attempting to access TabCreator before initialization");
|
||||
}
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(PREF_ALWAYS_INCOGNITO, false)) {
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false)) {
|
||||
+ return mIncognitoTabCreator;
|
||||
+ }
|
||||
return incognito ? mIncognitoTabCreator : mRegularTabCreator;
|
||||
}
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandlerImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandlerImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandlerImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuHandlerImpl.java
|
||||
@@ -20,6 +20,7 @@ import android.widget.PopupMenu;
|
||||
|
||||
import org.chromium.base.Callback;
|
||||
import org.chromium.base.VisibleForTesting;
|
||||
+import org.chromium.base.ContextUtils;
|
||||
import org.chromium.base.metrics.RecordUserAction;
|
||||
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
|
||||
@@ -51,6 +51,7 @@ import org.chromium.base.supplier.OneShotCallback;
|
||||
import org.chromium.base.supplier.Supplier;
|
||||
import org.chromium.base.task.PostTask;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
|
||||
@@ -58,6 +59,8 @@ class AppMenuHandlerImpl
|
||||
*/
|
||||
private Integer mHighlightMenuId;
|
||||
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
import org.chromium.chrome.browser.IntentHandler.IntentHandlerDelegate;
|
||||
import org.chromium.chrome.browser.IntentHandler.TabOpenType;
|
||||
import org.chromium.chrome.browser.accessibility_tab_switcher.OverviewListLayout;
|
||||
@@ -1664,8 +1665,9 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
Bundle savedInstanceState = getSavedInstanceState();
|
||||
|
||||
+ private static final String PREF_ALWAYS_INCOGNITO = "always_incognito";
|
||||
+
|
||||
/**
|
||||
* Whether the highlighted item should use a circle highlight or not.
|
||||
*/
|
||||
@@ -208,6 +211,13 @@ class AppMenuHandlerImpl
|
||||
if (mDelegate.shouldShowHeader(appRect.height())) {
|
||||
headerResourceId = mDelegate.getHeaderResourceId();
|
||||
}
|
||||
+
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(PREF_ALWAYS_INCOGNITO, false)) {
|
||||
+ final MenuItem newTabOption = mAppMenu.getMenu().findItem(R.id.new_tab_menu_id);
|
||||
// We determine the model as soon as possible so every systems get initialized coherently.
|
||||
- boolean startIncognito = savedInstanceState != null
|
||||
- && savedInstanceState.getBoolean("is_incognito_selected", false);
|
||||
+ boolean startIncognito = ContextUtils.getAppSharedPreferences().getBoolean(AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false)
|
||||
+ || (savedInstanceState != null
|
||||
+ && savedInstanceState.getBoolean("is_incognito_selected", false));
|
||||
int index = savedInstanceState != null ? savedInstanceState.getInt(WINDOW_INDEX, 0) : 0;
|
||||
|
||||
NextTabPolicySupplier nextTabPolicySupplier =
|
||||
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
|
||||
@@ -296,6 +296,12 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
}
|
||||
|
||||
private void prepareCommonMenuItems(Menu menu, @MenuGroup int menuGroup, boolean isIncognito) {
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean("always_incognito", false)) {
|
||||
+ final MenuItem newTabOption = menu.findItem(R.id.new_tab_menu_id);
|
||||
+ if (newTabOption != null)
|
||||
+ newTabOption.setVisible(false);
|
||||
+ }
|
||||
+
|
||||
mAppMenu.show(wrapper, anchorView, isByPermanentButton, rotation, appRect, pt.y,
|
||||
footerResourceId, headerResourceId, mHighlightMenuId, mCircleHighlight,
|
||||
showFromBottom);
|
||||
// We have to iterate all menu items since same menu item ID may be associated with more
|
||||
// than one menu items.
|
||||
boolean isMenuGroupTabsVisible = TabUiFeatureUtilities.isTabGroupsAndroidEnabled()
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
|
||||
@@ -16,6 +16,7 @@ import androidx.annotation.IntDef;
|
||||
|
||||
import org.chromium.base.library_loader.LibraryProcessType;
|
||||
@@ -27,7 +27,9 @@ import org.chromium.base.annotations.CalledByNative;
|
||||
import org.chromium.base.annotations.NativeMethods;
|
||||
import org.chromium.base.metrics.RecordHistogram;
|
||||
import org.chromium.base.supplier.Supplier;
|
||||
+import org.chromium.base.ContextUtils;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.compositor.bottombar.ephemeraltab.EphemeralTabPanel;
|
||||
@@ -47,6 +48,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
|
||||
private static final String TAG = "CCMenuPopulator";
|
||||
private final ContextMenuItemDelegate mDelegate;
|
||||
private final @ContextMenuMode int mMode;
|
||||
+ private static final String PREF_ALWAYS_INCOGNITO = "always_incognito";
|
||||
private boolean mEnableLensWithSearchByImageText;
|
||||
|
||||
/**
|
||||
@@ -301,7 +303,12 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
|
||||
if (FirstRunStatus.getFirstRunFlowComplete() && mMode == ContextMenuMode.NORMAL
|
||||
&& !isEmptyUrl(params.getUrl())
|
||||
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
import org.chromium.chrome.browser.compositor.bottombar.ephemeraltab.EphemeralTabCoordinator;
|
||||
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuItem.Item;
|
||||
import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
|
||||
@@ -399,7 +401,11 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator {
|
||||
if (FirstRunStatus.getFirstRunFlowComplete() && !isEmptyUrl(params.getUrl())
|
||||
&& UrlUtilities.isAcceptedScheme(params.getUrl())) {
|
||||
- linkTab.add(new ChromeContextMenuItem(Item.OPEN_IN_NEW_TAB));
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(PREF_ALWAYS_INCOGNITO, false)
|
||||
+ && !mDelegate.isIncognito()) {
|
||||
+ // disallow open in new tab
|
||||
+ } else
|
||||
+ linkTab.add(new ChromeContextMenuItem(Item.OPEN_IN_NEW_TAB));
|
||||
if (mMode == ContextMenuMode.NORMAL) {
|
||||
- linkTab.add(new ChromeContextMenuItem(Item.OPEN_IN_NEW_TAB));
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false)
|
||||
+ && !mDelegate.isIncognito()) {
|
||||
+ // disallow open in new tab
|
||||
+ } else
|
||||
+ linkTab.add(new ChromeContextMenuItem(Item.OPEN_IN_NEW_TAB));
|
||||
if (!mDelegate.isIncognito() && mDelegate.isIncognitoSupported()) {
|
||||
linkTab.add(new ChromeContextMenuItem(Item.OPEN_IN_INCOGNITO_TAB));
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
||||
@@ -50,6 +50,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable;
|
||||
import org.chromium.components.embedder_support.util.UrlConstants;
|
||||
import org.chromium.ui.util.ColorUtils;
|
||||
|
||||
+import org.chromium.base.ContextUtils;
|
||||
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
+
|
||||
if (!mDelegate.isIncognito() && mDelegate.isIncognitoSupported()) {
|
||||
linkTab.add(new ChromeContextMenuItem(Item.OPEN_IN_INCOGNITO_TAB));
|
||||
}
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.ArrayList;
|
||||
@@ -409,6 +412,9 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
// TODO(https://crbug.com/1023759): Remove this function and enable
|
||||
// incognito CCT request for all apps.
|
||||
private boolean isValidIncognitoIntent(Intent intent) {
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false)) {
|
||||
+ return true;
|
||||
+ }
|
||||
if (!isIncognitoRequested(intent)) return false;
|
||||
// Incognito requests for payments flow are supported without
|
||||
// INCOGNITO_CCT flag as an exceptional case that can use Chrome
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
|
||||
@@ -36,6 +36,9 @@ import org.chromium.ui.base.PageTransition;
|
||||
import org.chromium.ui.base.WindowAndroid;
|
||||
import org.chromium.url.GURL;
|
||||
|
||||
+import org.chromium.base.ContextUtils;
|
||||
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
+
|
||||
/**
|
||||
* This class attempts to preload the tab if the url is known from the intent when the profile
|
||||
* is created. This is done to improve startup latency.
|
||||
@@ -187,9 +190,11 @@ public class StartupTabPreloader implements ProfileManager.Observer, Destroyable
|
||||
Intent intent = mIntentSupplier.get();
|
||||
GURL url = UrlFormatter.fixupUrl(getUrlFromIntent(intent));
|
||||
|
||||
+ boolean isIncognito = ContextUtils.getAppSharedPreferences().getBoolean(AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false);
|
||||
+
|
||||
ChromeTabCreator chromeTabCreator =
|
||||
- (ChromeTabCreator) mTabCreatorManager.getTabCreator(false);
|
||||
- WebContents webContents = WebContentsFactory.createWebContents(false, false);
|
||||
+ (ChromeTabCreator) mTabCreatorManager.getTabCreator(isIncognito);
|
||||
+ WebContents webContents = WebContentsFactory.createWebContents(isIncognito, false);
|
||||
|
||||
mLoadUrlParams = new LoadUrlParams(url.getValidSpecOrEmpty());
|
||||
String referrer = IntentHandler.getReferrerUrlIncludingExtraHeaders(intent);
|
||||
@@ -203,7 +208,7 @@ public class StartupTabPreloader implements ProfileManager.Observer, Destroyable
|
||||
// Create a detached tab, but don't add it to the tab model yet. We'll do that
|
||||
// later if the loadUrlParams etc... match.
|
||||
mTab = TabBuilder.createLiveTab(false)
|
||||
- .setIncognito(false)
|
||||
+ .setIncognito(isIncognito)
|
||||
.setLaunchType(TabLaunchType.FROM_EXTERNAL_APP)
|
||||
.setWindow(mWindowAndroid)
|
||||
.setWebContents(webContents)
|
||||
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
|
||||
@@ -9,8 +9,10 @@ import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -39,6 +39,10 @@ import org.chromium.ui.base.PageTransition;
|
||||
import org.chromium.ui.base.WindowAndroid;
|
||||
import org.chromium.url.GURL;
|
||||
|
||||
+import org.chromium.base.ContextUtils;
|
||||
import org.chromium.base.SysUtils;
|
||||
import org.chromium.base.TraceEvent;
|
||||
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
import org.chromium.chrome.browser.ChromeActivity;
|
||||
import org.chromium.chrome.browser.IntentHandler;
|
||||
import org.chromium.chrome.browser.ServiceTabLauncher;
|
||||
@@ -19,6 +21,7 @@ import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
import org.chromium.chrome.browser.tab.TabAssociatedApp;
|
||||
import org.chromium.chrome.browser.tab.TabBuilder;
|
||||
+import org.chromium.chrome.browser.tab.TabObserver;
|
||||
import org.chromium.chrome.browser.tab.TabDelegateFactory;
|
||||
import org.chromium.chrome.browser.tab.TabParentIntent;
|
||||
import org.chromium.chrome.browser.tab.TabRedirectHandler;
|
||||
@@ -40,6 +43,7 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
+
|
||||
/**
|
||||
* This class creates various kinds of new tabs and adds them to the right {@link TabModel}.
|
||||
*/
|
||||
@@ -59,6 +63,7 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
private final ChromeActivity mActivity;
|
||||
private final StartupTabPreloader mStartupTabPreloader;
|
||||
private final boolean mIncognito;
|
||||
@@ -239,64 +296,116 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
|
||||
|
||||
private WindowAndroid mNativeWindow;
|
||||
private TabModel mTabModel;
|
||||
@@ -51,6 +55,10 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
mStartupTabPreloader = startupTabPreloader;
|
||||
@@ -76,6 +81,10 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
mNativeWindow = nativeWindow;
|
||||
mTabDelegateFactorySupplier = tabDelegateFactory;
|
||||
mIncognito = incognito;
|
||||
+ if (!mIncognito)
|
||||
+ mExtraLogic = new AlwaysIncognitoLinkInterceptor(ContextUtils.getAppSharedPreferences());
|
||||
+ else
|
||||
+ mExtraLogic = null;
|
||||
mOverviewNTPCreator = overviewNTPCreator;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -186,6 +194,9 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
tab.getWebContents());
|
||||
@@ -228,6 +237,8 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
if (creationState == TabCreationState.LIVE_IN_FOREGROUND && !openInForeground) {
|
||||
creationState = TabCreationState.LIVE_IN_BACKGROUND;
|
||||
}
|
||||
|
||||
+ if (mExtraLogic != null)
|
||||
+ tab.addObserver(mExtraLogic);
|
||||
+
|
||||
mTabModel.addTab(tab, position, type);
|
||||
mTabModel.addTab(tab, position, type, creationState);
|
||||
return tab;
|
||||
} finally {
|
||||
@@ -217,6 +228,10 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
.setDelegateFactory(delegateFactory)
|
||||
.setInitiallyHidden(!openInForeground)
|
||||
.build();
|
||||
+
|
||||
@@ -262,6 +273,8 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
@TabCreationState
|
||||
int creationState = openInForeground ? TabCreationState.LIVE_IN_FOREGROUND
|
||||
: TabCreationState.LIVE_IN_BACKGROUND;
|
||||
+ if (mExtraLogic != null)
|
||||
+ tab.addObserver(mExtraLogic);
|
||||
+
|
||||
mTabModel.addTab(tab, position, type);
|
||||
mTabModel.addTab(tab, position, type, creationState);
|
||||
return true;
|
||||
}
|
||||
@@ -259,7 +274,6 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
*/
|
||||
public Tab launchUrlFromExternalApp(String url, String referer, String headers,
|
||||
String appId, boolean forceNewTab, Intent intent, long intentTimestamp) {
|
||||
@@ -305,7 +318,6 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
// TODO(crbug.com/1081924): Clean up the launches from SearchActivity/Chrome.
|
||||
public Tab launchUrlFromExternalApp(String url, String referer, String headers, String appId,
|
||||
boolean forceNewTab, Intent intent, long intentTimestamp) {
|
||||
- assert !mIncognito;
|
||||
boolean isLaunchedFromChrome = TextUtils.equals(appId, mActivity.getPackageName());
|
||||
|
||||
// If an external app sends an intent for a Weblite URL and the Data Reduction Proxy is
|
||||
@@ -326,6 +340,10 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
if (forceNewTab && !isLaunchedFromChrome) {
|
||||
@@ -412,6 +424,8 @@ public class ChromeTabCreator extends TabCreatorManager.TabCreator {
|
||||
.setTabState(state)
|
||||
.build();
|
||||
assert state.isIncognito() == mIncognito;
|
||||
+
|
||||
}
|
||||
+ if (mExtraLogic != null)
|
||||
+ tab.addObserver(mExtraLogic);
|
||||
+
|
||||
mTabModel.addTab(tab, index, TabLaunchType.FROM_RESTORE);
|
||||
return tab;
|
||||
}
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -669,6 +669,14 @@ CHAR-LIMIT guidelines:
|
||||
Search and site suggestions disabled
|
||||
</message>
|
||||
|
||||
if (state.isIncognito() != mIncognito) {
|
||||
throw new IllegalStateException("Incognito state mismatch. TabState: "
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorBase.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorBase.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorBase.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorBase.java
|
||||
@@ -247,7 +247,15 @@ public abstract class TabModelSelectorBase implements TabModelSelector {
|
||||
public void markTabStateInitialized() {
|
||||
if (mTabStateInitialized) return;
|
||||
mTabStateInitialized = true;
|
||||
+
|
||||
for (TabModelSelectorObserver listener : mObservers) listener.onTabStateInitialized();
|
||||
+
|
||||
+ if (mStartIncognito) {
|
||||
+ // profile is not set in always-incognito mode in TabModelSelectorProfileSupplier
|
||||
+ // so force it
|
||||
+ selectModel(false); // restore model so next call always set incognito mode
|
||||
+ selectModel(true);
|
||||
+ }
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
|
||||
@@ -47,6 +47,8 @@ import org.chromium.components.embedder_support.util.UrlConstants;
|
||||
import org.chromium.content_public.browser.LoadUrlParams;
|
||||
import org.chromium.content_public.browser.UiThreadTaskTraits;
|
||||
|
||||
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
+
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
@@ -599,6 +601,13 @@ public class TabPersistentStore extends TabPersister {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (ContextUtils.getAppSharedPreferences().getBoolean(AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false)) {
|
||||
+ if (!isIncognito) {
|
||||
+ Log.w(TAG, "Failed to restore tab: not in incognito mode.");
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
TabModel model = mTabModelSelector.getModel(isIncognito);
|
||||
|
||||
if (model.isIncognito() != isIncognito) {
|
||||
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
|
||||
@@ -333,7 +333,7 @@ const base::Feature kCCTExternalLinkHandling{"CCTExternalLinkHandling",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kCCTIncognito{"CCTIncognito",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kCCTPostMessageAPI{"CCTPostMessageAPI",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
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
|
||||
@@ -773,6 +773,13 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_CLEAR_BROWSING_HISTORY_SUMMARY" desc="A text for the basic tab explaining browsing history.">
|
||||
Clears history and autocompletions in the address bar.
|
||||
</message>
|
||||
+ <!-- always incognito -->
|
||||
+ <message name="IDS_ALWAYS_INCOGNITO_TITLE" desc="Title for always incognito mode">
|
||||
+ Open links in incognito tabs always
|
||||
@@ -304,10 +413,9 @@ diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/and
|
||||
+ <message name="IDS_ALWAYS_INCOGNITO_SUMMARY" desc="Summary for always incognito mode">
|
||||
+ Opens links in incognito tabs when you click on new tab or on a link
|
||||
+ </message>
|
||||
+
|
||||
<!-- Themes preferences -->
|
||||
<message name="IDS_PREFS_THEMES" desc="Title for the Themes preferences. [CHAR-LIMIT=32]">
|
||||
Themes
|
||||
<message name="IDS_CLEAR_BROWSING_HISTORY_SUMMARY_SIGNED_IN" desc="A text explaining other forms of activity for signed in users.">
|
||||
Clears history and autocompletions in the address bar. Your Google Account may have other forms of browsing history at <ph name="BEGIN_LINK"><link></ph>myactivity.google.com<ph name="END_LINK"></link></ph>.
|
||||
</message>
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -14,21 +14,21 @@ Completely remove contacts picker permission from the file dialog
|
||||
.../browser/bookmarks/BookmarkDelegate.java | 10 +
|
||||
.../browser/bookmarks/BookmarkManager.java | 20 ++
|
||||
.../browser/bookmarks/BookmarkPage.java | 1 +
|
||||
.../java/strings/android_chrome_strings.grd | 6 +
|
||||
chrome/browser/BUILD.gn | 8 +-
|
||||
.../android/bookmarks/bookmark_bridge.cc | 215 ++++++++++++++++++
|
||||
.../android/bookmarks/bookmark_bridge.cc | 217 ++++++++++++++++++
|
||||
.../android/bookmarks/bookmark_bridge.h | 20 +-
|
||||
chrome/browser/importer/profile_writer.cc | 12 +
|
||||
chrome/browser/importer/profile_writer.h | 6 +
|
||||
.../strings/android_chrome_strings.grd | 6 +
|
||||
chrome/common/BUILD.gn | 3 +
|
||||
chrome/utility/BUILD.gn | 7 +-
|
||||
.../utility/importer/bookmark_html_reader.cc | 27 ++-
|
||||
.../utility/importer/bookmark_html_reader.h | 9 +
|
||||
.../utility/importer/bookmark_html_reader.h | 8 +
|
||||
.../chromium/ui/base/SelectFileDialog.java | 18 +-
|
||||
ui/shell_dialogs/select_file_dialog.h | 2 +
|
||||
.../select_file_dialog_android.cc | 6 +
|
||||
ui/shell_dialogs/select_file_dialog_android.h | 2 +
|
||||
22 files changed, 447 insertions(+), 14 deletions(-)
|
||||
22 files changed, 448 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
|
||||
--- a/chrome/android/java/AndroidManifest.xml
|
||||
@@ -47,28 +47,28 @@ 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/standard_mode_tint" />
|
||||
app:iconTint="@color/default_icon_color_tint_list" />
|
||||
+ <item
|
||||
+ android:id="@+id/import_menu_id"
|
||||
+ android:icon="@drawable/ic_folder_blue_24dp"
|
||||
+ android:title="@string/import_bookmarks"
|
||||
+ android:visible="true"
|
||||
+ app:showAsAction="ifRoom"
|
||||
+ app:iconTint="@color/standard_mode_tint" />
|
||||
+ app:iconTint="@color/default_icon_color_tint_list" />
|
||||
+ <item
|
||||
+ android:id="@+id/export_menu_id"
|
||||
+ android:icon="@drawable/ic_file_download_white_24dp"
|
||||
+ android:title="@string/export_bookmarks"
|
||||
+ android:visible="true"
|
||||
+ app:showAsAction="ifRoom"
|
||||
+ app:iconTint="@color/standard_mode_tint" />
|
||||
+ app:iconTint="@color/default_icon_color_tint_list" />
|
||||
<item
|
||||
android:id="@+id/close_menu_id"
|
||||
android:icon="@drawable/btn_close"
|
||||
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
|
||||
@@ -82,6 +82,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;
|
||||
@@ -81,7 +81,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
}
|
||||
|
||||
SelectionDelegate<BookmarkId> selectionDelegate = mDelegate.getSelectionDelegate();
|
||||
@@ -133,6 +139,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);
|
||||
@@ -90,7 +90,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);
|
||||
}
|
||||
@@ -142,6 +150,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
@@ -143,6 +151,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
super.showNormalView();
|
||||
|
||||
if (mDelegate == null) {
|
||||
@@ -99,7 +99,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);
|
||||
}
|
||||
@@ -172,6 +182,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
@@ -173,6 +183,8 @@ public class BookmarkActionBar extends SelectableListToolbar<BookmarkId>
|
||||
public void onFolderStateSet(BookmarkId folder) {
|
||||
mCurrentFolder = mDelegate.getModel().getBookmarkById(folder);
|
||||
|
||||
@@ -111,15 +111,15 @@ 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
|
||||
@@ -12,6 +12,7 @@ import org.chromium.base.VisibleForTesting;
|
||||
@@ -13,6 +13,7 @@ import androidx.annotation.VisibleForTesting;
|
||||
import org.chromium.chrome.browser.SnackbarActivity;
|
||||
import org.chromium.chrome.browser.util.UrlConstants;
|
||||
import org.chromium.components.bookmarks.BookmarkId;
|
||||
import org.chromium.components.embedder_support.util.UrlConstants;
|
||||
+import org.chromium.ui.base.ActivityWindowAndroid;
|
||||
|
||||
/**
|
||||
* The activity that displays the bookmark UI on the phone. It keeps a {@link BookmarkManager}
|
||||
@@ -21,6 +22,7 @@ import org.chromium.components.bookmarks.BookmarkId;
|
||||
@@ -22,6 +23,7 @@ import org.chromium.components.embedder_support.util.UrlConstants;
|
||||
public class BookmarkActivity extends SnackbarActivity {
|
||||
|
||||
private BookmarkManager mBookmarkManager;
|
||||
@@ -127,7 +127,7 @@ 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";
|
||||
|
||||
@@ -32,6 +34,18 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
@@ -33,6 +35,18 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
if (TextUtils.isEmpty(url)) url = UrlConstants.BOOKMARKS_URL;
|
||||
mBookmarkManager.updateForUrl(url);
|
||||
setContentView(mBookmarkManager.getView());
|
||||
@@ -146,7 +146,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,6 +62,7 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
@@ -49,6 +63,7 @@ public class BookmarkActivity extends SnackbarActivity {
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
@@ -166,10 +166,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
+import android.net.Uri;
|
||||
import android.os.SystemClock;
|
||||
+import android.provider.Browser;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Pair;
|
||||
@@ -23,6 +27,11 @@ import org.chromium.components.bookmarks.BookmarkType;
|
||||
|
||||
@@ -26,6 +30,11 @@ import org.chromium.components.url_formatter.SchemeDisplay;
|
||||
import org.chromium.components.url_formatter.UrlFormatter;
|
||||
import org.chromium.content_public.browser.WebContents;
|
||||
|
||||
@@ -181,7 +181,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -553,6 +562,24 @@ public class BookmarkBridge {
|
||||
@@ -561,6 +570,24 @@ public class BookmarkBridge {
|
||||
mNativeBookmarkBridge, BookmarkBridge.this, id.getId(), id.getType());
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
/**
|
||||
* Synchronously gets a list of bookmarks that match the specified search query.
|
||||
* @param query Keyword used for searching bookmarks.
|
||||
@@ -914,6 +941,24 @@ public class BookmarkBridge {
|
||||
@@ -941,6 +968,24 @@ public class BookmarkBridge {
|
||||
depthList.add(depth);
|
||||
}
|
||||
|
||||
@@ -231,10 +231,10 @@ 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++) {
|
||||
@@ -982,6 +1027,8 @@ public class BookmarkBridge {
|
||||
@@ -1008,6 +1053,8 @@ public class BookmarkBridge {
|
||||
int getChildCount(long nativeBookmarkBridge, BookmarkBridge caller, long id, int type);
|
||||
void getChildIDs(long nativeBookmarkBridge, BookmarkBridge caller, long id, int type,
|
||||
boolean getFolders, boolean getBookmarks, List<BookmarkId> bookmarksList);
|
||||
List<BookmarkId> bookmarksList);
|
||||
+ void importBookmarks(long nativeBookmarkBridge, BookmarkBridge caller, WindowAndroid window);
|
||||
+ void exportBookmarks(long nativeBookmarkBridge, BookmarkBridge caller);
|
||||
BookmarkId getChildAt(
|
||||
@@ -243,7 +243,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/BookmarkDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java
|
||||
@@ -69,6 +69,16 @@ interface BookmarkDelegate {
|
||||
@@ -67,6 +67,16 @@ interface BookmarkDelegate {
|
||||
*/
|
||||
void openSearchUI();
|
||||
|
||||
@@ -263,23 +263,18 @@ 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
|
||||
@@ -23,6 +23,7 @@ import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem;
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkModelObserver;
|
||||
+import org.chromium.chrome.browser.ChromeActivity;
|
||||
import org.chromium.chrome.browser.favicon.LargeIconBridge;
|
||||
import org.chromium.chrome.browser.gesturenav.HistoryNavigationDelegate;
|
||||
import org.chromium.chrome.browser.native_page.BasicNativePage;
|
||||
@@ -35,6 +36,7 @@ import org.chromium.chrome.browser.widget.selection.SelectableListLayout;
|
||||
import org.chromium.chrome.browser.widget.selection.SelectableListToolbar.SearchDelegate;
|
||||
import org.chromium.chrome.browser.widget.selection.SelectionDelegate;
|
||||
import org.chromium.components.bookmarks.BookmarkId;
|
||||
@@ -33,8 +33,10 @@ 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;
|
||||
+import org.chromium.ui.base.ActivityWindowAndroid;
|
||||
import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate;
|
||||
import org.chromium.url.GURL;
|
||||
+import org.chromium.chrome.browser.ChromeActivity;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
@@ -59,6 +61,7 @@ public class BookmarkManager
|
||||
@@ -53,6 +55,7 @@ public class BookmarkManager
|
||||
private Activity mActivity;
|
||||
private ViewGroup mMainView;
|
||||
private BookmarkModel mBookmarkModel;
|
||||
@@ -287,8 +282,8 @@ 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;
|
||||
@@ -374,6 +377,13 @@ public class BookmarkManager
|
||||
mSelectableListLayout.setHistoryNavigationDelegate(delegate);
|
||||
@@ -323,6 +326,13 @@ public class BookmarkManager
|
||||
mNativePage = nativePage;
|
||||
}
|
||||
|
||||
+ /**
|
||||
@@ -301,7 +296,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
|
||||
@@ -547,6 +557,16 @@ public class BookmarkManager
|
||||
@@ -495,6 +505,16 @@ public class BookmarkManager
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,34 +316,18 @@ 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/BookmarkPage.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java
|
||||
@@ -35,6 +35,7 @@ public class BookmarkPage extends BasicNativePage {
|
||||
mManager = new BookmarkManager(
|
||||
activity, false, ((SnackbarManageable) activity).getSnackbarManager());
|
||||
@@ -29,6 +29,7 @@ public class BookmarkPage extends BasicNativePage {
|
||||
|
||||
mManager = new BookmarkManager(activity, false, activity.getSnackbarManager());
|
||||
mManager.setBasicNativePage(this);
|
||||
+ mManager.setWindow(activity.getWindowAndroid());
|
||||
mManager.setHistoryNavigationDelegate(host.createHistoryNavigationDelegate());
|
||||
mTitle = activity.getString(R.string.bookmarks);
|
||||
}
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -230,6 +230,12 @@ CHAR-LIMIT guidelines:
|
||||
<message name="IDS_SEARCH" desc="The label for a search button.">
|
||||
Search
|
||||
</message>
|
||||
+ <message name="IDS_IMPORT_BOOKMARKS" desc="The label for the import bookmarks button.">
|
||||
+ Import
|
||||
+ </message>
|
||||
+ <message name="IDS_EXPORT_BOOKMARKS" desc="The label for an export bookmarks button.">
|
||||
+ Export
|
||||
+ </message>
|
||||
<message name="IDS_SHOW_INFO" desc="The label for a info button to show info.">
|
||||
Show Info
|
||||
</message>
|
||||
+ mManager.setWindow(activity.getWindowAndroid());
|
||||
mTitle = host.getContext().getResources().getString(R.string.bookmarks);
|
||||
|
||||
initWithView(mManager.getView());
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -163,6 +163,10 @@ jumbo_static_library("browser") {
|
||||
@@ -182,6 +182,10 @@ static_library("browser") {
|
||||
"bitmap_fetcher/bitmap_fetcher_service.h",
|
||||
"bitmap_fetcher/bitmap_fetcher_service_factory.cc",
|
||||
"bitmap_fetcher/bitmap_fetcher_service_factory.h",
|
||||
@@ -356,19 +335,19 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
+ "importer/profile_writer.h",
|
||||
+ "bookmarks/bookmark_html_writer.cc",
|
||||
+ "bookmarks/bookmark_html_writer.h",
|
||||
"bookmarks/bookmark_model_factory.cc",
|
||||
"bookmarks/bookmark_model_factory.h",
|
||||
"bookmarks/chrome_bookmark_client.cc",
|
||||
@@ -2953,8 +2957,6 @@ jumbo_static_library("browser") {
|
||||
"bluetooth/bluetooth_chooser_context.cc",
|
||||
"bluetooth/bluetooth_chooser_context.h",
|
||||
"bluetooth/bluetooth_chooser_context_factory.cc",
|
||||
@@ -3048,8 +3052,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",
|
||||
"certificate_viewer.h",
|
||||
"chrome_browser_field_trials_desktop.cc",
|
||||
"chrome_browser_field_trials_desktop.h",
|
||||
@@ -3059,8 +3061,6 @@ jumbo_static_library("browser") {
|
||||
"browsing_data/access_context_audit_database.cc",
|
||||
"browsing_data/access_context_audit_database.h",
|
||||
"browsing_data/access_context_audit_service.cc",
|
||||
@@ -3189,8 +3191,6 @@ static_library("browser") {
|
||||
"importer/importer_uma.h",
|
||||
"importer/in_process_importer_bridge.cc",
|
||||
"importer/in_process_importer_bridge.h",
|
||||
@@ -380,7 +359,15 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
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
|
||||
@@ -43,6 +43,21 @@
|
||||
@@ -38,6 +38,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"
|
||||
@@ -47,6 +48,21 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
|
||||
@@ -402,7 +389,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;
|
||||
@@ -60,6 +75,56 @@ using bookmarks::BookmarkPermanentNode;
|
||||
@@ -63,6 +79,56 @@ using bookmarks::BookmarkNode;
|
||||
using bookmarks::BookmarkType;
|
||||
using content::BrowserThread;
|
||||
|
||||
@@ -459,7 +446,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
namespace {
|
||||
|
||||
const int kInvalidId = -1;
|
||||
@@ -138,6 +203,10 @@ BookmarkBridge::~BookmarkBridge() {
|
||||
@@ -141,6 +207,10 @@ BookmarkBridge::~BookmarkBridge() {
|
||||
bookmark_model_->RemoveObserver(this);
|
||||
if (partner_bookmarks_shim_)
|
||||
partner_bookmarks_shim_->RemoveObserver(this);
|
||||
@@ -470,7 +457,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
}
|
||||
|
||||
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
|
||||
@@ -524,6 +593,152 @@ jint BookmarkBridge::GetTotalBookmarkCount(
|
||||
@@ -520,6 +590,153 @@ jint BookmarkBridge::GetTotalBookmarkCount(
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -585,14 +572,15 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
|
||||
+ // the following import logic comes from BookmarksFileImporter class
|
||||
+ std::vector<ImportedBookmarkEntry> bookmarks;
|
||||
+ std::vector<importer::SearchEngineInfo> search_engines;
|
||||
+ favicon_base::FaviconUsageDataList favicons;
|
||||
+
|
||||
+ bookmark_html_reader::ImportBookmarksFile(
|
||||
+ base::Callback<bool(void)>(),
|
||||
+ base::Bind(internal::CanImportURL),
|
||||
+ base::BindRepeating(internal::CanImportURL),
|
||||
+ contents,
|
||||
+ &bookmarks,
|
||||
+ &search_engines,
|
||||
+ nullptr);
|
||||
+ &favicons);
|
||||
+
|
||||
+ auto *writer = new ProfileWriter(profile_);
|
||||
+
|
||||
@@ -626,7 +614,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
|
||||
@@ -16,6 +16,8 @@
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
|
||||
#include "components/bookmarks/common/android/bookmark_id.h"
|
||||
#include "components/prefs/pref_change_registrar.h"
|
||||
@@ -635,7 +623,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
|
||||
namespace bookmarks {
|
||||
class BookmarkModel;
|
||||
@@ -29,7 +31,8 @@ class Profile;
|
||||
@@ -32,7 +34,8 @@ class Profile;
|
||||
// bookmark page. This fetches the bookmarks, title, urls, folder
|
||||
// hierarchy.
|
||||
class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -645,7 +633,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
public:
|
||||
BookmarkBridge(JNIEnv* env,
|
||||
const base::android::JavaRef<jobject>& obj,
|
||||
@@ -39,6 +42,12 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -48,6 +51,12 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
bool IsDoingExtensiveChanges(JNIEnv* env,
|
||||
const base::android::JavaParamRef<jobject>& obj);
|
||||
|
||||
@@ -658,7 +646,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
|
||||
jboolean IsEditBookmarksEnabled(JNIEnv* env);
|
||||
|
||||
void LoadEmptyPartnerBookmarkShimForTesting(
|
||||
@@ -133,6 +142,13 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -135,6 +144,13 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
jlong id,
|
||||
jint type);
|
||||
|
||||
@@ -672,7 +660,7 @@ 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,
|
||||
@@ -278,12 +294,14 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
@@ -280,12 +296,14 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
|
||||
void ShimBeingDeleted(PartnerBookmarksShim* shim) override;
|
||||
|
||||
Profile* profile_;
|
||||
@@ -745,10 +733,26 @@ diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/
|
||||
virtual void AddFavicons(const favicon_base::FaviconUsageDataList& favicons);
|
||||
|
||||
// Adds the TemplateURLs in |template_urls| to the local store.
|
||||
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
|
||||
@@ -242,6 +242,12 @@ 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_IMPORT_BOOKMARKS" desc="The label for the import bookmarks button.">
|
||||
+ Import
|
||||
+ </message>
|
||||
+ <message name="IDS_EXPORT_BOOKMARKS" desc="The label for an export bookmarks button.">
|
||||
+ Export
|
||||
+ </message>
|
||||
<message name="IDS_NOTIFICATION_CATEGORY_VR" desc="Label for notifications in VR, within a list of notification categories. [CHAR-LIMIT=32]">
|
||||
Virtual Reality
|
||||
</message>
|
||||
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
|
||||
--- a/chrome/common/BUILD.gn
|
||||
+++ b/chrome/common/BUILD.gn
|
||||
@@ -445,6 +445,9 @@ static_library("common") {
|
||||
@@ -415,6 +415,9 @@ static_library("common") {
|
||||
sources += [
|
||||
"media/chrome_media_drm_bridge_client.cc",
|
||||
"media/chrome_media_drm_bridge_client.h",
|
||||
@@ -761,7 +765,7 @@ diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
|
||||
diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
|
||||
--- a/chrome/utility/BUILD.gn
|
||||
+++ b/chrome/utility/BUILD.gn
|
||||
@@ -66,8 +66,6 @@ static_library("utility") {
|
||||
@@ -70,8 +70,6 @@ static_library("utility") {
|
||||
|
||||
if (!is_android) {
|
||||
sources += [
|
||||
@@ -770,7 +774,7 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
|
||||
"importer/bookmarks_file_importer.cc",
|
||||
"importer/bookmarks_file_importer.h",
|
||||
"importer/edge_database_reader_win.cc",
|
||||
@@ -164,6 +162,11 @@ static_library("utility") {
|
||||
@@ -172,6 +170,11 @@ static_library("utility") {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -811,21 +815,39 @@ diff --git a/chrome/utility/importer/bookmark_html_reader.cc b/chrome/utility/im
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -108,12 +112,10 @@ static std::string stripDt(const std::string& lineDt) {
|
||||
@@ -106,14 +110,28 @@ static std::string stripDt(const std::string& lineDt) {
|
||||
}
|
||||
|
||||
void ImportBookmarksFile(
|
||||
const base::Callback<bool(void)>& cancellation_callback,
|
||||
const base::Callback<bool(const GURL&)>& valid_url_callback,
|
||||
- const base::FilePath& file_path,
|
||||
+ const std::string& content,
|
||||
- base::RepeatingCallback<bool(void)> cancellation_callback,
|
||||
- base::RepeatingCallback<bool(const GURL&)> valid_url_callback,
|
||||
+ const base::RepeatingCallback<bool(void)> cancellation_callback,
|
||||
+ const base::RepeatingCallback<bool(const GURL&)> valid_url_callback,
|
||||
const base::FilePath& file_path,
|
||||
std::vector<ImportedBookmarkEntry>* bookmarks,
|
||||
std::vector<importer::SearchEngineInfo>* search_engines,
|
||||
favicon_base::FaviconUsageDataList* favicons) {
|
||||
- std::string content;
|
||||
std::string content;
|
||||
- base::ReadFileToString(file_path, &content);
|
||||
+ if (!base::ReadFileToString(file_path, &content)) {
|
||||
+ LOG(ERROR) << "Could not directly read bookmarks import file";
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ImportBookmarksFile(cancellation_callback, valid_url_callback, content, bookmarks, search_engines, favicons);
|
||||
+}
|
||||
+
|
||||
+void ImportBookmarksFile(
|
||||
+ base::RepeatingCallback<bool(void)> cancellation_callback,
|
||||
+ base::RepeatingCallback<bool(const GURL&)> valid_url_callback,
|
||||
+ const std::string& content,
|
||||
+ std::vector<ImportedBookmarkEntry>* bookmarks,
|
||||
+ std::vector<importer::SearchEngineInfo>* search_engines,
|
||||
+ favicon_base::FaviconUsageDataList* favicons) {
|
||||
std::vector<std::string> lines = base::SplitString(
|
||||
content, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
||||
|
||||
@@ -126,6 +128,7 @@ void ImportBookmarksFile(
|
||||
@@ -126,6 +144,7 @@ void ImportBookmarksFile(
|
||||
std::vector<base::string16> path;
|
||||
size_t toolbar_folder_index = 0;
|
||||
std::string charset = "UTF-8"; // If no charset is specified, assume utf-8.
|
||||
@@ -833,7 +855,7 @@ 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());
|
||||
@@ -218,10 +221,12 @@ void ImportBookmarksFile(
|
||||
@@ -218,10 +237,12 @@ void ImportBookmarksFile(
|
||||
}
|
||||
bookmarks->push_back(entry);
|
||||
|
||||
@@ -846,44 +868,20 @@ diff --git a/chrome/utility/importer/bookmark_html_reader.cc b/chrome/utility/im
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -278,6 +283,22 @@ void ImportBookmarksFile(
|
||||
}
|
||||
}
|
||||
|
||||
+void ImportBookmarksFile(
|
||||
+ const base::Callback<bool(void)>& cancellation_callback,
|
||||
+ const base::Callback<bool(const GURL&)>& valid_url_callback,
|
||||
+ const base::FilePath& file_path,
|
||||
+ std::vector<ImportedBookmarkEntry>* bookmarks,
|
||||
+ std::vector<importer::SearchEngineInfo>* search_engines,
|
||||
+ favicon_base::FaviconUsageDataList* favicons) {
|
||||
+ std::string content;
|
||||
+ if (!base::ReadFileToString(file_path, &content)) {
|
||||
+ LOG(ERROR) << "Could not directly read bookmarks import file";
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ImportBookmarksFile(cancellation_callback, valid_url_callback, content, bookmarks, search_engines, favicons);
|
||||
+}
|
||||
+
|
||||
bool CanImportURLAsSearchEngine(const GURL& url,
|
||||
std::string* search_engine_url) {
|
||||
std::string url_spec = url.possibly_invalid_spec();
|
||||
diff --git a/chrome/utility/importer/bookmark_html_reader.h b/chrome/utility/importer/bookmark_html_reader.h
|
||||
--- a/chrome/utility/importer/bookmark_html_reader.h
|
||||
+++ b/chrome/utility/importer/bookmark_html_reader.h
|
||||
@@ -51,6 +51,15 @@ void ImportBookmarksFile(
|
||||
@@ -51,6 +51,14 @@ void ImportBookmarksFile(
|
||||
std::vector<importer::SearchEngineInfo>* search_engines,
|
||||
favicon_base::FaviconUsageDataList* favicons);
|
||||
|
||||
+void ImportBookmarksFile(
|
||||
+ const base::Callback<bool(void)>& cancellation_callback,
|
||||
+ const base::Callback<bool(const GURL&)>& valid_url_callback,
|
||||
+ const base::RepeatingCallback<bool(void)> cancellation_callback,
|
||||
+ const base::RepeatingCallback<bool(const GURL&)> valid_url_callback,
|
||||
+ const std::string& content,
|
||||
+ std::vector<ImportedBookmarkEntry>* bookmarks,
|
||||
+ std::vector<importer::SearchEngineInfo>* search_engines,
|
||||
+ favicon_base::FaviconUsageDataList* favicons);
|
||||
+
|
||||
+
|
||||
// Returns true if |url| should be imported as a search engine, i.e. because it
|
||||
// has replacement terms. Chrome treats such bookmarks as search engines rather
|
||||
@@ -891,7 +889,7 @@ 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
|
||||
@@ -34,6 +34,7 @@ import org.chromium.base.task.PostTask;
|
||||
@@ -36,6 +36,7 @@ import org.chromium.base.task.PostTask;
|
||||
import org.chromium.base.task.TaskTraits;
|
||||
import org.chromium.ui.PhotoPickerListener;
|
||||
import org.chromium.ui.R;
|
||||
@@ -899,7 +897,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
import org.chromium.ui.UiUtils;
|
||||
|
||||
import java.io.File;
|
||||
@@ -53,6 +54,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -55,6 +56,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
private static final String IMAGE_TYPE = "image/";
|
||||
private static final String VIDEO_TYPE = "video/";
|
||||
private static final String AUDIO_TYPE = "audio/";
|
||||
@@ -907,7 +905,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
private static final String ALL_IMAGE_TYPES = IMAGE_TYPE + "*";
|
||||
private static final String ALL_VIDEO_TYPES = VIDEO_TYPE + "*";
|
||||
private static final String ALL_AUDIO_TYPES = AUDIO_TYPE + "*";
|
||||
@@ -131,6 +133,11 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -133,6 +135,11 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
mFileTypes = fileTypes;
|
||||
}
|
||||
|
||||
@@ -919,7 +917,7 @@ 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/*")
|
||||
@@ -158,7 +165,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -160,7 +167,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
List<String> missingPermissions = new ArrayList<>();
|
||||
String storagePermission = Manifest.permission.READ_EXTERNAL_STORAGE;
|
||||
boolean shouldUsePhotoPicker = shouldUsePhotoPicker();
|
||||
@@ -928,7 +926,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
if (!window.hasPermission(storagePermission)) missingPermissions.add(storagePermission);
|
||||
} else {
|
||||
if (((mSupportsImageCapture && shouldShowImageTypes())
|
||||
@@ -186,7 +193,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -188,7 +195,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
}
|
||||
|
||||
// TODO(finnur): Remove once we figure out the cause of crbug.com/950024.
|
||||
@@ -937,7 +935,7 @@ 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",
|
||||
@@ -200,7 +207,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -202,7 +209,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
}
|
||||
}
|
||||
|
||||
@@ -946,7 +944,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
onFileNotSelected();
|
||||
return;
|
||||
}
|
||||
@@ -349,6 +356,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -351,6 +358,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
}
|
||||
if (!mimeTypes.contains(mimeType)) mimeTypes.add(mimeType);
|
||||
}
|
||||
@@ -954,7 +952,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
return mimeTypes;
|
||||
}
|
||||
|
||||
@@ -626,6 +634,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
@@ -631,6 +639,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick
|
||||
return countAcceptTypesFor(specificType) > 0;
|
||||
}
|
||||
|
||||
@@ -968,7 +966,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui
|
||||
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
|
||||
@@ -192,6 +192,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
|
||||
@@ -191,6 +191,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
|
||||
void* params);
|
||||
bool HasMultipleFileTypeChoices();
|
||||
|
||||
@@ -980,7 +978,7 @@ diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_fil
|
||||
diff --git a/ui/shell_dialogs/select_file_dialog_android.cc b/ui/shell_dialogs/select_file_dialog_android.cc
|
||||
--- a/ui/shell_dialogs/select_file_dialog_android.cc
|
||||
+++ b/ui/shell_dialogs/select_file_dialog_android.cc
|
||||
@@ -139,6 +139,12 @@ void SelectFileDialogImpl::SelectFileImpl(
|
||||
@@ -140,6 +140,12 @@ void SelectFileDialogImpl::SelectFileImpl(
|
||||
owning_window->GetJavaObject());
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: Add custom tab intents privacy option
|
||||
---
|
||||
chrome/android/java/res/values/values.xml | 3 +++
|
||||
chrome/android/java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../chrome/browser/LaunchIntentDispatcher.java | 3 +++
|
||||
.../preferences/privacy/PrivacyPreferences.java | 11 +++++++++++
|
||||
.../android/java/strings/android_chrome_strings.grd | 7 +++++++
|
||||
5 files changed, 29 insertions(+)
|
||||
.../chrome/browser/LaunchIntentDispatcher.java | 4 ++++
|
||||
.../browser/privacy/settings/PrivacySettings.java | 11 +++++++++++
|
||||
.../ui/android/strings/android_chrome_strings.grd | 7 +++++++
|
||||
5 files changed, 30 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
|
||||
--- a/chrome/android/java/res/values/values.xml
|
||||
@@ -27,41 +27,42 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -29,6 +29,11 @@
|
||||
android:fragment="org.chromium.chrome.browser.preferences.privacy.DoNotTrackPreference"
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
|
||||
android:key="do_not_track"
|
||||
android:title="@string/do_not_track_title" />
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
+ android:key="allow_custom_tab_intents"
|
||||
+ android:title="@string/allow_custom_tab_intents_title"
|
||||
+ android:summary="@string/allow_custom_tab_intents_summary"
|
||||
+ android:defaultValue="false" />
|
||||
<android.support.v7.preference.Preference
|
||||
android:key="contextual_search"
|
||||
android:title="@string/contextual_search_title"
|
||||
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
android:key="secure_dns"
|
||||
android:title="@string/settings_secure_dns_title"
|
||||
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
|
||||
@@ -43,6 +43,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.preferences.privacy.PrivacyPreferences;
|
||||
import org.chromium.chrome.browser.util.IntentUtils;
|
||||
import org.chromium.chrome.browser.util.UrlConstants;
|
||||
import org.chromium.chrome.browser.vr.VrModuleProvider;
|
||||
@@ -251,6 +252,8 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
@@ -54,6 +54,8 @@ import org.chromium.url.Origin;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
+import org.chromium.chrome.browser.privacy.settings.PrivacySettings;
|
||||
+
|
||||
/**
|
||||
* Dispatches incoming intents to the appropriate activity based on the current configuration and
|
||||
* Intent fired.
|
||||
@@ -243,6 +245,8 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
|
||||
*/
|
||||
public static boolean isCustomTabIntent(Intent intent) {
|
||||
if (intent == null) return false;
|
||||
+ if (!ContextUtils.getAppSharedPreferences().getBoolean(PrivacyPreferences.PREF_ALLOW_CUSTOM_TAB_INTENTS, 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;
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
|
||||
@@ -43,6 +43,8 @@ public class PrivacyPreferences
|
||||
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
|
||||
@@ -50,6 +50,8 @@ public class PrivacySettings
|
||||
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
|
||||
@@ -70,18 +71,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
PrivacyPreferencesManager privacyPrefManager = PrivacyPreferencesManager.getInstance();
|
||||
@@ -101,6 +103,10 @@ public class PrivacyPreferences
|
||||
PrefServiceBridge.getInstance().setSearchSuggestEnabled((boolean) newValue);
|
||||
@@ -90,6 +92,10 @@ public class PrivacySettings
|
||||
Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
|
||||
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
|
||||
PrefServiceBridge.getInstance().setNetworkPredictionEnabled((boolean) newValue);
|
||||
PrivacyPreferencesManager.getInstance().setNetworkPredictionEnabled((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();
|
||||
} else if (PREF_CONTEXTUAL_SEARCH.equals(key)) {
|
||||
PrefServiceBridge.getInstance().setContextualSearchPreference(((boolean) newValue) ? "true" : "false");
|
||||
} else if (PREF_CAN_MAKE_PAYMENT.equals(key)) {
|
||||
@@ -140,6 +146,11 @@ public class PrivacyPreferences
|
||||
} else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
|
||||
PrefServiceBridge.getInstance().setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
|
||||
}
|
||||
@@ -125,6 +131,11 @@ public class PrivacySettings
|
||||
prefServiceBridge.getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED));
|
||||
}
|
||||
|
||||
@@ -92,13 +93,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
|
||||
+
|
||||
Preference doNotTrackPref = findPreference(PREF_DO_NOT_TRACK);
|
||||
if (doNotTrackPref != null) {
|
||||
doNotTrackPref.setSummary(
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -3987,6 +3987,13 @@ The site does NOT gain access to the camera. The camera images are only visible
|
||||
'Installing Extra ICU for Chrome…').">
|
||||
Extra ICU
|
||||
doNotTrackPref.setSummary(prefServiceBridge.getBoolean(Pref.ENABLE_DO_NOT_TRACK)
|
||||
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
|
||||
@@ -3585,6 +3585,13 @@ 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>
|
||||
+ <!-- Allow custom tab intents -->
|
||||
+ <message name="IDS_ALLOW_CUSTOM_TAB_INTENTS_TITLE" desc="Text for 'Allow custom tab intents' settings-privacy option.">
|
||||
@@ -108,8 +109,8 @@ diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/and
|
||||
+ Allow applications to open custom tab intents, similar to webview.
|
||||
+ </message>
|
||||
|
||||
</messages>
|
||||
</release>
|
||||
<!-- Autofill Assistant preferences -->
|
||||
<message name="IDS_PREFS_AUTOFILL_ASSISTANT_TITLE" desc="Title for the Autofill Assistant preferences screen. [CHAR-LIMIT=32]">
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@ Subject: Add exit menu item
|
||||
|
||||
Corrected Exit functionality
|
||||
---
|
||||
chrome/android/java/res/menu/main_menu.xml | 2 ++
|
||||
.../src/org/chromium/chrome/browser/ChromeActivity.java | 2 ++
|
||||
chrome/android/java/res/menu/main_menu.xml | 4 ++++
|
||||
.../src/org/chromium/chrome/browser/ChromeActivity.java | 5 +++++
|
||||
.../chrome/browser/init/ChromeLifetimeController.java | 6 +++++-
|
||||
chrome/android/java/strings/android_chrome_strings.grd | 3 +++
|
||||
4 files changed, 12 insertions(+), 1 deletion(-)
|
||||
.../browser/ui/android/strings/android_chrome_strings.grd | 3 +++
|
||||
4 files changed, 17 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
|
||||
@@ -80,6 +80,8 @@
|
||||
@@ -87,6 +87,8 @@
|
||||
android:title="@string/menu_help" />
|
||||
<item android:id="@+id/enter_vr_id"
|
||||
android:title="@string/enter_vr" />
|
||||
@@ -22,18 +22,30 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
|
||||
</group>
|
||||
|
||||
<!-- Items shown only in the tab switcher -->
|
||||
@@ -104,6 +106,8 @@
|
||||
android:title="@string/menu_group_tabs" />
|
||||
<item android:id="@id/preferences_id"
|
||||
android:title="@string/menu_settings" />
|
||||
+ <item android:id="@+id/exit_id"
|
||||
+ android:title="@string/menu_exit" />
|
||||
</group>
|
||||
|
||||
<!-- Items shown only in the tab switcher when start surface is enabled -->
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
@@ -2204,6 +2204,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
new AddToHomescreenManager(this, currentTab);
|
||||
addToHomescreenManager.start();
|
||||
RecordUserAction.record("MobileMenuAddToHomescreen");
|
||||
+ } else if (id == R.id.exit_id) {
|
||||
@@ -1896,6 +1896,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
RecordUserAction.record("MobileMenuSettings");
|
||||
}
|
||||
|
||||
+ if (id == R.id.exit_id) {
|
||||
+ ApplicationLifetime.terminate(false);
|
||||
} else if (id == R.id.open_webapk_id) {
|
||||
Context context = ContextUtils.getApplicationContext();
|
||||
String packageName =
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
if (id == R.id.update_menu_id) {
|
||||
UpdateMenuItemHelper.getInstance().onMenuItemClicked(this);
|
||||
return true;
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java
|
||||
@@ -50,11 +62,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLife
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -2860,6 +2860,9 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_MENU_PREFERENCES" desc="Menu item for opening browser preferences. [CHAR-LIMIT=27]">
|
||||
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
|
||||
@@ -2551,6 +2551,9 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_MENU_SETTINGS" desc="Menu item for opening browser settings. [CHAR-LIMIT=27]">
|
||||
Settings
|
||||
</message>
|
||||
+ <message name="IDS_MENU_EXIT" desc="Menu item for exit browser. [CHAR-LIMIT=27]">
|
||||
|
||||
@@ -19,7 +19,7 @@ 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
|
||||
@@ -668,6 +668,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
|
||||
@@ -701,6 +701,11 @@ const FeatureEntry::Choice kForceEffectiveConnectionTypeChoices[] = {
|
||||
net::kEffectiveConnectionType4G},
|
||||
};
|
||||
|
||||
@@ -31,22 +31,22 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
// 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 ==
|
||||
@@ -2596,6 +2601,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kPassiveDocumentEventListenersName,
|
||||
flag_descriptions::kPassiveDocumentEventListenersDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kPassiveDocumentEventListeners)},
|
||||
@@ -2953,6 +2958,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kAndroidPictureInPictureAPIName,
|
||||
flag_descriptions::kAndroidPictureInPictureAPIDescription, kOsAndroid,
|
||||
FEATURE_VALUE_TYPE(media::kPictureInPictureAPI)},
|
||||
+ {"max-connections-per-host", flag_descriptions::kMaxConnectionsPerHostName,
|
||||
+ flag_descriptions::kMaxConnectionsPerHostDescription, kOsAll,
|
||||
+ MULTI_VALUE_TYPE(kMaxConnectionsPerHostChoices)},
|
||||
{"document-passive-wheel-event-listeners",
|
||||
flag_descriptions::kPassiveDocumentWheelEventListenersName,
|
||||
flag_descriptions::kPassiveDocumentWheelEventListenersDescription, kOsAll,
|
||||
{"reengagement-notification",
|
||||
flag_descriptions::kReengagementNotificationName,
|
||||
flag_descriptions::kReengagementNotificationDescription, 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
|
||||
@@ -1275,6 +1275,10 @@ const char kLookalikeUrlNavigationSuggestionsDescription[] =
|
||||
const char kMarkHttpAsName[] = "Mark non-secure origins as non-secure";
|
||||
const char kMarkHttpAsDescription[] = "Change the UI treatment for HTTP pages";
|
||||
@@ -1298,6 +1298,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
|
||||
@@ -776,6 +776,9 @@ extern const char kMarkHttpAsWarning[];
|
||||
extern const char kMarkHttpAsWarningAndDangerousOnFormEdits[];
|
||||
extern const char kMarkHttpAsWarningAndDangerousOnPasswordsAndCreditCards[];
|
||||
@@ -770,6 +770,9 @@ extern const char kMarkHttpAsWarningAndDangerousOnFormEdits[];
|
||||
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
|
||||
@@ -78,6 +78,7 @@ executable("make_top_domain_list_variables") {
|
||||
@@ -72,6 +72,7 @@ executable("make_top_domain_list_variables") {
|
||||
"//base",
|
||||
"//base:i18n",
|
||||
"//third_party/icu",
|
||||
|
||||
@@ -13,21 +13,21 @@ Disable it by default on Android as it is everywhere else
|
||||
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
|
||||
@@ -1633,6 +1633,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-webassembly-threads", flag_descriptions::kEnableWasmThreadsName,
|
||||
flag_descriptions::kEnableWasmThreadsDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kWebAssemblyThreads)},
|
||||
@@ -2146,6 +2146,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kOsAura,
|
||||
FEATURE_VALUE_TYPE(features::kOverlayScrollbarFlashWhenMouseEnter)},
|
||||
#endif // USE_AURA
|
||||
+ {"resume-background-video",
|
||||
+ flag_descriptions::kResumeBackgroundVideoName,
|
||||
+ flag_descriptions::kResumeBackgroundVideoDescription, kOsAll,
|
||||
+ FEATURE_VALUE_TYPE(media::kResumeBackgroundVideo)},
|
||||
{"shared-array-buffer", flag_descriptions::kEnableSharedArrayBufferName,
|
||||
flag_descriptions::kEnableSharedArrayBufferDescription, kOsAll,
|
||||
FEATURE_VALUE_TYPE(features::kSharedArrayBuffer)},
|
||||
{"enable-quic", flag_descriptions::kQuicName,
|
||||
flag_descriptions::kQuicDescription, kOsAll,
|
||||
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableQuic, switches::kDisableQuic)},
|
||||
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
|
||||
@@ -904,6 +904,11 @@ const char kMemlogStackModeNative[] = "Native";
|
||||
@@ -912,6 +912,11 @@ const char kMemlogStackModeNative[] = "Native";
|
||||
const char kMemlogStackModeNativeWithThreadNames[] = "Native with thread names";
|
||||
const char kMemlogStackModePseudo[] = "Trace events";
|
||||
|
||||
@@ -42,9 +42,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
|
||||
@@ -532,6 +532,9 @@ extern const char kEnablePortalsDescription[];
|
||||
extern const char kEnablePictureInPictureName[];
|
||||
extern const char kEnablePictureInPictureDescription[];
|
||||
@@ -518,6 +518,9 @@ extern const char kEnablePortalsDescription[];
|
||||
extern const char kEnablePortalsCrossOriginName[];
|
||||
extern const char kEnablePortalsCrossOriginDescription[];
|
||||
|
||||
+extern const char kResumeBackgroundVideoName[];
|
||||
+extern const char kResumeBackgroundVideoDescription[];
|
||||
@@ -55,7 +55,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
||||
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
|
||||
@@ -216,11 +216,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
|
||||
@@ -232,11 +232,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
|
||||
// when in background.
|
||||
const base::Feature kResumeBackgroundVideo {
|
||||
"resume-background-video",
|
||||
@@ -67,7 +67,7 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||
};
|
||||
|
||||
// Enable Media Capabilities with finch-parameters.
|
||||
// When enabled, MediaCapabilities will check with GPU Video Accelerator
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -3,22 +3,22 @@ Date: Sun, 18 Nov 2018 13:06:49 +0100
|
||||
Subject: Add flag to disable IPv6 probes
|
||||
|
||||
---
|
||||
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 ++++++
|
||||
.../url_formatter/spoof_checks/top_domains/BUILD.gn | 3 ++-
|
||||
net/dns/host_resolver_manager.cc | 10 ++++++++--
|
||||
services/network/public/cpp/features.cc | 4 ++++
|
||||
services/network/public/cpp/features.h | 2 ++
|
||||
8 files changed, 34 insertions(+), 3 deletions(-)
|
||||
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 ++++++
|
||||
.../url_formatter/spoof_checks/top_domains/BUILD.gn | 3 ++-
|
||||
net/dns/host_resolver_manager.cc | 9 ++++++++-
|
||||
services/network/public/cpp/features.cc | 4 ++++
|
||||
services/network/public/cpp/features.h | 2 ++
|
||||
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
|
||||
@@ -3244,6 +3244,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kMarkHttpAsFeatureVariations,
|
||||
"HTTPReallyBadFinal")},
|
||||
@@ -3770,6 +3770,11 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kDirectManipulationStylus)},
|
||||
#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
|
||||
|
||||
+ {"ipv6-probing",
|
||||
+ flag_descriptions::kIPv6ProbingName,
|
||||
@@ -26,12 +26,12 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
+ FEATURE_VALUE_TYPE(network::features::kIPv6Probing)},
|
||||
+
|
||||
#if !defined(OS_ANDROID)
|
||||
{"enable-web-authentication-testing-api",
|
||||
flag_descriptions::kEnableWebAuthenticationTestingAPIName,
|
||||
{"ntp-confirm-suggestion-removals",
|
||||
flag_descriptions::kNtpConfirmSuggestionRemovalsName,
|
||||
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
|
||||
@@ -2512,6 +2512,10 @@ const char kContextualSearchSimplifiedServerDescription[] =
|
||||
@@ -2561,6 +2561,10 @@ const char kContextualSearchRankerQueryDescription[] =
|
||||
|
||||
const char kContextualSearchSecondTapName[] =
|
||||
"Contextual Search second tap triggering";
|
||||
@@ -45,20 +45,20 @@ 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
|
||||
@@ -535,6 +535,9 @@ extern const char kEnableNewDownloadBackendDescription[];
|
||||
extern const char kEnablePortalsName[];
|
||||
extern const char kEnablePortalsDescription[];
|
||||
@@ -584,6 +584,9 @@ extern const char kEnableWasmThreadsName[];
|
||||
extern const char kEnableWasmThreadsDescription[];
|
||||
|
||||
extern const char kEnableWasmTieringName[];
|
||||
+extern const char kIPv6ProbingName[];
|
||||
+extern const char kIPv6ProbingDescription[];
|
||||
+
|
||||
extern const char kEnablePictureInPictureName[];
|
||||
extern const char kEnablePictureInPictureDescription[];
|
||||
extern const char kEnableWasmTieringDescription[];
|
||||
|
||||
extern const char kEvDetailsInPageInfoName[];
|
||||
diff --git a/components/subresource_filter/tools/BUILD.gn b/components/subresource_filter/tools/BUILD.gn
|
||||
--- a/components/subresource_filter/tools/BUILD.gn
|
||||
+++ b/components/subresource_filter/tools/BUILD.gn
|
||||
@@ -52,6 +52,8 @@ if (!is_ios) {
|
||||
@@ -50,6 +50,8 @@ if (!is_ios) {
|
||||
deps = [
|
||||
":tools_lib",
|
||||
"//base",
|
||||
@@ -67,7 +67,7 @@ diff --git a/components/subresource_filter/tools/BUILD.gn b/components/subresour
|
||||
]
|
||||
}
|
||||
|
||||
@@ -65,6 +67,8 @@ if (!is_ios) {
|
||||
@@ -61,6 +63,8 @@ if (!is_ios) {
|
||||
":tools_lib",
|
||||
"../core/common",
|
||||
"//base",
|
||||
@@ -76,7 +76,7 @@ diff --git a/components/subresource_filter/tools/BUILD.gn b/components/subresour
|
||||
]
|
||||
}
|
||||
|
||||
@@ -76,6 +80,8 @@ if (!is_ios) {
|
||||
@@ -70,6 +74,8 @@ if (!is_ios) {
|
||||
"ruleset_converter:support",
|
||||
"//base",
|
||||
"//third_party/protobuf:protobuf_lite",
|
||||
@@ -88,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
|
||||
@@ -78,7 +78,8 @@ executable("make_top_domain_list_variables") {
|
||||
@@ -72,7 +72,8 @@ executable("make_top_domain_list_variables") {
|
||||
"//base",
|
||||
"//base:i18n",
|
||||
"//third_party/icu",
|
||||
@@ -101,34 +101,34 @@ 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
|
||||
@@ -87,6 +87,7 @@
|
||||
@@ -93,6 +93,7 @@
|
||||
#include "net/log/net_log_event_type.h"
|
||||
#include "net/log/net_log_source.h"
|
||||
#include "net/log/net_log_source_type.h"
|
||||
+#include "services/network/public/cpp/features.h"
|
||||
#include "net/log/net_log_with_source.h"
|
||||
#include "net/socket/client_socket_factory.h"
|
||||
#include "net/socket/datagram_client_socket.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
+#include "services/network/public/cpp/features.h"
|
||||
#include "url/url_canon_ip.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_MDNS)
|
||||
@@ -3269,8 +3270,13 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) {
|
||||
bool cached = true;
|
||||
if ((tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
|
||||
kIPv6ProbePeriodMs) {
|
||||
- last_ipv6_probe_result_ =
|
||||
- IsGloballyReachable(IPAddress(kIPv6ProbeAddress), net_log);
|
||||
@@ -3583,8 +3584,14 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) {
|
||||
if (last_ipv6_probe_time_.is_null() ||
|
||||
(tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
|
||||
kIPv6ProbePeriodMs) {
|
||||
- SetLastIPv6ProbeResult(
|
||||
+
|
||||
+ if (!base::FeatureList::IsEnabled(network::features::kIPv6Probing)) {
|
||||
+ // pretend IPv6 connectivy probe is successful when probing is disabled
|
||||
+ last_ipv6_probe_result_ = true;
|
||||
+ SetLastIPv6ProbeResult(true);
|
||||
+ } else {
|
||||
+ last_ipv6_probe_result_ =
|
||||
+ IsGloballyReachable(IPAddress(kIPv6ProbeAddress), net_log);
|
||||
+ SetLastIPv6ProbeResult(
|
||||
IsGloballyReachable(IPAddress(kIPv6ProbeAddress), net_log));
|
||||
+ }
|
||||
last_ipv6_probe_time_ = tick_clock_->NowTicks();
|
||||
cached = false;
|
||||
}
|
||||
net_log.AddEvent(
|
||||
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
|
||||
@@ -51,6 +51,10 @@ const base::Feature kReporting{"Reporting", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
@@ -47,6 +47,10 @@ const base::Feature kReporting{"Reporting", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
const base::Feature kThrottleDelayable{"ThrottleDelayable",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
@@ -142,7 +142,7 @@ 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
|
||||
@@ -21,6 +21,8 @@ extern const base::Feature kNetworkErrorLogging;
|
||||
@@ -19,6 +19,8 @@ extern const base::Feature kNetworkErrorLogging;
|
||||
COMPONENT_EXPORT(NETWORK_CPP)
|
||||
extern const base::Feature kNetworkService;
|
||||
COMPONENT_EXPORT(NETWORK_CPP)
|
||||
|
||||
@@ -11,7 +11,7 @@ Subject: Add flag to disable WebGL
|
||||
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
|
||||
@@ -1425,6 +1425,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -1975,6 +1975,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kAccelerated2dCanvasName,
|
||||
flag_descriptions::kAccelerated2dCanvasDescription, kOsAll,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)},
|
||||
@@ -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
|
||||
@@ -426,6 +426,10 @@ const char kDisableAudioForDesktopShareDescription[] =
|
||||
"With this flag on, desktop share picker window will not let the user "
|
||||
"choose whether to share audio.";
|
||||
@@ -484,6 +484,10 @@ const char kDeviceDiscoveryNotificationsName[] =
|
||||
const char kDeviceDiscoveryNotificationsDescription[] =
|
||||
"Device discovery notifications on local network.";
|
||||
|
||||
+const char kDisableWebGLName[] = "Disable all versions of WebGL";
|
||||
+
|
||||
@@ -38,9 +38,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
|
||||
@@ -274,6 +274,9 @@ extern const char kDevtoolsExperimentsDescription[];
|
||||
extern const char kDisableAudioForDesktopShareName[];
|
||||
extern const char kDisableAudioForDesktopShareDescription[];
|
||||
@@ -301,6 +301,9 @@ extern const char kDebugShortcutsDescription[];
|
||||
extern const char kDeviceDiscoveryNotificationsName[];
|
||||
extern const char kDeviceDiscoveryNotificationsDescription[];
|
||||
|
||||
+extern const char kDisableWebGLName[];
|
||||
+extern const char kDisableWebGLDescription[];
|
||||
|
||||
+29
-28
@@ -1,6 +1,6 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 22 Oct 2018 21:29:53 +0200
|
||||
Subject: Add flags to disable device motion and orientation APIs
|
||||
Subject: Add flags to disable device motion/orientation APIs
|
||||
|
||||
Both flags will be disabled by default and prevent usage of gyroscope and
|
||||
legacy acceleration events.
|
||||
@@ -12,15 +12,15 @@ legacy acceleration events.
|
||||
content/public/common/content_features.cc | 10 ++++++++++
|
||||
content/public/common/content_features.h | 2 ++
|
||||
.../blink/public/platform/web_runtime_features.h | 2 ++
|
||||
.../blink/renderer/modules/modules_initializer.cc | 9 ++++++---
|
||||
.../blink/renderer/modules/modules_initializer.cc | 10 +++++++---
|
||||
.../renderer/platform/exported/web_runtime_features.cc | 8 ++++++++
|
||||
.../renderer/platform/runtime_enabled_features.json5 | 8 ++++++++
|
||||
10 files changed, 59 insertions(+), 3 deletions(-)
|
||||
10 files changed, 60 insertions(+), 3 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
|
||||
@@ -1659,6 +1659,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -2199,6 +2199,12 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
{"enable-gpu-rasterization", flag_descriptions::kGpuRasterizationName,
|
||||
flag_descriptions::kGpuRasterizationDescription, kOsAll,
|
||||
MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)},
|
||||
@@ -36,7 +36,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
|
||||
@@ -674,6 +674,14 @@ const char kWinrtSensorsImplementationDescription[] =
|
||||
@@ -705,6 +705,14 @@ const char kWinrtSensorsImplementationDescription[] =
|
||||
"Enables usage of the Windows.Devices.Sensors WinRT APIs on Windows for "
|
||||
"sensors";
|
||||
|
||||
@@ -54,7 +54,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
|
||||
@@ -410,6 +410,12 @@ extern const char kWinrtGeolocationImplementationDescription[];
|
||||
@@ -422,6 +422,12 @@ extern const char kWinrtGeolocationImplementationDescription[];
|
||||
extern const char kWinrtSensorsImplementationName[];
|
||||
extern const char kWinrtSensorsImplementationDescription[];
|
||||
|
||||
@@ -70,9 +70,9 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
|
||||
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
|
||||
@@ -85,6 +85,9 @@ void SetRuntimeFeatureDefaultsForPlatform(
|
||||
@@ -92,6 +92,9 @@ void SetRuntimeFeatureDefaultsForPlatform(
|
||||
command_line.HasSwitch(
|
||||
switches::kEnableGpuMemoryBufferCompositorResources) &&
|
||||
blink::switches::kEnableGpuMemoryBufferCompositorResources) &&
|
||||
!command_line.HasSwitch(switches::kDisableWebGLImageChromium) &&
|
||||
+ WebRuntimeFeatures::EnableDeviceMotion(base::FeatureList::IsEnabled(features::kDeviceMotion));
|
||||
+ WebRuntimeFeatures::EnableDeviceOrientation(base::FeatureList::IsEnabled(features::kDeviceOrientation));
|
||||
@@ -83,7 +83,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.
|
||||
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
|
||||
@@ -688,6 +688,16 @@ const base::Feature kExperimentalProductivityFeatures{
|
||||
@@ -801,6 +801,16 @@ const base::Feature kWebOtpBackend{"kWebOtpBackend",
|
||||
// TODO(rouslan): Remove this.
|
||||
const base::Feature kWebPayments{"WebPayments",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
@@ -98,14 +98,14 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+
|
||||
|
||||
// Makes WebRTC use ECDSA certs by default (i.e., when no cert type was
|
||||
// specified in JS).
|
||||
// Minimal user interface experience for payments on the web.
|
||||
const base::Feature kWebPaymentsMinimalUI{"WebPaymentsMinimalUI",
|
||||
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
|
||||
@@ -156,6 +156,8 @@ CONTENT_EXPORT extern const base::Feature kScriptStreamingOnPreload;
|
||||
CONTENT_EXPORT extern const base::Feature kTrustedDOMTypes;
|
||||
CONTENT_EXPORT extern const base::Feature kBrowserUseDisplayThreadPriority;
|
||||
@@ -175,6 +175,8 @@ CONTENT_EXPORT extern const base::Feature kWebXrHitTest;
|
||||
CONTENT_EXPORT extern const base::Feature kWebXrIncubations;
|
||||
CONTENT_EXPORT extern const base::Feature kWebXrPermissionsApi;
|
||||
|
||||
+CONTENT_EXPORT extern const base::Feature kDeviceMotion, kDeviceOrientation;
|
||||
+
|
||||
@@ -115,7 +115,7 @@ diff --git a/content/public/common/content_features.h b/content/public/common/co
|
||||
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
|
||||
@@ -96,6 +96,8 @@ class WebRuntimeFeatures {
|
||||
@@ -99,6 +99,8 @@ class WebRuntimeFeatures {
|
||||
BLINK_PLATFORM_EXPORT static void EnableCSSHexAlphaColor(bool);
|
||||
BLINK_PLATFORM_EXPORT static void EnableSameSiteByDefaultCookies(bool);
|
||||
BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool);
|
||||
@@ -127,26 +127,27 @@ diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_pa
|
||||
diff --git a/third_party/blink/renderer/modules/modules_initializer.cc b/third_party/blink/renderer/modules/modules_initializer.cc
|
||||
--- a/third_party/blink/renderer/modules/modules_initializer.cc
|
||||
+++ b/third_party/blink/renderer/modules/modules_initializer.cc
|
||||
@@ -235,9 +235,12 @@ void ModulesInitializer::InitInspectorAgentSession(
|
||||
void ModulesInitializer::OnClearWindowObjectInMainWorld(
|
||||
@@ -224,9 +224,13 @@ void ModulesInitializer::OnClearWindowObjectInMainWorld(
|
||||
Document& document,
|
||||
const Settings& settings) const {
|
||||
- DeviceMotionController::From(document);
|
||||
- DeviceOrientationController::From(document);
|
||||
- DeviceOrientationAbsoluteController::From(document);
|
||||
LocalDOMWindow& window = *document.domWindow();
|
||||
- DeviceMotionController::From(window);
|
||||
- DeviceOrientationController::From(window);
|
||||
- DeviceOrientationAbsoluteController::From(window);
|
||||
+ if (RuntimeEnabledFeatures::DeviceMotionEnabled())
|
||||
+ DeviceMotionController::From(document);
|
||||
+ DeviceMotionController::From(window);
|
||||
+ if (RuntimeEnabledFeatures::DeviceOrientationEnabled()) {
|
||||
+ DeviceOrientationController::From(document);
|
||||
+ DeviceOrientationAbsoluteController::From(document);
|
||||
+ DeviceOrientationController::From(window);
|
||||
+ DeviceOrientationAbsoluteController::From(window);
|
||||
+ }
|
||||
NavigatorGamepad::From(document);
|
||||
NavigatorServiceWorker::From(document);
|
||||
DOMWindowStorageController::From(document);
|
||||
+
|
||||
NavigatorGamepad::From(*window.navigator());
|
||||
|
||||
// TODO(nhiroki): Figure out why ServiceWorkerContainer needs to be eagerly
|
||||
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
|
||||
@@ -172,6 +172,14 @@ void WebRuntimeFeatures::EnableScrollTopLeftInterop(bool enable) {
|
||||
@@ -189,6 +189,14 @@ void WebRuntimeFeatures::EnableScrollTopLeftInterop(bool enable) {
|
||||
RuntimeEnabledFeatures::SetScrollTopLeftInteropEnabled(enable);
|
||||
}
|
||||
|
||||
@@ -164,7 +165,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
|
||||
@@ -1132,6 +1132,14 @@
|
||||
@@ -1256,6 +1256,14 @@
|
||||
name: "OffscreenCanvasCommit",
|
||||
status: "experimental",
|
||||
},
|
||||
@@ -0,0 +1,250 @@
|
||||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Fri, 7 Aug 2020 16:33:47 +0000
|
||||
Subject: Add history support in incognito mode
|
||||
|
||||
---
|
||||
.../java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../privacy/settings/PrivacySettings.java | 18 ++++++++++++++++++
|
||||
chrome/browser/history/history_tab_helper.cc | 16 ++++++++++++++++
|
||||
chrome/browser/history/history_tab_helper.h | 4 ++++
|
||||
chrome/browser/prefs/browser_prefs.cc | 2 ++
|
||||
.../android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
.../translations/android_chrome_strings_it.xtb | 2 ++
|
||||
chrome/common/pref_names.cc | 5 +++++
|
||||
chrome/common/pref_names.h | 4 ++++
|
||||
9 files changed, 62 insertions(+)
|
||||
mode change 100644 => 100755 chrome/android/java/res/xml/privacy_preferences.xml
|
||||
mode change 100644 => 100755 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
|
||||
mode change 100644 => 100755 chrome/browser/history/history_tab_helper.cc
|
||||
mode change 100644 => 100755 chrome/browser/history/history_tab_helper.h
|
||||
mode change 100644 => 100755 chrome/browser/prefs/browser_prefs.cc
|
||||
mode change 100644 => 100755 chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
mode change 100644 => 100755 chrome/browser/ui/android/strings/translations/android_chrome_strings_it.xtb
|
||||
mode change 100644 => 100755 chrome/common/pref_names.cc
|
||||
mode change 100644 => 100755 chrome/common/pref_names.h
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -39,6 +39,11 @@
|
||||
android:title="@string/close_tabs_on_exit_title"
|
||||
android:summary="@string/close_tabs_on_exit_summary"
|
||||
android:defaultValue="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
+ android:key="incognito_history_enabled"
|
||||
+ android:title="@string/incognito_history_enabled_title"
|
||||
+ android:summary="@string/incognito_history_enabled_summary"
|
||||
+ android:defaultValue="false" />
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
|
||||
android:key="do_not_track"
|
||||
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
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- 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
|
||||
@@ -38,6 +38,8 @@ import org.chromium.ui.text.SpanApplier;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+import org.chromium.base.Log;
|
||||
+
|
||||
/**
|
||||
* Fragment to keep track of the all the privacy related preferences.
|
||||
*/
|
||||
@@ -54,6 +56,7 @@ public class PrivacySettings
|
||||
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
|
||||
|
||||
public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents";
|
||||
+ public static final String PREF_INCOGNITO_TAB_HISTORY_ENABLED = "incognito_history_enabled";
|
||||
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
@@ -84,6 +87,11 @@ public class PrivacySettings
|
||||
searchSuggestionsPref.setOnPreferenceChangeListener(this);
|
||||
searchSuggestionsPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
|
||||
+ ChromeBaseCheckBoxPreference historyInIncognitoPref =
|
||||
+ (ChromeBaseCheckBoxPreference) findPreference(PREF_INCOGNITO_TAB_HISTORY_ENABLED);
|
||||
+ historyInIncognitoPref.setOnPreferenceChangeListener(this);
|
||||
+ historyInIncognitoPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
+
|
||||
updateSummaries();
|
||||
}
|
||||
|
||||
@@ -105,6 +113,9 @@ public class PrivacySettings
|
||||
SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
sharedPreferencesEditor.putBoolean(PREF_CLOSE_TABS_ON_EXIT, (boolean)newValue);
|
||||
sharedPreferencesEditor.apply();
|
||||
+ } else if (PREF_INCOGNITO_TAB_HISTORY_ENABLED.equals(key)) {
|
||||
+ PrefServiceBridge.getInstance().setBoolean(
|
||||
+ Pref.INCOGNITO_TAB_HISTORY_ENABLED, (boolean) newValue);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -179,6 +190,13 @@ public class PrivacySettings
|
||||
(ChromeBaseCheckBoxPreference) findPreference(PREF_CLOSE_TABS_ON_EXIT);
|
||||
closeTabsOnExitPref.setOnPreferenceChangeListener(this);
|
||||
closeTabsOnExitPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
+
|
||||
+ CheckBoxPreference historyInIncognitoPref =
|
||||
+ (CheckBoxPreference) findPreference(PREF_INCOGNITO_TAB_HISTORY_ENABLED);
|
||||
+ if (historyInIncognitoPref != null) {
|
||||
+ historyInIncognitoPref.setChecked(
|
||||
+ prefServiceBridge.getBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED));
|
||||
+ }
|
||||
}
|
||||
|
||||
private ChromeManagedPreferenceDelegate createManagedPreferenceDelegate() {
|
||||
diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- a/chrome/browser/history/history_tab_helper.cc
|
||||
+++ b/chrome/browser/history/history_tab_helper.cc
|
||||
@@ -29,6 +29,9 @@
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
#include "chrome/browser/android/background_tab_manager.h"
|
||||
+#include "chrome/common/pref_names.h"
|
||||
+#include "components/prefs/pref_registry_simple.h"
|
||||
+#include "components/prefs/pref_service.h"
|
||||
#else
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
@@ -242,6 +245,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) {
|
||||
history::HistoryService* HistoryTabHelper::GetHistoryService() {
|
||||
Profile* profile =
|
||||
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
|
||||
+
|
||||
+#if defined(OS_ANDROID)
|
||||
+ if(profile->GetOriginalProfile()->GetPrefs()->GetBoolean(prefs::kIncognitoTabHistoryEnabled)) {
|
||||
+ return HistoryServiceFactory::GetForProfile(profile, ServiceAccessType::IMPLICIT_ACCESS);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (profile->IsOffTheRecord())
|
||||
return NULL;
|
||||
|
||||
@@ -249,6 +259,12 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() {
|
||||
profile, ServiceAccessType::IMPLICIT_ACCESS);
|
||||
}
|
||||
|
||||
+// static
|
||||
+void HistoryTabHelper::RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
||||
+ registry->RegisterBooleanPref(prefs::kIncognitoTabHistoryEnabled,
|
||||
+ /*default_value=*/false);
|
||||
+}
|
||||
+
|
||||
void HistoryTabHelper::WebContentsDestroyed() {
|
||||
// We update the history for this URL.
|
||||
WebContents* tab = web_contents();
|
||||
diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/history/history_tab_helper.h
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- a/chrome/browser/history/history_tab_helper.h
|
||||
+++ b/chrome/browser/history/history_tab_helper.h
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "base/time/time.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "content/public/browser/web_contents_user_data.h"
|
||||
+#include "components/prefs/pref_registry_simple.h"
|
||||
+#include "components/prefs/pref_service.h"
|
||||
|
||||
namespace history {
|
||||
struct HistoryAddPageArgs;
|
||||
@@ -34,6 +36,8 @@ class HistoryTabHelper : public content::WebContentsObserver,
|
||||
int nav_entry_id,
|
||||
content::NavigationHandle* navigation_handle);
|
||||
|
||||
+ static void RegisterProfilePrefs(PrefRegistrySimple* registry);
|
||||
+
|
||||
private:
|
||||
explicit HistoryTabHelper(content::WebContents* web_contents);
|
||||
friend class content::WebContentsUserData<HistoryTabHelper>;
|
||||
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -233,6 +233,7 @@
|
||||
#include "components/ntp_tiles/popular_sites_impl.h"
|
||||
#include "components/permissions/contexts/geolocation_permission_context_android.h"
|
||||
#include "components/query_tiles/tile_service_prefs.h"
|
||||
+#include "chrome/browser/history/history_tab_helper.h"
|
||||
#if BUILDFLAG(ENABLE_FEED_IN_CHROME)
|
||||
#include "components/feed/core/common/pref_names.h"
|
||||
#endif // BUILDFLAG(ENABLE_FEED_IN_CHROME)
|
||||
@@ -999,6 +1000,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry);
|
||||
variations::VariationsService::RegisterProfilePrefs(registry);
|
||||
feed::prefs::RegisterFeedSharedProfilePrefs(registry);
|
||||
+ HistoryTabHelper::RegisterProfilePrefs(registry);
|
||||
#if BUILDFLAG(ENABLE_FEED_IN_CHROME)
|
||||
feed::RegisterProfilePrefs(registry);
|
||||
#endif // BUILDFLAG(ENABLE_FEED_IN_CHROME)
|
||||
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
|
||||
@@ -794,6 +794,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_ALWAYS_INCOGNITO_SUMMARY" desc="Summary for always incognito mode">
|
||||
Opens links in incognito tabs when you click on new tab or on a link
|
||||
</message>
|
||||
+ <message name="IDS_INCOGNITO_HISTORY_ENABLED_TITLE" desc="Title for always enable history in incognito mode">
|
||||
+ Enable history in incognito tabs
|
||||
+ </message>
|
||||
+ <message name="IDS_INCOGNITO_HISTORY_ENABLED_SUMMARY" desc="Summary for always enable history in incognito mode">
|
||||
+ Record history even in incognito mode
|
||||
+ </message>
|
||||
<message name="IDS_CLEAR_BROWSING_HISTORY_SUMMARY_SIGNED_IN" desc="A text explaining other forms of activity for signed in users.">
|
||||
Clears history and autocompletions in the address bar. Your Google Account may have other forms of browsing history at <ph name="BEGIN_LINK"><link></ph>myactivity.google.com<ph name="END_LINK"></link></ph>.
|
||||
</message>
|
||||
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_it.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_it.xtb
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_it.xtb
|
||||
+++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_it.xtb
|
||||
@@ -1062,4 +1062,6 @@ Ad esempio, alcuni siti web potrebbero rispondere alla richiesta mostrando annun
|
||||
<translation id="666268767214822976">Utilizza un servizio di previsione per visualizzare query correlate e siti web popolari durante la digitazione nella barra degli indirizzi</translation>
|
||||
<translation id="8283853025636624853">Sincronizzazione con <ph name="SYNC_ACCOUNT_USER_NAME" /></translation>
|
||||
<translation id="8981454092730389528">Gestione attività di Google</translation>
|
||||
+<translation id="7889537574758531583">Abilita la cronologia nelle sessioni in incognito</translation>
|
||||
+<translation id="5713583121562162330">Abilita la registrazione della navigazione nella cronologia anche per le sessioni in incognito</translation>
|
||||
</translationbundle>
|
||||
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- a/chrome/common/pref_names.cc
|
||||
+++ b/chrome/common/pref_names.cc
|
||||
@@ -3038,4 +3038,9 @@ const char kMediaFeedsSafeSearchEnabled[] = "media_feeds_safe_search_enabled";
|
||||
// TODO(enne): Remove this once AppCache has been removed.
|
||||
const char kAppCacheForceEnabled[] = "app_cache_force_enabled";
|
||||
|
||||
+#if defined(OS_ANDROID)
|
||||
+const char kIncognitoTabHistoryEnabled[] =
|
||||
+ "incognito_tab_history_enabled";
|
||||
+#endif
|
||||
+
|
||||
} // namespace prefs
|
||||
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -1074,6 +1074,10 @@ extern const char kMediaFeedsSafeSearchEnabled[];
|
||||
|
||||
extern const char kAppCacheForceEnabled[];
|
||||
|
||||
+#if defined(OS_ANDROID)
|
||||
+extern const char kIncognitoTabHistoryEnabled[];
|
||||
+#endif
|
||||
+
|
||||
} // namespace prefs
|
||||
|
||||
#endif // CHROME_COMMON_PREF_NAMES_H_
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 13 Jul 2020 00:37:06 +0200
|
||||
Subject: Add menu item to view source
|
||||
|
||||
---
|
||||
chrome/android/java/res/menu/custom_tabs_menu.xml | 3 +++
|
||||
chrome/android/java/res/menu/main_menu.xml | 2 ++
|
||||
.../chromium/chrome/browser/ChromeActivity.java | 2 ++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 2 ++
|
||||
.../app/appmenu/AppMenuPropertiesDelegateImpl.java | 14 ++++++++++++++
|
||||
.../CustomTabAppMenuPropertiesDelegate.java | 1 +
|
||||
.../ui/android/strings/android_chrome_strings.grd | 3 +++
|
||||
7 files changed, 27 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/menu/custom_tabs_menu.xml b/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
--- a/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
+++ b/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
@@ -46,6 +46,9 @@
|
||||
<item android:id="@+id/add_to_homescreen_id"
|
||||
android:title="@string/menu_add_to_homescreen"
|
||||
android:orderInCategory="2" />
|
||||
+ <item android:id="@+id/view_source_id"
|
||||
+ android:title="@string/view_source"
|
||||
+ android:orderInCategory="2" />
|
||||
<item android:id="@+id/open_webapk_id"
|
||||
android:title="@string/menu_open_webapk"
|
||||
android:orderInCategory="2" />
|
||||
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
|
||||
@@ -66,6 +66,8 @@
|
||||
android:title="@string/menu_find_in_page" />
|
||||
<item android:id="@+id/add_to_homescreen_id"
|
||||
android:title="@string/menu_add_to_homescreen" />
|
||||
+ <item android:id="@+id/view_source_id"
|
||||
+ android:title="@string/view_source" />
|
||||
<item android:id="@+id/open_webapk_id"
|
||||
android:title="@string/menu_open_webapk" />
|
||||
<item android:id="@+id/request_desktop_site_row_menu_id"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
@@ -1984,6 +1984,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(context, R.string.open_webapk_failed, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
+ } else if (id == R.id.view_source_id) {
|
||||
+ currentTab.getWebContents().getNavigationController().loadUrl(new LoadUrlParams("view-source:"+currentTab.getUrlString()));
|
||||
} else if (id == R.id.request_desktop_site_id || id == R.id.request_desktop_site_check_id) {
|
||||
final boolean reloadOnChange = !currentTab.isNativePage();
|
||||
final boolean usingDesktopUserAgent =
|
||||
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
|
||||
@@ -1866,6 +1866,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS_MANAGER);
|
||||
}
|
||||
RecordUserAction.record("MobileMenuDownloadManager");
|
||||
+ } else if (id == R.id.view_source_id) {
|
||||
+ currentTab.getWebContents().getNavigationController().loadUrl(new LoadUrlParams("view-source:"+currentTab.getUrlString()));
|
||||
} else if (id == R.id.open_recently_closed_tab) {
|
||||
TabModel currentModel = mTabModelSelectorImpl.getCurrentModel();
|
||||
if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosedTab();
|
||||
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
|
||||
@@ -287,6 +287,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
isChromeScheme, isFileScheme, isContentScheme, isIncognito, url));
|
||||
|
||||
updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */);
|
||||
+ updateViewSourceMenuItem(menu, currentTab);
|
||||
|
||||
// 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));
|
||||
@@ -622,6 +623,19 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
}
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Updates the view source menu item's state.
|
||||
+ *
|
||||
+ * @param menu {@link Menu} for view source.
|
||||
+ * @param currentTab Current tab being displayed.
|
||||
+ */
|
||||
+ protected void updateViewSourceMenuItem(
|
||||
+ Menu menu, Tab currentTab) {
|
||||
+ MenuItem viewSourceMenuItem = menu.findItem(R.id.view_source_id);
|
||||
+ String url = currentTab.getUrlString();
|
||||
+ viewSourceMenuItem.setVisible(!url.isEmpty() && !url.startsWith("view-source:"));
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Updates the request desktop site item's state.
|
||||
*
|
||||
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
|
||||
@@ -220,6 +220,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
|
||||
}
|
||||
|
||||
updateRequestDesktopSiteMenuItem(menu, currentTab, requestDesktopSiteVisible);
|
||||
+ updateViewSourceMenuItem(menu, currentTab);
|
||||
prepareAddToHomescreenMenuItem(menu, currentTab, addToHomeScreenVisible);
|
||||
}
|
||||
}
|
||||
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
|
||||
@@ -307,6 +307,9 @@ CHAR-LIMIT guidelines:
|
||||
<message name="IDS_SERVICES_CATEGORY_TITLE" desc="Title for the group of preferences that control non-personalized Google services. This group contains preferences for data that is not tied to user's Google Account.">
|
||||
Other Google services
|
||||
</message>
|
||||
+ <message name="IDS_VIEW_SOURCE" desc="Title for the menu command to view the source of the current page. [CHAR-LIMIT=40]">
|
||||
+ View source
|
||||
+ </message>
|
||||
<message name="IDS_PREFS_GOOGLE_SERVICES" desc="Title for the group of preferences that control non-personalized Google services. This group contains preferences for data that is not tied to user's Google Account. [CHAR-LIMIT=40]">
|
||||
Google services
|
||||
</message>
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 14 Sep 2019 10:19:07 +0200
|
||||
Subject: Add menu option to toggle ad blocker
|
||||
|
||||
---
|
||||
.../java/res/menu/custom_tabs_menu.xml | 12 ++++++
|
||||
chrome/android/java/res/menu/main_menu.xml | 11 +++++
|
||||
.../chrome/browser/ChromeActivity.java | 8 ++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 8 ++++
|
||||
.../AppMenuPropertiesDelegateImpl.java | 40 +++++++++++++++++++
|
||||
.../CustomTabAppMenuPropertiesDelegate.java | 2 +
|
||||
.../java/strings/android_chrome_strings.grd | 11 +++++
|
||||
7 files changed, 92 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/menu/custom_tabs_menu.xml b/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
--- a/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
+++ b/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
@@ -75,6 +75,18 @@
|
||||
android:checkable="true" />
|
||||
</menu>
|
||||
</item>
|
||||
+ <item android:id="@+id/enable_adblock_row_menu_id"
|
||||
+ android:title="@null"
|
||||
+ android:orderInCategory="2">
|
||||
+ <menu>
|
||||
+ <item android:id="@+id/enable_adblock_id"
|
||||
+ android:title="@string/menu_enable_adblock" />
|
||||
+ <item android:id="@+id/enable_adblock_check_id"
|
||||
+ android:title="@null"
|
||||
+ android:checkable="true" />
|
||||
+ </menu>
|
||||
+ </item>
|
||||
+
|
||||
<!-- Title is intentionally left blank in xml and will be set in java. -->
|
||||
<item android:id="@+id/open_in_browser_id"
|
||||
android:title=""
|
||||
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
|
||||
@@ -84,6 +84,17 @@
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
+ <item android:id="@+id/enable_adblock_row_menu_id"
|
||||
+ android:title="@null">
|
||||
+ <menu>
|
||||
+ <item android:id="@+id/enable_adblock_id"
|
||||
+ android:title="@string/menu_enable_adblock" />
|
||||
+ <item android:id="@+id/enable_adblock_check_id"
|
||||
+ android:title="@null"
|
||||
+ android:checkable="true" />
|
||||
+ </menu>
|
||||
+ </item>
|
||||
+
|
||||
<item android:id="@+id/reader_mode_prefs_id"
|
||||
android:title="@string/menu_reader_mode_prefs"
|
||||
android:icon="@drawable/reader_mode_prefs_icon" />
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
@@ -2226,6 +2226,14 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
RecordUserAction.record("MobileMenuRequestEnableJavascript");
|
||||
} else if (id == R.id.reader_mode_prefs_id) {
|
||||
DomDistillerUIUtils.openSettings(currentTab.getWebContents());
|
||||
+ } else if (id == R.id.enable_adblock_id || id == R.id.enable_adblock_check_id) {
|
||||
+ final boolean reloadOnChange = !currentTab.isNativePage();
|
||||
+ final boolean adblockEnabled = !PrefServiceBridge.getInstance().isCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS);
|
||||
+ PrefServiceBridge.getInstance().setCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS, adblockEnabled);
|
||||
+ if (reloadOnChange) {
|
||||
+ currentTab.reload();
|
||||
+ }
|
||||
+ RecordUserAction.record("MobileMenuRequestEnableAdBlock");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
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
|
||||
@@ -1767,6 +1767,14 @@ public class ChromeTabbedActivity extends ChromeActivity implements ScreenshotMo
|
||||
reportNewTabShortcutUsed(true);
|
||||
getTabCreator(true).launchNTP();
|
||||
}
|
||||
+ } else if (id == R.id.enable_adblock_id || id == R.id.enable_adblock_check_id) {
|
||||
+ final boolean reloadOnChange = !currentTab.isNativePage();
|
||||
+ final boolean adblockEnabled = !PrefServiceBridge.getInstance().isCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS);
|
||||
+ PrefServiceBridge.getInstance().setCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS, adblockEnabled);
|
||||
+ if (reloadOnChange) {
|
||||
+ currentTab.reload();
|
||||
+ }
|
||||
+ RecordUserAction.record("MobileMenuRequestEnableAdBlock");
|
||||
} else if (id == R.id.all_bookmarks_menu_id) {
|
||||
if (currentTab != null) {
|
||||
getCompositorViewHolder().hideKeyboard(() -> {
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
@@ -27,6 +27,7 @@ import org.chromium.base.metrics.RecordHistogram;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.ActivityTabProvider;
|
||||
import org.chromium.chrome.browser.ChromeSwitches;
|
||||
+import org.chromium.chrome.browser.ContentSettingsType;
|
||||
import org.chromium.chrome.browser.ShortcutHelper;
|
||||
import org.chromium.chrome.browser.banners.AppBannerManager;
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkBridge;
|
||||
@@ -235,6 +236,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
// Prepare translate menu button.
|
||||
prepareTranslateMenuItem(menu, currentTab);
|
||||
|
||||
+ updateEnableAdBlockMenuItem(menu, currentTab);
|
||||
+
|
||||
// Hide 'Add to homescreen' for the following:
|
||||
// * chrome:// pages - Android doesn't know how to direct those URLs.
|
||||
// * incognito pages - To avoid problems where users create shortcuts in incognito
|
||||
@@ -310,6 +313,43 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
PrefServiceBridge.getInstance().isIncognitoModeManaged());
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Updates the ad blocker item's state.
|
||||
+ *
|
||||
+ * @param menu {@link Menu} to enable ad blocker
|
||||
+ * @param currentTab Current tab being displayed.
|
||||
+ */
|
||||
+ protected void updateEnableAdBlockMenuItem(
|
||||
+ Menu menu, Tab currentTab) {
|
||||
+ MenuItem enableMenuRow = menu.findItem(R.id.enable_adblock_row_menu_id);
|
||||
+ MenuItem enableMenuLabel = menu.findItem(R.id.enable_adblock_id);
|
||||
+ MenuItem enableMenuCheck = menu.findItem(R.id.enable_adblock_check_id);
|
||||
+
|
||||
+
|
||||
+ // Hide Block ads on all chrome:// pages except for the NTP.
|
||||
+ String url = currentTab.getUrl();
|
||||
+ boolean isChromeScheme = url.startsWith(UrlConstants.CHROME_URL_PREFIX)
|
||||
+ || url.startsWith(UrlConstants.CHROME_NATIVE_URL_PREFIX);
|
||||
+ // Also hide enable javascsript on Reader Mode.
|
||||
+ boolean isDistilledPage = DomDistillerUrlUtils.isDistilledPage(url);
|
||||
+
|
||||
+ boolean itemVisible = (!isChromeScheme || currentTab.isNativePage()) && !isDistilledPage;
|
||||
+ enableMenuRow.setVisible(itemVisible);
|
||||
+ if (!itemVisible) return;
|
||||
+
|
||||
+ boolean adBlockEnabled = !PrefServiceBridge.getInstance().isCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS);
|
||||
+
|
||||
+ // Mark the checkbox if ad blocker is globally activated.
|
||||
+ enableMenuCheck.setChecked(adBlockEnabled);
|
||||
+
|
||||
+ // This title doesn't seem to be displayed by Android, but it is used to set up
|
||||
+ // accessibility text in {@link AppMenuAdapter#setupMenuButton}.
|
||||
+ enableMenuLabel.setTitleCondensed(adBlockEnabled
|
||||
+ ? mContext.getString(R.string.menu_enable_adblock_on)
|
||||
+ : mContext.getString(R.string.menu_enable_adblock_off));
|
||||
+ }
|
||||
+
|
||||
+
|
||||
/**
|
||||
* Sets the visibility and labels of the "Add to Home screen" and "Open WebAPK" menu items.
|
||||
*/
|
||||
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
|
||||
@@ -205,6 +205,8 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
|
||||
}
|
||||
}
|
||||
|
||||
+ updateEnableAdBlockMenuItem(menu, currentTab);
|
||||
+
|
||||
updateRequestDesktopSiteMenuItem(menu, currentTab, requestDesktopSiteVisible);
|
||||
updateEnableJavascriptMenuItem(menu, currentTab);
|
||||
prepareAddToHomescreenMenuItem(menu, currentTab, addToHomeScreenVisible);
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -2865,6 +2865,17 @@ 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_ENABLE_ADBLOCK" desc="Menu item in Chrome's overflow/options menu. If this menu item is unselected, Bromite will disable ad blocker engine for the page. [CHAR-LIMIT=27]">
|
||||
+ Block ads
|
||||
+ </message>
|
||||
+ <message name="IDS_MENU_ENABLE_ADBLOCK_ON" desc="Accessibility description for when Block ads is selected.">
|
||||
+ Turn off ad blocking
|
||||
+ </message>
|
||||
+ <message name="IDS_MENU_ENABLE_ADBLOCK_OFF" desc="Accessibility description for when Block ads is unselected.">
|
||||
+ Turn on ad blocking
|
||||
+ </message>
|
||||
+
|
||||
<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.17.1
|
||||
|
||||
@@ -1,200 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Wed, 18 Oct 2017 21:26:53 +0200
|
||||
Subject: Add menu option to toggle global Javascript preference
|
||||
|
||||
---
|
||||
.../java/res/menu/custom_tabs_menu.xml | 12 ++++++
|
||||
chrome/android/java/res/menu/main_menu.xml | 13 +++++++
|
||||
.../chrome/browser/ChromeActivity.java | 8 ++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 8 ++++
|
||||
.../AppMenuPropertiesDelegateImpl.java | 39 +++++++++++++++++++
|
||||
.../CustomTabAppMenuPropertiesDelegate.java | 1 +
|
||||
.../java/strings/android_chrome_strings.grd | 11 ++++++
|
||||
7 files changed, 92 insertions(+)
|
||||
|
||||
diff --git a/chrome/android/java/res/menu/custom_tabs_menu.xml b/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
--- a/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
+++ b/chrome/android/java/res/menu/custom_tabs_menu.xml
|
||||
@@ -49,6 +49,7 @@
|
||||
<item android:id="@+id/open_webapk_id"
|
||||
android:title="@string/menu_open_webapk"
|
||||
android:orderInCategory="2" />
|
||||
+
|
||||
<item android:id="@+id/request_desktop_site_row_menu_id"
|
||||
android:title="@null"
|
||||
android:orderInCategory="2">
|
||||
@@ -63,6 +64,17 @@
|
||||
<item android:id="@+id/translate_id"
|
||||
android:title="@string/menu_translate"
|
||||
android:orderInCategory="2"/>
|
||||
+ <item android:id="@+id/enable_javascript_row_menu_id"
|
||||
+ android:title="@null"
|
||||
+ android:orderInCategory="2">
|
||||
+ <menu>
|
||||
+ <item android:id="@+id/enable_javascript_id"
|
||||
+ android:title="@string/menu_enable_javascript" />
|
||||
+ <item android:id="@+id/enable_javascript_check_id"
|
||||
+ android:title="@null"
|
||||
+ android:checkable="true" />
|
||||
+ </menu>
|
||||
+ </item>
|
||||
<!-- Title is intentionally left blank in xml and will be set in java. -->
|
||||
<item android:id="@+id/open_in_browser_id"
|
||||
android:title=""
|
||||
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
|
||||
@@ -61,6 +61,7 @@
|
||||
android:title="@string/menu_add_to_homescreen" />
|
||||
<item android:id="@+id/open_webapk_id"
|
||||
android:title="@string/menu_open_webapk" />
|
||||
+
|
||||
<item android:id="@+id/request_desktop_site_row_menu_id"
|
||||
android:title="@null">
|
||||
<menu>
|
||||
@@ -71,6 +72,18 @@
|
||||
android:checkable="true" />
|
||||
</menu>
|
||||
</item>
|
||||
+
|
||||
+ <item android:id="@+id/enable_javascript_row_menu_id"
|
||||
+ android:title="@null">
|
||||
+ <menu>
|
||||
+ <item android:id="@+id/enable_javascript_id"
|
||||
+ android:title="@string/menu_enable_javascript" />
|
||||
+ <item android:id="@+id/enable_javascript_check_id"
|
||||
+ android:title="@null"
|
||||
+ android:checkable="true" />
|
||||
+ </menu>
|
||||
+ </item>
|
||||
+
|
||||
<item android:id="@+id/reader_mode_prefs_id"
|
||||
android:title="@string/menu_reader_mode_prefs"
|
||||
android:icon="@drawable/reader_mode_prefs_icon" />
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
|
||||
@@ -2216,6 +2216,14 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
|
||||
currentTab.getWebContents().getNavigationController().setUseDesktopUserAgent(
|
||||
!usingDesktopUserAgent, reloadOnChange);
|
||||
RecordUserAction.record("MobileMenuRequestDesktopSite");
|
||||
+ } else if (id == R.id.enable_javascript_id || id == R.id.enable_javascript_check_id) {
|
||||
+ final boolean reloadOnChange = !currentTab.isNativePage();
|
||||
+ final boolean jsEnabled = PrefServiceBridge.getInstance().isCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT);
|
||||
+ PrefServiceBridge.getInstance().setCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT, !jsEnabled);
|
||||
+ if (reloadOnChange) {
|
||||
+ currentTab.reload();
|
||||
+ }
|
||||
+ RecordUserAction.record("MobileMenuRequestEnableJavascript");
|
||||
} else if (id == R.id.reader_mode_prefs_id) {
|
||||
DomDistillerUIUtils.openSettings(currentTab.getWebContents());
|
||||
} else {
|
||||
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
|
||||
@@ -1813,6 +1813,14 @@ public class ChromeTabbedActivity extends ChromeActivity implements ScreenshotMo
|
||||
NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS_MANAGER);
|
||||
}
|
||||
RecordUserAction.record("MobileMenuDownloadManager");
|
||||
+ } else if (id == R.id.enable_javascript_id || id == R.id.enable_javascript_check_id) {
|
||||
+ final boolean reloadOnChange = !currentTab.isNativePage();
|
||||
+ final boolean jsEnabled = PrefServiceBridge.getInstance().isCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT);
|
||||
+ PrefServiceBridge.getInstance().setCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT, !jsEnabled);
|
||||
+ if (reloadOnChange) {
|
||||
+ currentTab.reload();
|
||||
+ }
|
||||
+ RecordUserAction.record("MobileMenuRequestEnableJavascript");
|
||||
} else if (id == R.id.open_recently_closed_tab) {
|
||||
TabModel currentModel = mTabModelSelectorImpl.getCurrentModel();
|
||||
if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosedTab();
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenuPropertiesDelegateImpl.java
|
||||
@@ -252,6 +252,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
|
||||
updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */);
|
||||
|
||||
+ updateEnableJavascriptMenuItem(menu, currentTab);
|
||||
+
|
||||
// Only display reader mode settings menu option if the current page is in reader mode.
|
||||
menu.findItem(R.id.reader_mode_prefs_id)
|
||||
.setVisible(DomDistillerUrlUtils.isDistilledPage(currentTab.getUrl()));
|
||||
@@ -438,6 +440,43 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
|
||||
}
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Updates the enable JavaScript item's state.
|
||||
+ *
|
||||
+ * @param menu {@link Menu} for enable javascript
|
||||
+ * @param currentTab Current tab being displayed.
|
||||
+ */
|
||||
+ protected void updateEnableJavascriptMenuItem(
|
||||
+ Menu menu, Tab currentTab) {
|
||||
+ MenuItem enableMenuRow = menu.findItem(R.id.enable_javascript_row_menu_id);
|
||||
+ MenuItem enableMenuLabel = menu.findItem(R.id.enable_javascript_id);
|
||||
+ MenuItem enableMenuCheck = menu.findItem(R.id.enable_javascript_check_id);
|
||||
+
|
||||
+ // Hide enable javascript on all chrome:// pages except for the NTP.
|
||||
+ String url = currentTab.getUrl();
|
||||
+ boolean isChromeScheme = url.startsWith(UrlConstants.CHROME_URL_PREFIX)
|
||||
+ || url.startsWith(UrlConstants.CHROME_NATIVE_URL_PREFIX);
|
||||
+ // Also hide enable javascsript on Reader Mode.
|
||||
+ boolean isDistilledPage = DomDistillerUrlUtils.isDistilledPage(url);
|
||||
+
|
||||
+ boolean itemVisible = (!isChromeScheme || currentTab.isNativePage()) && !isDistilledPage;
|
||||
+ enableMenuRow.setVisible(itemVisible);
|
||||
+ if (!itemVisible) return;
|
||||
+
|
||||
+ boolean jsEnabled = PrefServiceBridge.getInstance().isCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT);
|
||||
+
|
||||
+ // Mark the checkbox if Javascript is activated on this tab.
|
||||
+ enableMenuCheck.setChecked(jsEnabled);
|
||||
+
|
||||
+ // This title doesn't seem to be displayed by Android, but it is used to set up
|
||||
+ // accessibility text in {@link AppMenuAdapter#setupMenuButton}.
|
||||
+ enableMenuLabel.setTitleCondensed(jsEnabled
|
||||
+ ? mContext.getString(R.string.menu_enable_javascript_on)
|
||||
+ : mContext.getString(R.string.menu_enable_javascript_off));
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+
|
||||
/**
|
||||
* Updates the request desktop site item's state.
|
||||
*
|
||||
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
|
||||
@@ -206,6 +206,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat
|
||||
}
|
||||
|
||||
updateRequestDesktopSiteMenuItem(menu, currentTab, requestDesktopSiteVisible);
|
||||
+ updateEnableJavascriptMenuItem(menu, currentTab);
|
||||
prepareAddToHomescreenMenuItem(menu, currentTab, addToHomeScreenVisible);
|
||||
}
|
||||
}
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -2845,6 +2845,17 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
<message name="IDS_MENU_FIND_IN_PAGE" desc="Menu item allowing users to find text within the current page. [CHAR-LIMIT=27]">
|
||||
Find in page
|
||||
</message>
|
||||
+
|
||||
+ <message name="IDS_MENU_ENABLE_JAVASCRIPT" desc="Menu item in Chrome's overflow/options menu. If this menu item is unselected, Bromite will disable JavaScript support for the page. [CHAR-LIMIT=27]">
|
||||
+ JavaScript
|
||||
+ </message>
|
||||
+ <message name="IDS_MENU_ENABLE_JAVASCRIPT_ON" desc="Accessibility description for when Enable JavaScript is selected.">
|
||||
+ Turn off JavaScript
|
||||
+ </message>
|
||||
+ <message name="IDS_MENU_ENABLE_JAVASCRIPT_OFF" desc="Accessibility description for when Enable JavaScript is unselected.">
|
||||
+ Turn on JavaScript
|
||||
+ </message>
|
||||
+
|
||||
<message name="IDS_MENU_REQUEST_DESKTOP_SITE" desc="Menu item in Chrome's overflow/options menu. By default, when a user navigates to a web page, Chrome shows the mobile site, that is, the version of the site designed for mobile phones. If this menu item is selected, however, Chrome will try to load the 'desktop' site instead, i.e. the site designed for desktop computers or laptop computers, which have larger screens. [CHAR-LIMIT=24]">
|
||||
Desktop site
|
||||
</message>
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -3,45 +3,66 @@ Date: Thu, 5 Dec 2019 22:41:25 +0100
|
||||
Subject: Add option to configure the ad blocker filters URL
|
||||
|
||||
---
|
||||
chrome/android/chrome_java_resources.gni | 2 +
|
||||
chrome/android/chrome_java_sources.gni | 2 +
|
||||
.../java/res/layout/adblock_editor.xml | 65 +++++++++++++
|
||||
.../java/res/layout/adblock_editor.xml | 67 ++++++++++++++
|
||||
chrome/android/java/res/values/values.xml | 2 +
|
||||
.../java/res/xml/adblock_preferences.xml | 25 +++++
|
||||
.../android/java/res/xml/main_preferences.xml | 11 ++-
|
||||
.../browser/preferences/AdBlockEditor.java | 91 +++++++++++++++++++
|
||||
.../preferences/AdBlockPreferences.java | 53 +++++++++++
|
||||
.../java/strings/android_chrome_strings.grd | 14 +++
|
||||
.../android/java/res/xml/main_preferences.xml | 5 +
|
||||
.../browser/settings/AdBlockEditor.java | 92 +++++++++++++++++++
|
||||
.../browser/settings/AdBlockPreferences.java | 61 ++++++++++++
|
||||
chrome/app/generated_resources.grd | 10 ++
|
||||
chrome/browser/android/feature_utilities.cc | 8 ++
|
||||
chrome/browser/browser_process_impl.cc | 3 +-
|
||||
.../net/system_network_context_manager.cc | 3 +
|
||||
.../flags/android/cached_feature_flags.cc | 8 ++
|
||||
.../browser/flags/CachedFeatureFlags.java | 10 ++
|
||||
.../net/system_network_context_manager.cc | 4 +
|
||||
.../strings/android_chrome_strings.grd | 14 +++
|
||||
chrome/common/pref_names.cc | 3 +
|
||||
chrome/common/pref_names.h | 1 +
|
||||
.../adblock_updater_service.cc | 6 +-
|
||||
.../adblock_updater_service.h | 3 +-
|
||||
16 files changed, 292 insertions(+), 8 deletions(-)
|
||||
18 files changed, 313 insertions(+), 5 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/preferences/AdBlockEditor.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockPreferences.java
|
||||
|
||||
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
|
||||
@@ -815,6 +815,7 @@ chrome_java_resources = [
|
||||
"java/res/layout/account_picker_new_account_row_legacy.xml",
|
||||
"java/res/layout/account_picker_row.xml",
|
||||
"java/res/layout/account_picker_row_legacy.xml",
|
||||
+ "java/res/layout/adblock_editor.xml",
|
||||
"java/res/layout/add_languages_main.xml",
|
||||
"java/res/layout/add_to_homescreen_dialog.xml",
|
||||
"java/res/layout/auto_sign_in_first_run_dialog.xml",
|
||||
@@ -1102,6 +1103,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_server_profile_preferences.xml",
|
||||
"java/res/xml/bookmark_widget_info.xml",
|
||||
"java/res/xml/clear_browsing_data_preferences_tab.xml",
|
||||
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
|
||||
@@ -1277,6 +1277,8 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/preferences/PreferenceUtils.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/Preferences.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/PreferencesLauncher.java",
|
||||
+ "java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java",
|
||||
+ "java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/SearchEnginePreference.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/SearchUtils.java",
|
||||
@@ -1318,6 +1318,8 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/photo_picker/DecodeVideoTask.java",
|
||||
"java/src/org/chromium/chrome/browser/photo_picker/DecoderService.java",
|
||||
"java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.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/photo_picker/FileEnumWorkerTask.java",
|
||||
"java/src/org/chromium/chrome/browser/photo_picker/PhotoPickerDialog.java",
|
||||
"java/src/org/chromium/chrome/browser/photo_picker/PhotoPickerToolbar.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
|
||||
+++ b/chrome/android/java/res/layout/adblock_editor.xml
|
||||
@@ -0,0 +1,65 @@
|
||||
@@ -0,0 +1,67 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+ Use of this source code is governed by a BSD-style license that can be
|
||||
@@ -66,9 +87,11 @@ new file mode 100644
|
||||
+ android:orientation="vertical"
|
||||
+ android:focusableInTouchMode="true" >
|
||||
+
|
||||
+ <org.chromium.chrome.browser.widget.ChromeTextInputLayout
|
||||
+ <com.google.android.material.textfield.TextInputLayout
|
||||
+ android:id="@+id/adblock_url"
|
||||
+ style="@style/PreferenceScreenLayout"
|
||||
+ android:paddingTop="16dp"
|
||||
+ android:paddingStart="@dimen/pref_autofill_content_spacing"
|
||||
+ android:paddingEnd="@dimen/pref_autofill_content_spacing"
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="wrap_content" >
|
||||
+ <!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
|
||||
@@ -80,7 +103,7 @@ new file mode 100644
|
||||
+ android:inputType="textUri"
|
||||
+ android:singleLine="true"
|
||||
+ android:hint="@string/options_adblock_edit_label" />
|
||||
+ </org.chromium.chrome.browser.widget.ChromeTextInputLayout>
|
||||
+ </com.google.android.material.textfield.TextInputLayout>
|
||||
+
|
||||
+ <Space style="@style/ButtonBarTopSpacer" />
|
||||
+ <View style="@style/ButtonBarTopDivider" />
|
||||
@@ -104,20 +127,20 @@ new file mode 100644
|
||||
+ </LinearLayout>
|
||||
+ </ScrollView>
|
||||
+
|
||||
+ <include layout="@layout/preferences_action_bar_shadow"/>
|
||||
+ <include layout="@layout/settings_action_bar_shadow"/>
|
||||
+
|
||||
+</FrameLayout>
|
||||
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
|
||||
--- a/chrome/android/java/res/values/values.xml
|
||||
+++ b/chrome/android/java/res/values/values.xml
|
||||
@@ -70,6 +70,8 @@
|
||||
@@ -66,6 +66,8 @@
|
||||
<!-- Our manage space activity. Default pre-KitKat to be nothing. -->
|
||||
<string name="manage_space_activity"></string>
|
||||
|
||||
+ <string name="adblock_help_url">https://www.bromite.org/custom-filters</string>
|
||||
+
|
||||
<!-- Value for scaleX to mirror drawables correctly for LTR / RTL layouts. -->
|
||||
<integer name="automirror_scale_x_reverse">-1</integer>
|
||||
<string name="proxy_title">Proxy configuration</string>
|
||||
<string name="proxy_url">chrome://proxy</string>
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/adblock_preferences.xml b/chrome/android/java/res/xml/adblock_preferences.xml
|
||||
new file mode 100644
|
||||
@@ -133,12 +156,12 @@ new file mode 100644
|
||||
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
+
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeSwitchPreference
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="adblock_switch"
|
||||
+ android:summaryOn="@string/text_on"
|
||||
+ android:summaryOff="@string/text_off" />
|
||||
+
|
||||
+ <org.chromium.chrome.browser.preferences.HyperlinkPreference
|
||||
+ <org.chromium.chrome.browser.about_settings.HyperlinkPreference
|
||||
+ android:key="adblock_help"
|
||||
+ android:title="@string/adblock_help"
|
||||
+ app:url="@string/adblock_help_url" />
|
||||
@@ -146,54 +169,37 @@ new file mode 100644
|
||||
+ <Preference
|
||||
+ android:key="adblock_edit"
|
||||
+ android:title="@string/options_adblock_edit_label"
|
||||
+ android:fragment="org.chromium.chrome.browser.preferences.AdBlockEditor" />
|
||||
+ android:fragment="org.chromium.chrome.browser.settings.AdBlockEditor" />
|
||||
+
|
||||
+</PreferenceScreen>
|
||||
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/main_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/main_preferences.xml
|
||||
@@ -60,20 +60,25 @@
|
||||
@@ -61,6 +61,11 @@
|
||||
android:key="privacy"
|
||||
android:order="13"
|
||||
android:order="14"
|
||||
android:title="@string/prefs_privacy"/>
|
||||
+ <Preference
|
||||
+ android:fragment="org.chromium.chrome.browser.preferences.AdBlockPreferences"
|
||||
+ android:fragment="org.chromium.chrome.browser.settings.AdBlockPreferences"
|
||||
+ android:key="adblock"
|
||||
+ android:order="14"
|
||||
+ android:order="13"
|
||||
+ android:title="@string/prefs_adblock"/>
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.AccessibilityPreferences"
|
||||
android:fragment="org.chromium.chrome.browser.accessibility.settings.AccessibilitySettings"
|
||||
android:key="accessibility"
|
||||
- android:order="14"
|
||||
+ android:order="15"
|
||||
android:title="@string/prefs_accessibility"/>
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.website.SiteSettingsPreferences"
|
||||
android:key="content_settings"
|
||||
- android:order="15"
|
||||
+ android:order="16"
|
||||
android:title="@string/prefs_site_settings"/>
|
||||
<Preference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.languages.LanguagesPreferences"
|
||||
android:key="languages"
|
||||
- android:order="16"
|
||||
+ android:order="17"
|
||||
android:title="@string/prefs_languages"/>
|
||||
<org.chromium.chrome.browser.preferences.ChromeBasePreference
|
||||
android:fragment="org.chromium.chrome.browser.preferences.download.DownloadPreferences"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockEditor.java
|
||||
@@ -0,0 +1,91 @@
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java
|
||||
@@ -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.
|
||||
+
|
||||
+package org.chromium.chrome.browser.preferences;
|
||||
+package org.chromium.chrome.browser.settings;
|
||||
+
|
||||
+import android.os.Bundle;
|
||||
+import android.support.v4.app.Fragment;
|
||||
+import androidx.fragment.app.Fragment;
|
||||
+import android.text.Editable;
|
||||
+import android.text.TextWatcher;
|
||||
+import android.view.LayoutInflater;
|
||||
@@ -202,12 +208,13 @@ new file mode 100644
|
||||
+import android.widget.Button;
|
||||
+import android.widget.EditText;
|
||||
+
|
||||
+import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
+import org.chromium.components.browser_ui.settings.SettingsUtils;
|
||||
+import org.chromium.chrome.browser.flags.CachedFeatureFlags;
|
||||
+import org.chromium.chrome.R;
|
||||
+import org.chromium.components.url_formatter.UrlFormatter;
|
||||
+
|
||||
+/**
|
||||
+ * Provides the Java-UI for editing the DNS-over-HTTPS (AdBlock) preference.
|
||||
+ * Provides the Java-UI for editing AdBlock preferences.
|
||||
+ */
|
||||
+public class AdBlockEditor extends Fragment implements TextWatcher {
|
||||
+ private EditText mAdBlockFiltersUrlEdit;
|
||||
@@ -223,9 +230,9 @@ new file mode 100644
|
||||
+ View v = inflater.inflate(R.layout.adblock_editor, container, false);
|
||||
+ View scrollView = v.findViewById(R.id.scroll_view);
|
||||
+ scrollView.getViewTreeObserver().addOnScrollChangedListener(
|
||||
+ PreferenceUtils.getShowShadowOnScrollListener(v, v.findViewById(R.id.shadow)));
|
||||
+ SettingsUtils.getShowShadowOnScrollListener(v, v.findViewById(R.id.shadow)));
|
||||
+ mAdBlockFiltersUrlEdit = (EditText) v.findViewById(R.id.adblock_url_edit);
|
||||
+ mAdBlockFiltersUrlEdit.setText(FeatureUtilities.getAdBlockFiltersURL());
|
||||
+ mAdBlockFiltersUrlEdit.setText(CachedFeatureFlags.getAdBlockFiltersURL());
|
||||
+ mAdBlockFiltersUrlEdit.addTextChangedListener(this);
|
||||
+ mAdBlockFiltersUrlEdit.requestFocus();
|
||||
+
|
||||
@@ -252,7 +259,7 @@ new file mode 100644
|
||||
+ mResetButton.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ mAdBlockFiltersUrlEdit.setText(FeatureUtilities.getAdBlockFiltersURL());
|
||||
+ mAdBlockFiltersUrlEdit.setText(CachedFeatureFlags.getAdBlockFiltersURL());
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
@@ -262,8 +269,8 @@ new file mode 100644
|
||||
+ mSaveButton.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ FeatureUtilities.setAdBlockFiltersURL(
|
||||
+ UrlFormatter.fixupUrl(mAdBlockFiltersUrlEdit.getText().toString()));
|
||||
+ CachedFeatureFlags.setAdBlockFiltersURL(
|
||||
+ UrlFormatter.fixupUrl(mAdBlockFiltersUrlEdit.getText().toString()).getSpec());
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
@@ -277,30 +284,35 @@ new file mode 100644
|
||||
+ });
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockPreferences.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/AdBlockPreferences.java
|
||||
@@ -0,0 +1,53 @@
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockPreferences.java
|
||||
@@ -0,0 +1,61 @@
|
||||
+// 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.preferences;
|
||||
+package org.chromium.chrome.browser.settings;
|
||||
+
|
||||
+import android.os.Bundle;
|
||||
+import android.support.v7.preference.Preference;
|
||||
+import android.support.v7.preference.PreferenceFragmentCompat;
|
||||
+import androidx.preference.Preference;
|
||||
+import androidx.preference.PreferenceFragmentCompat;
|
||||
+import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
|
||||
+
|
||||
+import org.chromium.chrome.browser.ContentSettingsType;
|
||||
+import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
+import org.chromium.base.VisibleForTesting;
|
||||
+import org.chromium.components.embedder_support.browser_context.BrowserContextHandle;
|
||||
+import org.chromium.components.browser_ui.site_settings.SiteSettingsPreferenceFragment;
|
||||
+import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge;
|
||||
+import org.chromium.components.content_settings.ContentSettingsType;
|
||||
+import org.chromium.components.browser_ui.settings.SettingsUtils;
|
||||
+import org.chromium.chrome.browser.flags.CachedFeatureFlags;
|
||||
+import androidx.annotation.VisibleForTesting;
|
||||
+import org.chromium.chrome.R;
|
||||
+
|
||||
+/**
|
||||
+ * Fragment that allows the user to configure AdBlock related preferences.
|
||||
+ */
|
||||
+public class AdBlockPreferences extends PreferenceFragmentCompat {
|
||||
+public class AdBlockPreferences extends SiteSettingsPreferenceFragment {
|
||||
+ @VisibleForTesting
|
||||
+ public static final String PREF_ADBLOCK_SWITCH = "adblock_switch";
|
||||
+ private static final String PREF_ADBLOCK_EDIT = "adblock_edit";
|
||||
@@ -310,14 +322,17 @@ new file mode 100644
|
||||
+ @Override
|
||||
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
+ getActivity().setTitle(R.string.options_adblock_title);
|
||||
+ PreferenceUtils.addPreferencesFromResource(this, R.xml.adblock_preferences);
|
||||
+ SettingsUtils.addPreferencesFromResource(this, R.xml.adblock_preferences);
|
||||
+
|
||||
+ BrowserContextHandle browserContextHandle =
|
||||
+ getSiteSettingsClient().getBrowserContextHandle();
|
||||
+
|
||||
+ ChromeSwitchPreference mAdBlockSwitch =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_ADBLOCK_SWITCH);
|
||||
+ boolean isAdBlockEnabled = !PrefServiceBridge.getInstance().isCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS);
|
||||
+ boolean isAdBlockEnabled = !WebsitePreferenceBridge.isCategoryEnabled(browserContextHandle, ContentSettingsType.ADS);
|
||||
+ mAdBlockSwitch.setChecked(isAdBlockEnabled);
|
||||
+ mAdBlockSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
+ PrefServiceBridge.getInstance().setCategoryEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_ADS, !(boolean) newValue);
|
||||
+ WebsitePreferenceBridge.setCategoryEnabled(browserContextHandle, ContentSettingsType.ADS, !(boolean) newValue);
|
||||
+ return true;
|
||||
+ });
|
||||
+
|
||||
@@ -326,7 +341,7 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ private void updateCurrentAdBlockUrl() {
|
||||
+ mAdBlockEdit.setSummary(FeatureUtilities.getAdBlockFiltersURL());
|
||||
+ mAdBlockEdit.setSummary(CachedFeatureFlags.getAdBlockFiltersURL());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@@ -335,34 +350,10 @@ new file mode 100644
|
||||
+ updateCurrentAdBlockUrl();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -870,6 +870,20 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
Captions
|
||||
</message>
|
||||
|
||||
+ <!-- AdBlock settings -->
|
||||
+ <message name="IDS_PREFS_ADBLOCK" desc="Title of the AdBlock Settings screen. [CHAR-LIMIT=32]">
|
||||
+ AdBlock settings
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_ADBLOCK_EDIT_TITLE" desc="The title of the screen that allows users to change the URL that is used to fetch the ad blocker filters.">
|
||||
+ Edit filters URL
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_ADBLOCK_EDIT_LABEL" desc="The label for the edit text field that allows the user to change the URL that is used to fetch the ad blocker filters.">
|
||||
+ Filters URL
|
||||
+ </message>
|
||||
+ <message name="IDS_ADBLOCK_HELP" desc="The title of the hyperlink that allows users to visit the web page with instructions for custom ad blocker filters.">
|
||||
+ Visit help page
|
||||
+ </message>
|
||||
+
|
||||
<!-- Site settings -->
|
||||
<message name="IDS_PREFS_SITE_SETTINGS" desc="Title of the Website Settings screen. [CHAR-LIMIT=32]">
|
||||
Site settings
|
||||
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
|
||||
@@ -9603,6 +9603,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
|
||||
@@ -9883,6 +9883,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
|
||||
Never show this again.
|
||||
</message>
|
||||
|
||||
@@ -379,28 +370,10 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources
|
||||
<!-- Ad Blocking UI strings. -->
|
||||
<message name="IDS_ALWAYS_ALLOW_ADS" desc="Explanation associated with a toggle to allow ads after ads have been blocked on the page. To be used on pages where the ad blocking UI is governed by a persistent permissions-based whitelist.">
|
||||
Always allow ads on this site
|
||||
diff --git a/chrome/browser/android/feature_utilities.cc b/chrome/browser/android/feature_utilities.cc
|
||||
--- a/chrome/browser/android/feature_utilities.cc
|
||||
+++ b/chrome/browser/android/feature_utilities.cc
|
||||
@@ -50,6 +50,14 @@ std::string GetReachedCodeProfilerTrialGroup() {
|
||||
} // namespace android
|
||||
} // namespace chrome
|
||||
|
||||
+static ScopedJavaLocalRef<jstring> JNI_FeatureUtilities_GetAdBlockFiltersURL(JNIEnv* env) {
|
||||
+ return base::android::ConvertUTF8ToJavaString(env, g_browser_process->local_state()->GetString(prefs::kAdBlockFiltersURL));
|
||||
+}
|
||||
+
|
||||
+static void JNI_FeatureUtilities_SetAdBlockFiltersURL(JNIEnv* env, const JavaParamRef<jstring>& url) {
|
||||
+ g_browser_process->local_state()->SetString(prefs::kAdBlockFiltersURL, base::android::ConvertJavaStringToUTF8(env, url));
|
||||
+}
|
||||
+
|
||||
static void JNI_FeatureUtilities_SetCustomTabVisible(
|
||||
JNIEnv* env,
|
||||
jboolean visible) {
|
||||
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
|
||||
@@ -1028,7 +1028,8 @@ BrowserProcessImpl::adblock_updater() {
|
||||
@@ -1075,7 +1075,8 @@ BrowserProcessImpl::adblock_updater() {
|
||||
adblock_updater_ = std::make_unique<adblock_updater::AdBlockUpdaterService>(
|
||||
g_browser_process->system_network_context_manager()->GetSharedURLLoaderFactory(),
|
||||
std::move(scheduler),
|
||||
@@ -410,30 +383,99 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
|
||||
|
||||
return adblock_updater_.get();
|
||||
}
|
||||
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
|
||||
@@ -36,6 +36,14 @@ std::string GetReachedCodeProfilerTrialGroup() {
|
||||
} // namespace android
|
||||
} // namespace chrome
|
||||
|
||||
+static ScopedJavaLocalRef<jstring> JNI_CachedFeatureFlags_GetAdBlockFiltersURL(JNIEnv* env) {
|
||||
+ return base::android::ConvertUTF8ToJavaString(env, g_browser_process->local_state()->GetString(prefs::kAdBlockFiltersURL));
|
||||
+}
|
||||
+
|
||||
+static void JNI_CachedFeatureFlags_SetAdBlockFiltersURL(JNIEnv* env, const JavaParamRef<jstring>& url) {
|
||||
+ g_browser_process->local_state()->SetString(prefs::kAdBlockFiltersURL, base::android::ConvertJavaStringToUTF8(env, url));
|
||||
+}
|
||||
+
|
||||
static jboolean JNI_CachedFeatureFlags_IsNetworkServiceWarmUpEnabled(
|
||||
JNIEnv* env) {
|
||||
return content::IsOutOfProcessNetworkService() &&
|
||||
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
|
||||
@@ -253,6 +253,14 @@ public class CachedFeatureFlags {
|
||||
ChromeFeatureList.REACHED_CODE_PROFILER, "sampling_interval_us", 0));
|
||||
}
|
||||
|
||||
+ public static void setAdBlockFiltersURL(String url) {
|
||||
+ CachedFeatureFlagsJni.get().setAdBlockFiltersURL(url);
|
||||
+ }
|
||||
+
|
||||
+ public static String getAdBlockFiltersURL() {
|
||||
+ return CachedFeatureFlagsJni.get().getAdBlockFiltersURL();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Caches flags that must take effect on startup but are set via native code.
|
||||
*/
|
||||
@@ -405,5 +413,7 @@ public class CachedFeatureFlags {
|
||||
@NativeMethods
|
||||
interface Natives {
|
||||
boolean isNetworkServiceWarmUpEnabled();
|
||||
+ void setAdBlockFiltersURL(String url);
|
||||
+ String getAdBlockFiltersURL();
|
||||
}
|
||||
}
|
||||
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
|
||||
@@ -405,6 +405,8 @@ SystemNetworkContextManager::SystemNetworkContextManager(
|
||||
ssl_config_service_manager_(
|
||||
@@ -331,6 +331,8 @@ SystemNetworkContextManager::SystemNetworkContextManager(
|
||||
SSLConfigServiceManager::CreateDefaultManager(local_state_)),
|
||||
proxy_config_monitor_(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 !defined(OS_ANDROID)
|
||||
// QuicAllowed was not part of Android policy.
|
||||
const base::Value* value =
|
||||
@@ -508,6 +510,7 @@ SystemNetworkContextManager::~SystemNetworkContextManager() {
|
||||
}
|
||||
|
||||
@@ -392,6 +394,8 @@ SystemNetworkContextManager::~SystemNetworkContextManager() {
|
||||
void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
StubResolverConfigReader::RegisterPrefs(registry);
|
||||
|
||||
+ registry->RegisterStringPref(prefs::kAdBlockFiltersURL, std::string());
|
||||
// Register the DnsClient and DoH preferences. The feature list has not been
|
||||
// initialized yet, so setting the preference defaults here to reflect the
|
||||
// corresponding features will only cause the preference defaults to reflect
|
||||
+
|
||||
// Static auth params
|
||||
registry->RegisterStringPref(prefs::kAuthSchemes,
|
||||
"basic,digest,ntlm,negotiate");
|
||||
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
|
||||
@@ -1958,6 +1958,20 @@ To change this setting, <ph name="BEGIN_LINK"><resetlink></ph>reset sync<p
|
||||
Work profile
|
||||
</message>
|
||||
|
||||
+ <!-- AdBlock settings -->
|
||||
+ <message name="IDS_PREFS_ADBLOCK" desc="Title of the AdBlock Settings screen. [CHAR-LIMIT=32]">
|
||||
+ AdBlock settings
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_ADBLOCK_EDIT_TITLE" desc="The title of the screen that allows users to change the URL that is used to fetch the ad blocker filters.">
|
||||
+ Edit filters URL
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_ADBLOCK_EDIT_LABEL" desc="The label for the edit text field that allows the user to change the URL that is used to fetch the ad blocker filters.">
|
||||
+ Filters URL
|
||||
+ </message>
|
||||
+ <message name="IDS_ADBLOCK_HELP" desc="The title of the hyperlink that allows users to visit the web page with instructions for custom ad blocker filters.">
|
||||
+ Visit help page
|
||||
+ </message>
|
||||
+
|
||||
<!-- Fullscreen -->
|
||||
<message name="IDS_IMMERSIVE_FULLSCREEN_API_NOTIFICATION" desc="Notification message when a site has entered immersive fullscreen and the directions of how to exit.">
|
||||
Drag from top and touch the back button to exit full screen.
|
||||
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
|
||||
@@ -1925,6 +1925,9 @@ const char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled";
|
||||
@@ -2069,6 +2069,9 @@ const char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled";
|
||||
// capture devices without prompt.
|
||||
const char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls";
|
||||
|
||||
@@ -452,8 +494,8 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
|
||||
extern const char kHomePage[];
|
||||
+extern const char kAdBlockFiltersURL[];
|
||||
extern const char kImportantSitesDialogHistory[];
|
||||
extern const char kProfileCreationTime[];
|
||||
#if defined(OS_WIN)
|
||||
extern const char kLastProfileResetTimestamp[];
|
||||
diff --git a/components/component_updater/adblock_updater_service.cc b/components/component_updater/adblock_updater_service.cc
|
||||
--- a/components/component_updater/adblock_updater_service.cc
|
||||
+++ b/components/component_updater/adblock_updater_service.cc
|
||||
|
||||
@@ -6,14 +6,14 @@ Subject: Add option to not persist tabs across sessions
|
||||
chrome/android/java/res/values/values.xml | 3 +++
|
||||
chrome/android/java/res/xml/privacy_preferences.xml | 5 +++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 4 +++-
|
||||
.../preferences/privacy/PrivacyPreferences.java | 12 ++++++++++++
|
||||
.../android/java/strings/android_chrome_strings.grd | 6 ++++++
|
||||
.../browser/privacy/settings/PrivacySettings.java | 12 ++++++++++++
|
||||
.../ui/android/strings/android_chrome_strings.grd | 6 ++++++
|
||||
5 files changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
|
||||
--- a/chrome/android/java/res/values/values.xml
|
||||
+++ b/chrome/android/java/res/values/values.xml
|
||||
@@ -64,6 +64,9 @@
|
||||
@@ -60,6 +60,9 @@
|
||||
<!-- TODO(peconn): Add help section. -->
|
||||
<!-- <string name="help_context_suggestions">mobile_content_suggestions</string> -->
|
||||
|
||||
@@ -26,22 +26,22 @@ diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res
|
||||
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
|
||||
@@ -38,6 +38,11 @@
|
||||
android:key="contextual_search"
|
||||
android:title="@string/contextual_search_title"
|
||||
android:fragment="org.chromium.chrome.browser.preferences.privacy.ContextualSearchPreferenceFragment" />
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
|
||||
@@ -25,6 +25,11 @@
|
||||
android:title="@string/always_incognito_title"
|
||||
android:summary="@string/always_incognito_summary"
|
||||
android:defaultValue="false" />
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
+ android:key="close_tabs_on_exit"
|
||||
+ android:title="@string/close_tabs_on_exit_title"
|
||||
+ android:summary="@string/close_tabs_on_exit_summary"
|
||||
+ android:defaultValue="false" />
|
||||
<Preference
|
||||
android:key="clear_browsing_data"
|
||||
android:title="@string/clear_browsing_data_title"
|
||||
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
|
||||
android:key="do_not_track"
|
||||
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
|
||||
@@ -1173,8 +1173,10 @@ public class ChromeTabbedActivity extends ChromeActivity implements ScreenshotMo
|
||||
@@ -1182,8 +1182,10 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
|
||||
boolean hadCipherData =
|
||||
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
|
||||
|
||||
@@ -53,37 +53,37 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
|
||||
if (noRestoreState) {
|
||||
// Clear the state files because they are inconsistent and useless from now on.
|
||||
mTabModelSelectorImpl.clearState();
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java
|
||||
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
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
package org.chromium.chrome.browser.preferences.privacy;
|
||||
package org.chromium.chrome.browser.privacy.settings;
|
||||
|
||||
+import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.support.graphics.drawable.VectorDrawableCompat;
|
||||
import android.support.v7.preference.CheckBoxPreference;
|
||||
@@ -14,6 +15,7 @@ import android.view.Menu;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
@@ -14,6 +15,7 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
|
||||
|
||||
+import org.chromium.base.ContextUtils;
|
||||
import org.chromium.base.BuildInfo;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.ChromeFeatureList;
|
||||
@@ -38,6 +40,7 @@ public class PrivacyPreferences
|
||||
private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
|
||||
private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
|
||||
private static final String PREF_NETWORK_PREDICTIONS = "preload_pages";
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
@@ -41,6 +43,7 @@ import java.util.List;
|
||||
*/
|
||||
public class PrivacySettings
|
||||
extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener {
|
||||
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
|
||||
private static final String PREF_DO_NOT_TRACK = "do_not_track";
|
||||
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
|
||||
|
||||
@@ -112,6 +115,10 @@ public class PrivacyPreferences
|
||||
} else if (PREF_CAN_MAKE_PAYMENT.equals(key)) {
|
||||
PrefServiceBridge.getInstance().setBoolean(
|
||||
Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
|
||||
private static final String PREF_SEARCH_SUGGESTIONS = "search_suggestions";
|
||||
private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
|
||||
private static final String PREF_NETWORK_PREDICTIONS = "preload_pages";
|
||||
@@ -98,6 +101,10 @@ public class PrivacySettings
|
||||
sharedPreferencesEditor.apply();
|
||||
} else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
|
||||
PrefServiceBridge.getInstance().setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
|
||||
+ } else if (PREF_CLOSE_TABS_ON_EXIT.equals(key)) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_CLOSE_TABS_ON_EXIT, (boolean)newValue);
|
||||
@@ -91,9 +91,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -162,6 +169,11 @@ public class PrivacyPreferences
|
||||
boolean isContextualSearchEnabled = !prefServiceBridge.isContextualSearchDisabled();
|
||||
contextualPref.setSummary(isContextualSearchEnabled ? textOn : textOff);
|
||||
@@ -167,6 +174,11 @@ public class PrivacySettings
|
||||
String.format("%s - %s", getString(R.string.text_on), serverName));
|
||||
}
|
||||
}
|
||||
+
|
||||
+ ChromeBaseCheckBoxPreference closeTabsOnExitPref =
|
||||
@@ -102,11 +102,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pri
|
||||
+ closeTabsOnExitPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
|
||||
}
|
||||
|
||||
private ManagedPreferenceDelegate createManagedPreferenceDelegate() {
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -3699,6 +3699,12 @@ The site does NOT gain access to the camera. The camera images are only visible
|
||||
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
|
||||
@@ -3334,6 +3334,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>
|
||||
|
||||
@@ -1,205 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 18 Mar 2019 21:47:12 +0100
|
||||
Subject: Add option to use home page as NTP
|
||||
|
||||
Use about:blank as default homepage
|
||||
---
|
||||
.../java/res/xml/homepage_preferences.xml | 5 ++++
|
||||
.../HomepageManager.java | 24 +++++++++++++++++--
|
||||
.../preferences/HomepagePreferences.java | 10 ++++++++
|
||||
.../browser/tabmodel/TabCreatorManager.java | 11 +++++++--
|
||||
.../java/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 +
|
||||
8 files changed, 56 insertions(+), 4 deletions(-)
|
||||
|
||||
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
|
||||
@@ -6,6 +6,11 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
+ <org.chromium.chrome.browser.preferences.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.preferences.ChromeSwitchPreference
|
||||
android:key="homepage_switch"
|
||||
android:summaryOn="@string/text_on"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
@@ -31,6 +31,7 @@ public class HomepageManager {
|
||||
}
|
||||
|
||||
private static final String PREF_HOMEPAGE_ENABLED = "homepage";
|
||||
+ public static final String PREF_NTP_IS_HOMEPAGE = "newtabpage_is_homepage";
|
||||
private static final String PREF_HOMEPAGE_CUSTOM_URI = "homepage_custom_uri";
|
||||
private static final String PREF_HOMEPAGE_USE_DEFAULT_URI = "homepage_partner_enabled";
|
||||
|
||||
@@ -90,7 +91,8 @@ public class HomepageManager {
|
||||
*/
|
||||
public static boolean shouldCloseAppWithZeroTabs() {
|
||||
return HomepageManager.isHomepageEnabled()
|
||||
- && !NewTabPage.isNTPUrl(HomepageManager.getHomepageUri());
|
||||
+ && !NewTabPage.isNTPUrl(HomepageManager.getHomepageUri())
|
||||
+ && (HomepageManager.getHomepageUri() != UrlConstants.CHROME_BLANK_URL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -111,7 +113,7 @@ public class HomepageManager {
|
||||
* if the homepage button is force enabled via flag.
|
||||
*/
|
||||
public static String getDefaultHomepageUri() {
|
||||
- return UrlConstants.NTP_NON_NATIVE_URL;
|
||||
+ return UrlConstants.CHROME_BLANK_URL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,6 +126,14 @@ public class HomepageManager {
|
||||
return mSharedPreferences.getBoolean(PREF_HOMEPAGE_ENABLED, true);
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Returns the user preference for whether the New Tab Page is the homepage or not.
|
||||
+ *
|
||||
+ */
|
||||
+ public boolean getPrefNTPIsHomepageEnabled() {
|
||||
+ return mSharedPreferences.getBoolean(PREF_NTP_IS_HOMEPAGE, false);
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Sets the user preference for whether the homepage is enabled.
|
||||
*/
|
||||
@@ -137,6 +147,16 @@ public class HomepageManager {
|
||||
notifyHomepageUpdated();
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Sets the user preference for whether the new tab page is the homepage or not.
|
||||
+ */
|
||||
+ public void setPrefNTPIsHomepageEnabled(boolean enabled) {
|
||||
+ SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit();
|
||||
+ sharedPreferencesEditor.putBoolean(PREF_NTP_IS_HOMEPAGE, enabled);
|
||||
+ sharedPreferencesEditor.apply();
|
||||
+ notifyHomepageUpdated();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* @return User specified homepage custom URI string.
|
||||
*/
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java
|
||||
@@ -19,6 +19,7 @@ public class HomepagePreferences extends PreferenceFragmentCompat {
|
||||
@VisibleForTesting
|
||||
public static final String PREF_HOMEPAGE_SWITCH = "homepage_switch";
|
||||
private static final String PREF_HOMEPAGE_EDIT = "homepage_edit";
|
||||
+ private static final String PREF_NTP_HOMEPAGE_SWITCH = "ntp_is_homepage_switch";
|
||||
|
||||
private HomepageManager mHomepageManager;
|
||||
private Preference mHomepageEdit;
|
||||
@@ -39,6 +40,15 @@ public class HomepagePreferences extends PreferenceFragmentCompat {
|
||||
return true;
|
||||
});
|
||||
|
||||
+ 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;
|
||||
+ });
|
||||
+
|
||||
mHomepageEdit = findPreference(PREF_HOMEPAGE_EDIT);
|
||||
updateCurrentHomepageUrl();
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java
|
||||
@@ -12,6 +12,7 @@ import org.chromium.chrome.browser.tab.TabState;
|
||||
import org.chromium.chrome.browser.util.UrlConstants;
|
||||
import org.chromium.content_public.browser.LoadUrlParams;
|
||||
import org.chromium.content_public.browser.WebContents;
|
||||
+import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
|
||||
|
||||
/**
|
||||
* An interface to return a {@link TabCreator} either for regular or incognito tabs.
|
||||
@@ -85,12 +86,18 @@ public interface TabCreatorManager {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Creates a new tab and loads the NTP.
|
||||
+ * Creates a new tab and loads the NTP or the homepage, depending on user preferences.
|
||||
*/
|
||||
public final void launchNTP() {
|
||||
try {
|
||||
+ String newTabURL;
|
||||
+ if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) {
|
||||
+ newTabURL = HomepageManager.getHomepageUri();
|
||||
+ } else {
|
||||
+ newTabURL = UrlConstants.NTP_URL;
|
||||
+ }
|
||||
TraceEvent.begin("TabCreator.launchNTP");
|
||||
- launchUrl(UrlConstants.NTP_URL, TabLaunchType.FROM_CHROME_UI);
|
||||
+ launchUrl(newTabURL, TabLaunchType.FROM_CHROME_UI);
|
||||
} finally {
|
||||
TraceEvent.end("TabCreator.launchNTP");
|
||||
}
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -668,6 +668,9 @@ CHAR-LIMIT guidelines:
|
||||
<message name="IDS_NOTIFICATIONS_CONTENT_SUGGESTIONS_SUMMARY_DISABLED" desc="Summary for the disabled preference to turn on/off content suggestions notifications when search and site suggestions are disabled.">
|
||||
Search and site suggestions disabled
|
||||
</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>
|
||||
|
||||
<!-- always incognito -->
|
||||
<message name="IDS_ALWAYS_INCOGNITO_TITLE" desc="Title for always incognito mode">
|
||||
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
|
||||
@@ -55,6 +55,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
|
||||
@@ -59,6 +59,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
|
||||
@@ -322,6 +322,7 @@ extern const char kSettingsShowOSBanner[];
|
||||
extern const char kDeviceLoginScreenWebUsbAllowDevicesForUrls[];
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
extern const char kShowHomeButton[];
|
||||
+extern const char kNewTabPageIsHomePage[];
|
||||
extern const char kSpeechRecognitionFilterProfanities[];
|
||||
extern const char kAllowDeletingBrowserHistory[];
|
||||
#if !defined(OS_ANDROID)
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,216 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Tue, 28 Aug 2018 23:27:23 +0200
|
||||
Subject: Add site settings option for session-only cookies
|
||||
|
||||
---
|
||||
chrome/android/java/res/values/values.xml | 3 +++
|
||||
.../java/res/xml/website_preferences.xml | 7 ++++++
|
||||
.../preferences/PrefServiceBridge.java | 10 ++++++++
|
||||
.../website/SingleCategoryPreferences.java | 21 +++++++++++++++-
|
||||
.../java/strings/android_chrome_strings.grd | 6 +++++
|
||||
.../preferences/pref_service_bridge.cc | 25 +++++++++++++++++++
|
||||
6 files changed, 71 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
|
||||
--- a/chrome/android/java/res/values/values.xml
|
||||
+++ b/chrome/android/java/res/values/values.xml
|
||||
@@ -32,6 +32,9 @@
|
||||
<integer name="reload_button_level_reload">0</integer>
|
||||
<integer name="reload_button_level_stop">1</integer>
|
||||
|
||||
+ <string name="allow_cookies_session_only_title">Keep cookies only until you quit your browser</string>
|
||||
+ <string name="allow_cookies_session_only_summary">When enabled, all cookies will be erased when the browsing session is over</string>
|
||||
+
|
||||
<!-- Help and Feedback
|
||||
These constants should be in sync with the context names on go/mobilehelprecs.
|
||||
If the context ID cannot be found, the default help page will be shown to the user.-->
|
||||
diff --git a/chrome/android/java/res/xml/website_preferences.xml b/chrome/android/java/res/xml/website_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/website_preferences.xml
|
||||
+++ b/chrome/android/java/res/xml/website_preferences.xml
|
||||
@@ -26,6 +26,13 @@
|
||||
android:summary="@string/block_third_party_cookies_summary"
|
||||
android:defaultValue="true"
|
||||
android:persistent="false" />
|
||||
+ <!-- A toggle for cookies to be saved only until session exit, only shown for the Cookies category. -->
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
|
||||
+ android:key="cookies_session_only"
|
||||
+ android:title="@string/allow_cookies_session_only_title"
|
||||
+ android:summary="@string/allow_cookies_session_only_summary"
|
||||
+ android:defaultValue="true"
|
||||
+ android:persistent="false" />
|
||||
<!-- A toggle for enabling vibration in notifications. -->
|
||||
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
|
||||
android:key="notifications_vibrate"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
|
||||
@@ -265,6 +265,10 @@ public class PrefServiceBridge {
|
||||
return PrefServiceBridgeJni.get().getBlockThirdPartyCookiesEnabled(PrefServiceBridge.this);
|
||||
}
|
||||
|
||||
+ public boolean isCookiesSessionOnlyEnabled() {
|
||||
+ return PrefServiceBridgeJni.get().getCookiesSessionOnlyEnabled(PrefServiceBridge.this);
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* @return Whether third-party cookie blocking is configured by policy
|
||||
*/
|
||||
@@ -668,6 +672,10 @@ public class PrefServiceBridge {
|
||||
PrefServiceBridge.this, enabled);
|
||||
}
|
||||
|
||||
+ public void setCookiesSessionOnlyEnabled(boolean enabled) {
|
||||
+ PrefServiceBridgeJni.get().setCookiesSessionOnlyEnabled(PrefServiceBridge.this, enabled);
|
||||
+ }
|
||||
+
|
||||
public void setDoNotTrackEnabled(boolean enabled) {
|
||||
PrefServiceBridgeJni.get().setDoNotTrackEnabled(PrefServiceBridge.this, enabled);
|
||||
}
|
||||
@@ -1138,6 +1146,8 @@ public class PrefServiceBridge {
|
||||
|
||||
@NativeMethods
|
||||
public interface Natives {
|
||||
+ boolean getCookiesSessionOnlyEnabled(PrefServiceBridge caller);
|
||||
+ void setCookiesSessionOnlyEnabled(PrefServiceBridge caller, boolean enabled);
|
||||
boolean isContentSettingEnabled(PrefServiceBridge caller, int contentSettingType);
|
||||
boolean isContentSettingManaged(PrefServiceBridge caller, int contentSettingType);
|
||||
void setContentSettingEnabled(
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SingleCategoryPreferences.java
|
||||
@@ -127,6 +127,7 @@ public class SingleCategoryPreferences extends PreferenceFragmentCompat
|
||||
|
||||
// Keys for category-specific preferences (toggle, link, button etc.), dynamically shown.
|
||||
public static final String THIRD_PARTY_COOKIES_TOGGLE_KEY = "third_party_cookies";
|
||||
+ public static final String COOKIES_SESSION_ONLY_TOGGLE_KEY = "cookies_session_only";
|
||||
public static final String NOTIFICATIONS_VIBRATE_TOGGLE_KEY = "notifications_vibrate";
|
||||
public static final String EXPLAIN_PROTECTED_MEDIA_KEY = "protected_content_learn_more";
|
||||
private static final String ADD_EXCEPTION_KEY = "add_exception";
|
||||
@@ -477,6 +478,7 @@ public class SingleCategoryPreferences extends PreferenceFragmentCompat
|
||||
|
||||
if (type == SiteSettingsCategory.Type.COOKIES) {
|
||||
updateThirdPartyCookiesCheckBox();
|
||||
+ updateCookiesSessionOnlyCheckBox();
|
||||
} else if (type == SiteSettingsCategory.Type.NOTIFICATIONS) {
|
||||
updateNotificationsVibrateCheckBox();
|
||||
}
|
||||
@@ -516,6 +518,8 @@ public class SingleCategoryPreferences extends PreferenceFragmentCompat
|
||||
int setting = (int) newValue;
|
||||
prefServiceBridge.setContentSetting(mCategory.getContentSettingsType(), setting);
|
||||
getInfoForOrigins();
|
||||
+ } else if (COOKIES_SESSION_ONLY_TOGGLE_KEY.equals(preference.getKey())) {
|
||||
+ prefServiceBridge.setCookiesSessionOnlyEnabled((boolean) newValue);
|
||||
} else if (THIRD_PARTY_COOKIES_TOGGLE_KEY.equals(preference.getKey())) {
|
||||
prefServiceBridge.setBlockThirdPartyCookiesEnabled(((boolean) newValue));
|
||||
} else if (NOTIFICATIONS_VIBRATE_TOGGLE_KEY.equals(preference.getKey())) {
|
||||
@@ -833,6 +837,8 @@ public class SingleCategoryPreferences extends PreferenceFragmentCompat
|
||||
TriStateSiteSettingsPreference triStateToggle =
|
||||
(TriStateSiteSettingsPreference) screen.findPreference(TRI_STATE_TOGGLE_KEY);
|
||||
Preference thirdPartyCookies = screen.findPreference(THIRD_PARTY_COOKIES_TOGGLE_KEY);
|
||||
+ Preference cookiesSessionOnly = getPreferenceScreen().findPreference(
|
||||
+ COOKIES_SESSION_ONLY_TOGGLE_KEY);
|
||||
Preference notificationsVibrate = screen.findPreference(NOTIFICATIONS_VIBRATE_TOGGLE_KEY);
|
||||
Preference explainProtectedMediaKey = screen.findPreference(EXPLAIN_PROTECTED_MEDIA_KEY);
|
||||
PreferenceGroup allowedGroup = (PreferenceGroup) screen.findPreference(ALLOWED_GROUP);
|
||||
@@ -864,6 +870,7 @@ public class SingleCategoryPreferences extends PreferenceFragmentCompat
|
||||
|
||||
if (hideSecondaryToggles) {
|
||||
screen.removePreference(thirdPartyCookies);
|
||||
+ screen.removePreference(cookiesSessionOnly);
|
||||
screen.removePreference(notificationsVibrate);
|
||||
screen.removePreference(explainProtectedMediaKey);
|
||||
screen.removePreference(allowedGroup);
|
||||
@@ -874,12 +881,15 @@ public class SingleCategoryPreferences extends PreferenceFragmentCompat
|
||||
return;
|
||||
}
|
||||
|
||||
- // Configure/hide the third-party cookies toggle, as needed.
|
||||
+ // Configure/hide the third-party cookies toggle and session-only cookie toggle, as needed.
|
||||
if (mCategory.showSites(SiteSettingsCategory.Type.COOKIES)) {
|
||||
thirdPartyCookies.setOnPreferenceChangeListener(this);
|
||||
updateThirdPartyCookiesCheckBox();
|
||||
+ cookiesSessionOnly.setOnPreferenceChangeListener(this);
|
||||
+ updateCookiesSessionOnlyCheckBox();
|
||||
} else {
|
||||
screen.removePreference(thirdPartyCookies);
|
||||
+ screen.removePreference(cookiesSessionOnly);
|
||||
}
|
||||
|
||||
// Configure/hide the notifications vibrate toggle, as needed.
|
||||
@@ -994,6 +1004,15 @@ public class SingleCategoryPreferences extends PreferenceFragmentCompat
|
||||
preference -> PrefServiceBridge.getInstance().isBlockThirdPartyCookiesManaged());
|
||||
}
|
||||
|
||||
+ private void updateCookiesSessionOnlyCheckBox() {
|
||||
+ ChromeBaseCheckBoxPreference cookiesSessionOnlyPref = (ChromeBaseCheckBoxPreference)
|
||||
+ getPreferenceScreen().findPreference(COOKIES_SESSION_ONLY_TOGGLE_KEY);
|
||||
+ cookiesSessionOnlyPref.setChecked(
|
||||
+ PrefServiceBridge.getInstance().isCookiesSessionOnlyEnabled());
|
||||
+ cookiesSessionOnlyPref.setEnabled(PrefServiceBridge.getInstance().isCategoryEnabled(
|
||||
+ ContentSettingsType.CONTENT_SETTINGS_TYPE_COOKIES));
|
||||
+ }
|
||||
+
|
||||
private void updateNotificationsVibrateCheckBox() {
|
||||
ChromeBaseCheckBoxPreference preference =
|
||||
(ChromeBaseCheckBoxPreference) getPreferenceScreen().findPreference(
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -878,6 +878,12 @@ Your Google account may have other forms of browsing history like searches and a
|
||||
<message name="IDS_BLOCK_THIRD_PARTY_COOKIES_SUMMARY" desc="Summary text for Block Third Party Cookies preference">
|
||||
Prevent third-party websites from saving and reading cookie data
|
||||
</message>
|
||||
+ <message name="IDS_ALLOW_COOKIES_SESSION_ONLY_TITLE" desc="Title for Allow Cookies Session Only preference">
|
||||
+ Keep cookies only until you quit your browser
|
||||
+ </message>
|
||||
+ <message name="IDS_ALLOW_COOKIES_SESSION_ONLY_SUMMARY" desc="Summary text for Allow Session Only Cookies preference">
|
||||
+ When enabled, all cookies will be erased when the browsing session is over
|
||||
+ </message>
|
||||
<message name="IDS_JAVASCRIPT_PERMISSION_TITLE" desc="Title of the permission to run javascript [CHAR-LIMIT=32]">
|
||||
JavaScript
|
||||
</message>
|
||||
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
|
||||
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
|
||||
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
|
||||
@@ -330,6 +330,17 @@ static jboolean JNI_PrefServiceBridge_GetBlockThirdPartyCookiesEnabled(
|
||||
return GetPrefService()->GetBoolean(prefs::kBlockThirdPartyCookies);
|
||||
}
|
||||
|
||||
+static jboolean JNI_PrefServiceBridge_GetCookiesSessionOnlyEnabled(
|
||||
+ JNIEnv* env,
|
||||
+ const JavaParamRef<jobject>& obj) {
|
||||
+ HostContentSettingsMap* host_content_settings_map =
|
||||
+ HostContentSettingsMapFactory::GetForProfile(GetOriginalProfile());
|
||||
+ auto value = host_content_settings_map->GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_COOKIES, nullptr);
|
||||
+ auto enabled = CONTENT_SETTING_SESSION_ONLY == value;
|
||||
+ LOG(INFO) << "GetCookiesSessionOnly := " << enabled << " (raw_value = " << value << ")";
|
||||
+ return enabled;
|
||||
+}
|
||||
+
|
||||
static jboolean JNI_PrefServiceBridge_GetBlockThirdPartyCookiesManaged(
|
||||
JNIEnv* env,
|
||||
const JavaParamRef<jobject>& obj) {
|
||||
@@ -801,6 +812,20 @@ static void JNI_PrefServiceBridge_SetBlockThirdPartyCookiesEnabled(
|
||||
GetPrefService()->SetBoolean(prefs::kBlockThirdPartyCookies, enabled);
|
||||
}
|
||||
|
||||
+static void JNI_PrefServiceBridge_SetCookiesSessionOnlyEnabled(
|
||||
+ JNIEnv* env,
|
||||
+ const JavaParamRef<jobject>& obj,
|
||||
+ jboolean enabled) {
|
||||
+ HostContentSettingsMap* host_content_settings_map =
|
||||
+ HostContentSettingsMapFactory::GetForProfile(GetOriginalProfile());
|
||||
+ LOG(INFO) << "SetCookiesSessionOnly -> " << (enabled ? "true" : "false") <<
|
||||
+ "; false -> setting_allow: " << CONTENT_SETTING_ALLOW <<
|
||||
+ "; true -> session_only: " << CONTENT_SETTING_SESSION_ONLY;
|
||||
+ host_content_settings_map->SetDefaultContentSetting(
|
||||
+ CONTENT_SETTINGS_TYPE_COOKIES,
|
||||
+ enabled ? CONTENT_SETTING_SESSION_ONLY : CONTENT_SETTING_ALLOW);
|
||||
+}
|
||||
+
|
||||
static void JNI_PrefServiceBridge_SetRememberPasswordsEnabled(
|
||||
JNIEnv* env,
|
||||
const JavaParamRef<jobject>& obj,
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -3,43 +3,62 @@ Date: Sat, 23 Nov 2019 10:55:16 +0100
|
||||
Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
|
||||
|
||||
---
|
||||
chrome/android/chrome_java_resources.gni | 2 +
|
||||
chrome/android/chrome_java_sources.gni | 2 +
|
||||
chrome/android/java/res/layout/doh_editor.xml | 65 +++++++++++++
|
||||
chrome/android/java/res/layout/doh_editor.xml | 67 ++++++++++++++
|
||||
chrome/android/java/res/values/values.xml | 2 +
|
||||
.../android/java/res/xml/doh_preferences.xml | 25 +++++
|
||||
.../java/res/xml/privacy_preferences.xml | 5 +
|
||||
.../chrome/browser/preferences/DoHEditor.java | 91 +++++++++++++++++++
|
||||
.../browser/preferences/DoHPreferences.java | 52 +++++++++++
|
||||
.../chrome/browser/util/FeatureUtilities.java | 24 +++++
|
||||
.../java/strings/android_chrome_strings.grd | 11 +++
|
||||
.../chrome/browser/settings/DoHEditor.java | 92 +++++++++++++++++++
|
||||
.../browser/settings/DoHPreferences.java | 54 +++++++++++
|
||||
chrome/app/generated_resources.grd | 6 ++
|
||||
chrome/browser/android/feature_utilities.cc | 23 +++++
|
||||
.../net/system_network_context_manager.cc | 46 +++-------
|
||||
.../flags/android/cached_feature_flags.cc | 25 +++++
|
||||
.../browser/flags/CachedFeatureFlags.java | 24 +++++
|
||||
.../net/stub_resolver_config_reader.cc | 36 ++------
|
||||
.../strings/android_chrome_strings.grd | 11 +++
|
||||
chrome/common/chrome_features.cc | 4 +-
|
||||
13 files changed, 319 insertions(+), 37 deletions(-)
|
||||
14 files changed, 324 insertions(+), 31 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/layout/doh_editor.xml
|
||||
create mode 100644 chrome/android/java/res/xml/doh_preferences.xml
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHEditor.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/DoHPreferences.java
|
||||
|
||||
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
|
||||
@@ -881,6 +881,7 @@ chrome_java_resources = [
|
||||
"java/res/layout/date_view.xml",
|
||||
"java/res/layout/default_search_engine_first_run_fragment.xml",
|
||||
"java/res/layout/device_item_list.xml",
|
||||
+ "java/res/layout/doh_editor.xml",
|
||||
"java/res/layout/distilled_page_font_family_spinner.xml",
|
||||
"java/res/layout/distilled_page_prefs_view.xml",
|
||||
"java/res/layout/editable_option_editor_footer.xml",
|
||||
@@ -1112,6 +1113,7 @@ chrome_java_resources = [
|
||||
"java/res/xml/data_reduction_preferences.xml",
|
||||
"java/res/xml/data_reduction_preferences_off_lite_mode.xml",
|
||||
"java/res/xml/developer_preferences.xml",
|
||||
+ "java/res/xml/doh_preferences.xml",
|
||||
"java/res/xml/do_not_track_preferences.xml",
|
||||
"java/res/xml/google_services_preferences.xml",
|
||||
"java/res/xml/homepage_preferences.xml",
|
||||
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
|
||||
@@ -1263,7 +1263,9 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/preferences/ClearBrowsingDataCheckBoxPreference.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/ExpandablePreferenceGroup.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/HomepageEditor.java",
|
||||
+ "java/src/org/chromium/chrome/browser/preferences/DoHEditor.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/HomepagePreferences.java",
|
||||
+ "java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/HyperlinkPreference.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/LearnMorePreference.java",
|
||||
"java/src/org/chromium/chrome/browser/preferences/LegalInformationPreferences.java",
|
||||
@@ -1373,6 +1373,8 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/searchwidget/SearchWidgetProvider.java",
|
||||
"java/src/org/chromium/chrome/browser/send_tab_to_self/DevicePickerBottomSheetAdapter.java",
|
||||
"java/src/org/chromium/chrome/browser/send_tab_to_self/DevicePickerBottomSheetContent.java",
|
||||
+ "java/src/org/chromium/chrome/browser/settings/DoHEditor.java",
|
||||
+ "java/src/org/chromium/chrome/browser/settings/DoHPreferences.java",
|
||||
"java/src/org/chromium/chrome/browser/send_tab_to_self/NotificationManager.java",
|
||||
"java/src/org/chromium/chrome/browser/send_tab_to_self/NotificationSharedPrefManager.java",
|
||||
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfAndroidBridge.java",
|
||||
diff --git a/chrome/android/java/res/layout/doh_editor.xml b/chrome/android/java/res/layout/doh_editor.xml
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/res/layout/doh_editor.xml
|
||||
@@ -0,0 +1,65 @@
|
||||
@@ -0,0 +1,67 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!-- Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+ Use of this source code is governed by a BSD-style license that can be
|
||||
@@ -64,9 +83,11 @@ new file mode 100644
|
||||
+ android:orientation="vertical"
|
||||
+ android:focusableInTouchMode="true" >
|
||||
+
|
||||
+ <org.chromium.chrome.browser.widget.ChromeTextInputLayout
|
||||
+ <com.google.android.material.textfield.TextInputLayout
|
||||
+ android:id="@+id/doh_url"
|
||||
+ style="@style/PreferenceScreenLayout"
|
||||
+ android:paddingTop="16dp"
|
||||
+ android:paddingStart="@dimen/pref_autofill_content_spacing"
|
||||
+ android:paddingEnd="@dimen/pref_autofill_content_spacing"
|
||||
+ android:layout_width="match_parent"
|
||||
+ android:layout_height="wrap_content" >
|
||||
+ <!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
|
||||
@@ -78,7 +99,7 @@ new file mode 100644
|
||||
+ android:inputType="textUri"
|
||||
+ android:singleLine="true"
|
||||
+ android:hint="@string/options_doh_edit_label" />
|
||||
+ </org.chromium.chrome.browser.widget.ChromeTextInputLayout>
|
||||
+ </com.google.android.material.textfield.TextInputLayout>
|
||||
+
|
||||
+ <Space style="@style/ButtonBarTopSpacer" />
|
||||
+ <View style="@style/ButtonBarTopDivider" />
|
||||
@@ -102,13 +123,13 @@ new file mode 100644
|
||||
+ </LinearLayout>
|
||||
+ </ScrollView>
|
||||
+
|
||||
+ <include layout="@layout/preferences_action_bar_shadow"/>
|
||||
+ <include layout="@layout/settings_action_bar_shadow"/>
|
||||
+
|
||||
+</FrameLayout>
|
||||
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
|
||||
--- a/chrome/android/java/res/values/values.xml
|
||||
+++ b/chrome/android/java/res/values/values.xml
|
||||
@@ -92,6 +92,8 @@
|
||||
@@ -80,6 +80,8 @@
|
||||
<integer name="download_infobar_bar_fill_in_delay">400</integer>
|
||||
<integer name="download_infobar_bar_fill_out_delay">200</integer>
|
||||
|
||||
@@ -131,12 +152,12 @@ new file mode 100644
|
||||
+ xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+ xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
+
|
||||
+ <org.chromium.chrome.browser.preferences.ChromeSwitchPreference
|
||||
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
|
||||
+ android:key="doh_switch"
|
||||
+ android:summaryOn="@string/text_on"
|
||||
+ android:summaryOff="@string/text_off" />
|
||||
+
|
||||
+ <org.chromium.chrome.browser.preferences.HyperlinkPreference
|
||||
+ <org.chromium.chrome.browser.about_settings.HyperlinkPreference
|
||||
+ android:key="doh_help"
|
||||
+ android:title="@string/doh_help"
|
||||
+ app:url="@string/doh_help_url" />
|
||||
@@ -144,7 +165,7 @@ new file mode 100644
|
||||
+ <Preference
|
||||
+ android:key="doh_edit"
|
||||
+ android:title="@string/options_doh_edit_label"
|
||||
+ android:fragment="org.chromium.chrome.browser.preferences.DoHEditor" />
|
||||
+ android:fragment="org.chromium.chrome.browser.settings.DoHEditor" />
|
||||
+
|
||||
+</PreferenceScreen>
|
||||
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
||||
@@ -155,26 +176,26 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
|
||||
android:title="@string/can_make_payment_title"
|
||||
android:summary="@string/settings_can_make_payment_toggle_label" />
|
||||
+ <Preference
|
||||
+ android:fragment="org.chromium.chrome.browser.preferences.DoHPreferences"
|
||||
+ android:fragment="org.chromium.chrome.browser.settings.DoHPreferences"
|
||||
+ android:key="doh"
|
||||
+ android:title="@string/options_doh_title"
|
||||
+ android:summary="@string/options_doh_summary" />
|
||||
<org.chromium.chrome.browser.preferences.ChromeBaseCheckBoxPreference
|
||||
<org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
|
||||
android:key="preload_pages"
|
||||
android:title="@string/preload_pages_title"
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHEditor.java
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHEditor.java
|
||||
@@ -0,0 +1,91 @@
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java
|
||||
@@ -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.
|
||||
+
|
||||
+package org.chromium.chrome.browser.preferences;
|
||||
+package org.chromium.chrome.browser.settings;
|
||||
+
|
||||
+import android.os.Bundle;
|
||||
+import android.support.v4.app.Fragment;
|
||||
+import androidx.fragment.app.Fragment;
|
||||
+import android.text.Editable;
|
||||
+import android.text.TextWatcher;
|
||||
+import android.view.LayoutInflater;
|
||||
@@ -183,7 +204,8 @@ new file mode 100644
|
||||
+import android.widget.Button;
|
||||
+import android.widget.EditText;
|
||||
+
|
||||
+import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
+import org.chromium.components.browser_ui.settings.SettingsUtils;
|
||||
+import org.chromium.chrome.browser.flags.CachedFeatureFlags;
|
||||
+import org.chromium.chrome.R;
|
||||
+import org.chromium.components.url_formatter.UrlFormatter;
|
||||
+
|
||||
@@ -204,9 +226,9 @@ new file mode 100644
|
||||
+ View v = inflater.inflate(R.layout.doh_editor, container, false);
|
||||
+ View scrollView = v.findViewById(R.id.scroll_view);
|
||||
+ scrollView.getViewTreeObserver().addOnScrollChangedListener(
|
||||
+ PreferenceUtils.getShowShadowOnScrollListener(v, v.findViewById(R.id.shadow)));
|
||||
+ SettingsUtils.getShowShadowOnScrollListener(v, v.findViewById(R.id.shadow)));
|
||||
+ mDoHUrlEdit = (EditText) v.findViewById(R.id.doh_url_edit);
|
||||
+ mDoHUrlEdit.setText(FeatureUtilities.getDoHTemplates());
|
||||
+ mDoHUrlEdit.setText(CachedFeatureFlags.getDoHTemplates());
|
||||
+ mDoHUrlEdit.addTextChangedListener(this);
|
||||
+ mDoHUrlEdit.requestFocus();
|
||||
+
|
||||
@@ -233,7 +255,7 @@ new file mode 100644
|
||||
+ mResetButton.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ mDoHUrlEdit.setText(FeatureUtilities.getDoHTemplates());
|
||||
+ mDoHUrlEdit.setText(CachedFeatureFlags.getDoHTemplates());
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
+ });
|
||||
@@ -243,7 +265,7 @@ new file mode 100644
|
||||
+ mSaveButton.setOnClickListener(new View.OnClickListener() {
|
||||
+ @Override
|
||||
+ public void onClick(View v) {
|
||||
+ FeatureUtilities.setDoHTemplates(
|
||||
+ CachedFeatureFlags.setDoHTemplates(
|
||||
+ mDoHUrlEdit.getText().toString());
|
||||
+ getActivity().finish();
|
||||
+ }
|
||||
@@ -258,23 +280,25 @@ new file mode 100644
|
||||
+ });
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/DoHPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/DoHPreferences.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/DoHPreferences.java
|
||||
@@ -0,0 +1,52 @@
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/DoHPreferences.java
|
||||
@@ -0,0 +1,54 @@
|
||||
+// 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.preferences;
|
||||
+package org.chromium.chrome.browser.settings;
|
||||
+
|
||||
+import android.os.Bundle;
|
||||
+import android.support.v7.preference.Preference;
|
||||
+import android.support.v7.preference.PreferenceFragmentCompat;
|
||||
+import androidx.preference.Preference;
|
||||
+import androidx.preference.PreferenceFragmentCompat;
|
||||
+import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
|
||||
+
|
||||
+import org.chromium.chrome.browser.util.FeatureUtilities;
|
||||
+import org.chromium.base.VisibleForTesting;
|
||||
+import org.chromium.components.browser_ui.settings.SettingsUtils;
|
||||
+import org.chromium.chrome.browser.flags.CachedFeatureFlags;
|
||||
+import androidx.annotation.VisibleForTesting;
|
||||
+import org.chromium.chrome.R;
|
||||
+
|
||||
+/**
|
||||
@@ -290,14 +314,14 @@ new file mode 100644
|
||||
+ @Override
|
||||
+ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
+ getActivity().setTitle(R.string.options_doh_title);
|
||||
+ PreferenceUtils.addPreferencesFromResource(this, R.xml.doh_preferences);
|
||||
+ SettingsUtils.addPreferencesFromResource(this, R.xml.doh_preferences);
|
||||
+
|
||||
+ ChromeSwitchPreference mDoHSwitch =
|
||||
+ (ChromeSwitchPreference) findPreference(PREF_DOH_SWITCH);
|
||||
+ boolean isDoHEnabled = FeatureUtilities.getDoHEnabled();
|
||||
+ boolean isDoHEnabled = CachedFeatureFlags.getDoHEnabled();
|
||||
+ mDoHSwitch.setChecked(isDoHEnabled);
|
||||
+ mDoHSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||
+ FeatureUtilities.setDoHEnabled((boolean) newValue);
|
||||
+ CachedFeatureFlags.setDoHEnabled((boolean) newValue);
|
||||
+ return true;
|
||||
+ });
|
||||
+
|
||||
@@ -306,7 +330,7 @@ new file mode 100644
|
||||
+ }
|
||||
+
|
||||
+ private void updateCurrentDoHUrl() {
|
||||
+ mDoHEdit.setSummary(FeatureUtilities.getDoHTemplates());
|
||||
+ mDoHEdit.setSummary(CachedFeatureFlags.getDoHTemplates());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@@ -315,40 +339,95 @@ new file mode 100644
|
||||
+ updateCurrentDoHUrl();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
@@ -223,6 +223,26 @@ public class FeatureUtilities {
|
||||
FeatureUtilitiesJni.get().setCustomTabVisible(visible);
|
||||
}
|
||||
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
|
||||
@@ -6977,6 +6977,12 @@ the Bookmarks menu.">
|
||||
</if>
|
||||
|
||||
<if expr="is_android">
|
||||
+ <message name="IDS_OPTIONS_DOH_TITLE" desc="The title of the DNS-over-HTTPS option on Android" formatter_data="android_java">
|
||||
+ Secure DNS
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_DOH_SUMMARY" desc="The title of the DNS-over-HTTPS summary on Android" formatter_data="android_java">
|
||||
+ Configure DNS-over-HTTPS (DoH) secure DNS
|
||||
+ </message>
|
||||
<message name="IDS_OPTIONS_HOMEPAGE_TITLE" desc="The title of Chrome's homepage setting screen on Android. " formatter_data="android_java">
|
||||
Homepage
|
||||
</message>
|
||||
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
|
||||
@@ -11,6 +11,10 @@
|
||||
#include "content/public/common/content_features.h"
|
||||
#include "content/public/common/network_service_util.h"
|
||||
|
||||
+#include "chrome/browser/browser_process.h"
|
||||
+#include "components/prefs/pref_service.h"
|
||||
+#include "chrome/common/pref_names.h"
|
||||
+
|
||||
using base::android::ConvertJavaStringToUTF8;
|
||||
using base::android::ConvertUTF8ToJavaString;
|
||||
using base::android::JavaParamRef;
|
||||
@@ -49,3 +53,24 @@ static jboolean JNI_CachedFeatureFlags_IsNetworkServiceWarmUpEnabled(
|
||||
return content::IsOutOfProcessNetworkService() &&
|
||||
base::FeatureList::IsEnabled(features::kWarmUpNetworkProcess);
|
||||
}
|
||||
+
|
||||
+static jboolean JNI_CachedFeatureFlags_GetDoHEnabled(JNIEnv* env) {
|
||||
+ std::string doh_mode = g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsMode);
|
||||
+ return ((doh_mode == "secure") || (doh_mode == "auto"))
|
||||
+ && !g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsTemplates).empty();
|
||||
+}
|
||||
+
|
||||
+static void JNI_CachedFeatureFlags_SetDoHEnabled(JNIEnv* env, jboolean enabled) {
|
||||
+ if (enabled)
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsMode, "secure");
|
||||
+ else
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsMode, "off");
|
||||
+}
|
||||
+
|
||||
+static ScopedJavaLocalRef<jstring> JNI_CachedFeatureFlags_GetDoHTemplates(JNIEnv* env) {
|
||||
+ return base::android::ConvertUTF8ToJavaString(env, g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsTemplates));
|
||||
+}
|
||||
+
|
||||
+static void JNI_CachedFeatureFlags_SetDoHTemplates(JNIEnv* env, const JavaParamRef<jstring>& templates) {
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsTemplates, base::android::ConvertJavaStringToUTF8(env, templates));
|
||||
+}
|
||||
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
|
||||
@@ -128,6 +128,26 @@ public class CachedFeatureFlags {
|
||||
private static Map<String, String> sOverridesTestFeatures;
|
||||
private static String sReachedCodeProfilerTrialGroup;
|
||||
|
||||
+ /**
|
||||
+ * Records whether custom URL for DoH is enabled with native-side feature utilities.
|
||||
+ * @param url Whether custom URL is enabled or not.
|
||||
+ */
|
||||
+ public static void setDoHEnabled(boolean enabled) {
|
||||
+ FeatureUtilitiesJni.get().setDoHEnabled(enabled);
|
||||
+ CachedFeatureFlagsJni.get().setDoHEnabled(enabled);
|
||||
+ }
|
||||
+
|
||||
+ public static boolean getDoHEnabled() {
|
||||
+ return FeatureUtilitiesJni.get().getDoHEnabled();
|
||||
+ return CachedFeatureFlagsJni.get().getDoHEnabled();
|
||||
+ }
|
||||
+
|
||||
+ public static void setDoHTemplates(String t) {
|
||||
+ FeatureUtilitiesJni.get().setDoHTemplates(t);
|
||||
+ CachedFeatureFlagsJni.get().setDoHTemplates(t);
|
||||
+ }
|
||||
+
|
||||
+ public static String getDoHTemplates() {
|
||||
+ return FeatureUtilitiesJni.get().getDoHTemplates();
|
||||
+ return CachedFeatureFlagsJni.get().getDoHTemplates();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Records whether the activity is in multi-window mode with native-side feature utilities.
|
||||
* @param isInMultiWindowMode Whether the activity is in Android N multi-window mode.
|
||||
@@ -852,6 +872,10 @@ public class FeatureUtilities {
|
||||
* Checks if a cached feature flag is enabled.
|
||||
*
|
||||
@@ -412,6 +432,10 @@ public class CachedFeatureFlags {
|
||||
|
||||
@NativeMethods
|
||||
interface Natives {
|
||||
void setCustomTabVisible(boolean visible);
|
||||
void setIsInMultiWindowMode(boolean isInMultiWindowMode);
|
||||
+ void setDoHEnabled(boolean enabled);
|
||||
+ boolean getDoHEnabled();
|
||||
+ void setDoHTemplates(String templates);
|
||||
@@ -356,10 +435,71 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUti
|
||||
boolean isNetworkServiceWarmUpEnabled();
|
||||
void setAdBlockFiltersURL(String url);
|
||||
String getAdBlockFiltersURL();
|
||||
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
--- a/chrome/android/java/strings/android_chrome_strings.grd
|
||||
+++ b/chrome/android/java/strings/android_chrome_strings.grd
|
||||
@@ -644,6 +644,17 @@ CHAR-LIMIT guidelines:
|
||||
diff --git a/chrome/browser/net/stub_resolver_config_reader.cc b/chrome/browser/net/stub_resolver_config_reader.cc
|
||||
--- a/chrome/browser/net/stub_resolver_config_reader.cc
|
||||
+++ b/chrome/browser/net/stub_resolver_config_reader.cc
|
||||
@@ -141,28 +141,6 @@ StubResolverConfigReader::StubResolverConfigReader(PrefService* local_state,
|
||||
base::Value(SecureDnsConfig::ModeToString(default_secure_dns_mode)));
|
||||
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
|
||||
base::Value(default_doh_templates));
|
||||
-
|
||||
- // If the user has explicitly enabled or disabled the DoH experiment in
|
||||
- // chrome://flags and the DoH UI setting is not visible, store that choice
|
||||
- // in the user prefs so that it can be persisted after the experiment ends.
|
||||
- // Also make sure to remove the stored prefs value if the user has changed
|
||||
- // their chrome://flags selection to the default.
|
||||
- if (!features::kDnsOverHttpsShowUiParam.Get()) {
|
||||
- flags_ui::PrefServiceFlagsStorage flags_storage(local_state_);
|
||||
- std::set<std::string> entries = flags_storage.GetFlags();
|
||||
- if (entries.count("dns-over-https@1")) {
|
||||
- // The user has "Enabled" selected.
|
||||
- local_state_->SetString(prefs::kDnsOverHttpsMode,
|
||||
- SecureDnsConfig::kModeAutomatic);
|
||||
- } else if (entries.count("dns-over-https@2")) {
|
||||
- // The user has "Disabled" selected.
|
||||
- local_state_->SetString(prefs::kDnsOverHttpsMode,
|
||||
- SecureDnsConfig::kModeOff);
|
||||
- } else {
|
||||
- // The user has "Default" selected.
|
||||
- local_state_->ClearPref(prefs::kDnsOverHttpsMode);
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
pref_change_registrar_.Add(prefs::kBuiltInDnsClientEnabled, pref_callback);
|
||||
@@ -346,21 +324,21 @@ SecureDnsConfig StubResolverConfigReader::GetAndUpdateConfiguration(
|
||||
parental_controls_checked_ = true;
|
||||
}
|
||||
|
||||
- if (record_metrics) {
|
||||
- UMA_HISTOGRAM_ENUMERATION("Net.DNS.DnsConfig.SecureDnsMode", mode_details);
|
||||
- }
|
||||
-
|
||||
std::string doh_templates =
|
||||
local_state_->GetString(prefs::kDnsOverHttpsTemplates);
|
||||
- std::string server_method;
|
||||
+ if (doh_templates.empty()) {
|
||||
+ secure_dns_mode = net::DnsConfig::SecureDnsMode::OFF;
|
||||
+ }
|
||||
+ LOG(INFO) << "DoH templates: '" << doh_templates << "' with mode " << SecureDnsConfig::ModeToString(secure_dns_mode);
|
||||
std::vector<net::DnsOverHttpsServerConfig> dns_over_https_servers;
|
||||
base::Optional<std::vector<network::mojom::DnsOverHttpsServerPtr>>
|
||||
servers_mojo;
|
||||
- if (!doh_templates.empty() &&
|
||||
- secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
|
||||
+ if (secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
|
||||
+ std::string server_method;
|
||||
for (base::StringPiece server_template :
|
||||
chrome_browser_net::secure_dns::SplitGroup(doh_templates)) {
|
||||
if (!net::dns_util::IsValidDohTemplate(server_template, &server_method)) {
|
||||
+ LOG(WARNING) << "DoH templates: skipping invalid: '" << server_template << "'";
|
||||
continue;
|
||||
}
|
||||
|
||||
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
|
||||
@@ -590,6 +590,17 @@ CHAR-LIMIT guidelines:
|
||||
Chrome Passwords
|
||||
</message>
|
||||
|
||||
@@ -375,130 +515,12 @@ diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/and
|
||||
+ </message>
|
||||
+
|
||||
<!-- Homepage preferences -->
|
||||
<message name="IDS_OPTIONS_HOMEPAGE_EDIT_TITLE" desc="The title of the screen that allows users to change the URL that opens when they tap on the home page button in the omnibox.">
|
||||
Edit home page
|
||||
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
|
||||
@@ -6558,6 +6558,12 @@ the Bookmarks menu.">
|
||||
<message name="IDS_OPTIONS_HOMEPAGE_TITLE" desc="The title of the home page overlay on Android" formatter_data="android_java">
|
||||
Home page
|
||||
</message>
|
||||
+ <message name="IDS_OPTIONS_DOH_TITLE" desc="The title of the DNS-over-HTTPS option on Android" formatter_data="android_java">
|
||||
+ Secure DNS
|
||||
+ </message>
|
||||
+ <message name="IDS_OPTIONS_DOH_SUMMARY" desc="The title of the DNS-over-HTTPS summary on Android" formatter_data="android_java">
|
||||
+ Configure DNS-over-HTTPS (DoH) secure DNS
|
||||
+ </message>
|
||||
</if>
|
||||
|
||||
<!-- Autofill dialog: field labels. -->
|
||||
diff --git a/chrome/browser/android/feature_utilities.cc b/chrome/browser/android/feature_utilities.cc
|
||||
--- a/chrome/browser/android/feature_utilities.cc
|
||||
+++ b/chrome/browser/android/feature_utilities.cc
|
||||
@@ -7,6 +7,9 @@
|
||||
#include "chrome/android/chrome_jni_headers/FeatureUtilities_jni.h"
|
||||
|
||||
#include "base/android/jni_string.h"
|
||||
+#include "chrome/browser/browser_process.h"
|
||||
+#include "components/prefs/pref_service.h"
|
||||
+#include "chrome/common/pref_names.h"
|
||||
#include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
#include "components/ntp_snippets/content_suggestions_service.h"
|
||||
@@ -76,3 +79,23 @@ static jboolean JNI_FeatureUtilities_IsNetworkServiceWarmUpEnabled(
|
||||
return content::IsOutOfProcessNetworkService() &&
|
||||
base::FeatureList::IsEnabled(features::kWarmUpNetworkProcess);
|
||||
}
|
||||
+
|
||||
+static jboolean JNI_FeatureUtilities_GetDoHEnabled(JNIEnv* env) {
|
||||
+ std::string doh_mode = g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsMode);
|
||||
+ return ((doh_mode == "secure") || (doh_mode == "auto"));
|
||||
+}
|
||||
+
|
||||
+static void JNI_FeatureUtilities_SetDoHEnabled(JNIEnv* env, jboolean enabled) {
|
||||
+ if (enabled)
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsMode, "secure");
|
||||
+ else
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsMode, "off");
|
||||
+}
|
||||
+
|
||||
+static ScopedJavaLocalRef<jstring> JNI_FeatureUtilities_GetDoHTemplates(JNIEnv* env) {
|
||||
+ return base::android::ConvertUTF8ToJavaString(env, g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsTemplates));
|
||||
+}
|
||||
+
|
||||
+static void JNI_FeatureUtilities_SetDoHTemplates(JNIEnv* env, const JavaParamRef<jstring>& templates) {
|
||||
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsTemplates, base::android::ConvertJavaStringToUTF8(env, templates));
|
||||
+}
|
||||
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
|
||||
@@ -137,9 +137,14 @@ void GetStubResolverConfig(
|
||||
|
||||
std::string doh_templates =
|
||||
local_state->GetString(prefs::kDnsOverHttpsTemplates);
|
||||
- std::string server_method;
|
||||
- if (!doh_templates.empty() &&
|
||||
- *secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
|
||||
+ if (doh_templates.empty()) {
|
||||
+ *secure_dns_mode = net::DnsConfig::SecureDnsMode::OFF;
|
||||
+ doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
|
||||
+ }
|
||||
+
|
||||
+ LOG(INFO) << "DoH templates: '" << doh_templates << "' with mode " << doh_mode;
|
||||
+ if (*secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
|
||||
+ std::string server_method;
|
||||
for (const std::string& server_template :
|
||||
SplitString(doh_templates, " ", base::TRIM_WHITESPACE,
|
||||
base::SPLIT_WANT_NONEMPTY)) {
|
||||
@@ -425,40 +430,11 @@ SystemNetworkContextManager::SystemNetworkContextManager(
|
||||
// features before registering change callbacks for these preferences.
|
||||
local_state_->SetDefaultPrefValue(prefs::kBuiltInDnsClientEnabled,
|
||||
base::Value(ShouldEnableAsyncDns()));
|
||||
- std::string default_doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
|
||||
- std::string default_doh_templates = "";
|
||||
- if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) {
|
||||
- if (features::kDnsOverHttpsFallbackParam.Get()) {
|
||||
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeAutomatic;
|
||||
- } else {
|
||||
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeSecure;
|
||||
- }
|
||||
- default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
|
||||
- }
|
||||
+ //NOTE: DoH fallback feature to insecure mode is not evaluated
|
||||
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsMode,
|
||||
- base::Value(default_doh_mode));
|
||||
+ base::Value(chrome_browser_net::kDnsOverHttpsModeOff));
|
||||
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
|
||||
- base::Value(default_doh_templates));
|
||||
-
|
||||
- // If the user has explicitly enabled or disabled the DoH experiment in
|
||||
- // chrome://flags, store that choice in the user prefs so that it can be
|
||||
- // persisted after the experiment ends. Also make sure to remove the stored
|
||||
- // prefs value if the user has changed their chrome://flags selection to the
|
||||
- // default.
|
||||
- flags_ui::PrefServiceFlagsStorage flags_storage(local_state_);
|
||||
- std::set<std::string> entries = flags_storage.GetFlags();
|
||||
- if (entries.count("dns-over-https@1")) {
|
||||
- // The user has "Enabled" selected.
|
||||
- local_state_->SetString(prefs::kDnsOverHttpsMode,
|
||||
- chrome_browser_net::kDnsOverHttpsModeAutomatic);
|
||||
- } else if (entries.count("dns-over-https@2")) {
|
||||
- // The user has "Disabled" selected.
|
||||
- local_state_->SetString(prefs::kDnsOverHttpsMode,
|
||||
- chrome_browser_net::kDnsOverHttpsModeOff);
|
||||
- } else {
|
||||
- // The user has "Default" selected.
|
||||
- local_state_->ClearPref(prefs::kDnsOverHttpsMode);
|
||||
- }
|
||||
+ base::Value(features::kDnsOverHttpsTemplatesParam.Get()));
|
||||
|
||||
PrefChangeRegistrar::NamedChangeCallback dns_pref_callback =
|
||||
base::BindRepeating(&OnStubResolverConfigChanged,
|
||||
<message name="IDS_OPTIONS_HOMEPAGE_EDIT_HINT" desc="Hint for the text edit on Homepage Preference setting, guiding user to enter their customized homepage setting">
|
||||
Enter custom web address
|
||||
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
|
||||
@@ -294,12 +294,12 @@ const char kDisallowUnsafeHttpDownloadsParamName[] = "MimeTypeList";
|
||||
@@ -281,12 +281,12 @@ const base::Feature kDesktopPWAsRunOnOsLogin{"DesktopPWAsRunOnOsLogin",
|
||||
|
||||
// Enable DNS over HTTPS (DoH).
|
||||
const base::Feature kDnsOverHttps{"DnsOverHttps",
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 19 Dec 2019 22:52:53 +0100
|
||||
Subject: Allow building without feed support
|
||||
|
||||
---
|
||||
.../chrome/browser/ntp/cards/ExploreOfflineCard.java | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ExploreOfflineCard.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ExploreOfflineCard.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ExploreOfflineCard.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ExploreOfflineCard.java
|
||||
@@ -13,7 +13,6 @@ import org.chromium.base.ApiCompatibilityUtils;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.download.DownloadUtils;
|
||||
-import org.chromium.chrome.browser.feed.FeedConfiguration;
|
||||
import org.chromium.net.NetworkChangeNotifier;
|
||||
import org.chromium.ui.text.SpanApplier;
|
||||
|
||||
@@ -73,9 +72,7 @@ public class ExploreOfflineCard {
|
||||
|
||||
View imageView = cardView.findViewById(R.id.explore_offline_image);
|
||||
imageView.setBackground(imageView.getContext().getResources().getDrawable(
|
||||
- FeedConfiguration.getFeedUiEnabled()
|
||||
- ? R.drawable.card_background_rounded_right_half_with_border
|
||||
- : R.drawable.card_background_rounded_right_half_no_border));
|
||||
+ R.drawable.card_background_rounded_right_half_no_border));
|
||||
|
||||
cardView.setOnClickListener(v -> mOpenDownloadHomeCallback.run());
|
||||
return cardView;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -10,7 +10,7 @@ Subject: Allow playing audio in background
|
||||
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
|
||||
--- a/media/blink/webmediaplayer_impl.cc
|
||||
+++ b/media/blink/webmediaplayer_impl.cc
|
||||
@@ -989,6 +989,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
|
||||
@@ -1053,6 +1053,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
|
||||
return pipeline_metadata_.has_audio;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_imp
|
||||
void WebMediaPlayerImpl::EnabledAudioTracksChanged(
|
||||
const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds) {
|
||||
DCHECK(main_task_runner_->BelongsToCurrentThread());
|
||||
@@ -3298,7 +3304,11 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const {
|
||||
@@ -3469,7 +3475,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.
|
||||
@@ -35,11 +35,11 @@ diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_imp
|
||||
+ if (!HasVideoNonEmptySize())
|
||||
return false;
|
||||
|
||||
if (!is_background_video_playback_enabled_)
|
||||
if (using_media_player_renderer_ &&
|
||||
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
|
||||
--- a/media/blink/webmediaplayer_impl.h
|
||||
+++ b/media/blink/webmediaplayer_impl.h
|
||||
@@ -143,6 +143,8 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
||||
@@ -153,6 +153,8 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
|
||||
// True if the loaded media has a playable video/audio track.
|
||||
bool HasVideo() const override;
|
||||
bool HasAudio() const override;
|
||||
|
||||
@@ -10,9 +10,9 @@ 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
|
||||
@@ -152,7 +152,7 @@ void AccountConsistencyModeManager::RegisterProfilePrefs(
|
||||
registry->RegisterBooleanPref(prefs::kAccountConsistencyMirrorRequired,
|
||||
false);
|
||||
@@ -97,7 +97,7 @@ void AccountConsistencyModeManager::RegisterProfilePrefs(
|
||||
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
registry->RegisterBooleanPref(kDiceMigrationCompletePref, false);
|
||||
#endif
|
||||
- registry->RegisterBooleanPref(prefs::kSigninAllowedOnNextStartup, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kSigninAllowedOnNextStartup, false);
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: Always allow partner customisation
|
||||
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
|
||||
@@ -244,14 +244,14 @@ public class PartnerBrowserCustomizations {
|
||||
@@ -325,14 +325,14 @@ public class PartnerBrowserCustomizations {
|
||||
@Override
|
||||
protected Void doInBackground() {
|
||||
try {
|
||||
@@ -31,7 +31,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomiz
|
||||
+ //}
|
||||
|
||||
if (isCancelled()) return null;
|
||||
refreshIncognitoModeDisabled();
|
||||
Provider provider = AppHooks.get().getCustomizationProvider();
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -11,19 +11,19 @@ Do not read experiment value for cronet async DNS configuration
|
||||
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
|
||||
@@ -245,7 +245,7 @@ void OnAuthPrefsChanged(PrefService* local_state,
|
||||
// Android this includes checking the Android version in the field trial.
|
||||
bool ShouldEnableAsyncDns() {
|
||||
bool feature_can_be_enabled = true;
|
||||
@@ -150,7 +150,7 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams(
|
||||
local_state->GetBoolean(prefs::kNtlmV2Enabled);
|
||||
#endif // defined(OS_POSIX)
|
||||
|
||||
-#if defined(OS_ANDROID)
|
||||
+#if 0
|
||||
int min_sdk =
|
||||
base::GetFieldTrialParamByFeatureAsInt(features::kAsyncDns, "min_sdk", 0);
|
||||
if (base::android::BuildInfo::GetInstance()->sdk_int() < min_sdk)
|
||||
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
|
||||
@@ -573,7 +573,8 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions(
|
||||
@@ -533,7 +533,8 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions(
|
||||
effective_experimental_options->Remove(it.key(), nullptr);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4,23 +4,22 @@ Subject: Always use new tab page for default home page
|
||||
|
||||
Ignore any partner-provided home page.
|
||||
---
|
||||
.../chrome/browser/partnercustomizations/HomepageManager.java | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
.../org/chromium/chrome/browser/homepage/HomepageManager.java | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
|
||||
@@ -111,9 +111,7 @@ public class HomepageManager {
|
||||
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
|
||||
@@ -135,9 +135,6 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat
|
||||
* if the homepage button is force enabled via flag.
|
||||
*/
|
||||
public static String getDefaultHomepageUri() {
|
||||
- return PartnerBrowserCustomizations.isHomepageProviderAvailableAndEnabled()
|
||||
- ? PartnerBrowserCustomizations.getHomePageUrl()
|
||||
- : UrlConstants.NTP_NON_NATIVE_URL;
|
||||
+ return UrlConstants.NTP_NON_NATIVE_URL;
|
||||
- if (PartnerBrowserCustomizations.getInstance().isHomepageProviderAvailableAndEnabled()) {
|
||||
- return PartnerBrowserCustomizations.getInstance().getHomePageUrl();
|
||||
- }
|
||||
return UrlConstants.NTP_NON_NATIVE_URL;
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
+15
-10
@@ -1,6 +1,6 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 25 Mar 2018 21:49:37 +0200
|
||||
Subject: AudioBuffer, AnalyserNode: fingerprinting mitigations via IDL
|
||||
Subject: AudioBuffer, AnalyserNode: fp mitigations
|
||||
|
||||
Truncate base latency precision to two digits
|
||||
---
|
||||
@@ -12,7 +12,7 @@ Truncate base latency precision to two digits
|
||||
diff --git a/third_party/blink/renderer/modules/webaudio/analyser_node.idl b/third_party/blink/renderer/modules/webaudio/analyser_node.idl
|
||||
--- a/third_party/blink/renderer/modules/webaudio/analyser_node.idl
|
||||
+++ b/third_party/blink/renderer/modules/webaudio/analyser_node.idl
|
||||
@@ -43,10 +43,10 @@ interface AnalyserNode : AudioNode {
|
||||
@@ -40,10 +40,10 @@
|
||||
|
||||
// Copies the current frequency data into the passed array.
|
||||
// If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
|
||||
@@ -30,20 +30,25 @@ diff --git a/third_party/blink/renderer/modules/webaudio/analyser_node.idl b/thi
|
||||
diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
|
||||
--- a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
|
||||
+++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
|
||||
@@ -39,7 +39,7 @@
|
||||
@@ -37,12 +37,12 @@
|
||||
|
||||
// Channel access
|
||||
readonly attribute unsigned long numberOfChannels;
|
||||
- [HighEntropy, Measure, RaisesException] Float32Array getChannelData(unsigned long channelIndex);
|
||||
- [HighEntropy, Measure, RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long bufferOffset = 0);
|
||||
+ //[HighEntropy, Measure, RaisesException] Float32Array getChannelData(unsigned long channelIndex);
|
||||
+ //[HighEntropy, Measure, RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long bufferOffset = 0);
|
||||
[RaisesException] void copyToChannel(Float32Array source, long channelNumber, optional unsigned long bufferOffset = 0);
|
||||
};
|
||||
- [HighEntropy, Measure, RaisesException] Float32Array getChannelData(
|
||||
+ /*[HighEntropy, Measure, RaisesException] Float32Array getChannelData(
|
||||
unsigned long channelIndex);
|
||||
[HighEntropy, Measure, RaisesException] void copyFromChannel(
|
||||
Float32Array destination,
|
||||
unsigned long channelNumber,
|
||||
- optional unsigned long bufferOffset = 0);
|
||||
+ optional unsigned long bufferOffset = 0); */
|
||||
[RaisesException] void copyToChannel(
|
||||
Float32Array source,
|
||||
unsigned long channelNumber,
|
||||
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
|
||||
@@ -373,7 +373,9 @@ double AudioContext::baseLatency() const {
|
||||
@@ -398,7 +398,9 @@ double AudioContext::baseLatency() const {
|
||||
DCHECK(IsMainThread());
|
||||
DCHECK(destination());
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,13 +4,13 @@ Subject: Battery API: return nothing
|
||||
|
||||
Include @thestinger's fix for correct charging/unknown values
|
||||
---
|
||||
.../modules/battery/battery_manager.cc | 25 +++----------------
|
||||
1 file changed, 4 insertions(+), 21 deletions(-)
|
||||
.../modules/battery/battery_manager.cc | 26 +++----------------
|
||||
1 file changed, 4 insertions(+), 22 deletions(-)
|
||||
|
||||
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
|
||||
@@ -45,45 +45,28 @@ ScriptPromise BatteryManager::StartRequest(ScriptState* script_state) {
|
||||
@@ -45,46 +45,28 @@ ScriptPromise BatteryManager::StartRequest(ScriptState* script_state) {
|
||||
}
|
||||
|
||||
bool BatteryManager::charging() {
|
||||
@@ -39,15 +39,16 @@ diff --git a/third_party/blink/renderer/modules/battery/battery_manager.cc b/thi
|
||||
- BatteryStatus old_status = battery_status_;
|
||||
- battery_status_ = *BatteryDispatcher::Instance().LatestData();
|
||||
-
|
||||
if (battery_property_->GetState() == ScriptPromisePropertyBase::kPending) {
|
||||
if (battery_property_->GetState() == BatteryProperty::kPending) {
|
||||
battery_property_->Resolve(this);
|
||||
return;
|
||||
}
|
||||
-
|
||||
- Document* document = To<Document>(GetExecutionContext());
|
||||
- DCHECK(document);
|
||||
- if (document->IsContextPaused() || document->IsContextDestroyed())
|
||||
- DCHECK(GetExecutionContext());
|
||||
- if (GetExecutionContext()->IsContextPaused() ||
|
||||
- GetExecutionContext()->IsContextDestroyed()) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (battery_status_.Charging() != old_status.Charging())
|
||||
- DispatchEvent(*Event::Create(event_type_names::kChargingchange));
|
||||
|
||||
+36
-68
@@ -9,7 +9,6 @@ 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 | 3 +-
|
||||
.../browser/url_request_context_factory.cc | 7 +++-
|
||||
.../omnibox/browser/autocomplete_input.cc | 7 ++--
|
||||
components/url_formatter/url_fixer.cc | 4 +++
|
||||
.../child_process_security_policy_impl.cc | 1 +
|
||||
@@ -17,18 +16,18 @@ This patch is based on Iridium's 'net: add "trk:" scheme and help identify URLs
|
||||
net/url_request/trk_protocol_handler.cc | 26 +++++++++++++++
|
||||
net/url_request/trk_protocol_handler.h | 33 +++++++++++++++++++
|
||||
net/url_request/url_request.cc | 8 +++++
|
||||
.../url_request_context_builder.cc | 4 +++
|
||||
.../url_request_context_builder.cc | 3 ++
|
||||
url/url_constants.cc | 1 +
|
||||
url/url_constants.h | 1 +
|
||||
url/url_util.cc | 2 ++
|
||||
15 files changed, 97 insertions(+), 4 deletions(-)
|
||||
14 files changed, 90 insertions(+), 3 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
|
||||
@@ -28,6 +28,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme(
|
||||
@@ -55,6 +55,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme(
|
||||
if (base::IsStringASCII(scheme) &&
|
||||
(ProfileIOData::IsHandledProtocol(scheme) ||
|
||||
base::LowerCaseEqualsASCII(scheme, content::kViewSourceScheme) ||
|
||||
@@ -39,18 +38,18 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.c
|
||||
diff --git a/chrome/browser/history/history_utils.cc b/chrome/browser/history/history_utils.cc
|
||||
--- a/chrome/browser/history/history_utils.cc
|
||||
+++ b/chrome/browser/history/history_utils.cc
|
||||
@@ -22,6 +22,7 @@ bool CanAddURLToHistory(const GURL& url) {
|
||||
@@ -21,6 +21,7 @@ bool CanAddURLToHistory(const GURL& url) {
|
||||
url.SchemeIs(content::kChromeDevToolsScheme) ||
|
||||
url.SchemeIs(content::kChromeUIScheme) ||
|
||||
url.SchemeIs(content::kViewSourceScheme) ||
|
||||
+ url.SchemeIs(url::kTraceScheme) ||
|
||||
url.SchemeIs(chrome::kChromeNativeScheme) ||
|
||||
url.SchemeIs(chrome::kChromeSearchScheme) ||
|
||||
url.SchemeIs(dom_distiller::kDomDistillerScheme) ||
|
||||
url.SchemeIs(dom_distiller::kDomDistillerScheme))
|
||||
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
|
||||
@@ -100,7 +100,8 @@ int GetIndexOfExistingTab(Browser* browser, const NavigateParams& params) {
|
||||
@@ -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.
|
||||
@@ -60,40 +59,10 @@ diff --git a/chrome/browser/ui/singleton_tabs.cc b/chrome/browser/ui/singleton_t
|
||||
continue;
|
||||
|
||||
GURL rewritten_tab_url = tab_url;
|
||||
diff --git a/chromecast/browser/url_request_context_factory.cc b/chromecast/browser/url_request_context_factory.cc
|
||||
--- a/chromecast/browser/url_request_context_factory.cc
|
||||
+++ b/chromecast/browser/url_request_context_factory.cc
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "net/http/http_stream_factory.h"
|
||||
#include "net/proxy_resolution/proxy_resolution_service.h"
|
||||
#include "net/ssl/ssl_config_service_defaults.h"
|
||||
+#include "net/url_request/trk_protocol_handler.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_context_builder.h"
|
||||
#include "net/url_request/url_request_context_getter.h"
|
||||
@@ -245,13 +246,17 @@ void URLRequestContextFactory::InitializeMainContextDependencies(
|
||||
new net::URLRequestJobFactoryImpl());
|
||||
// Keep ProtocolHandlers added in sync with
|
||||
// CastContentBrowserClient::IsHandledURL().
|
||||
+ bool set_protocol = false;
|
||||
for (content::ProtocolHandlerMap::iterator it = protocol_handlers->begin();
|
||||
it != protocol_handlers->end();
|
||||
++it) {
|
||||
- bool set_protocol =
|
||||
+ set_protocol =
|
||||
job_factory->SetProtocolHandler(it->first, std::move(it->second));
|
||||
DCHECK(set_protocol);
|
||||
}
|
||||
+ set_protocol = job_factory->SetProtocolHandler(
|
||||
+ url::kTraceScheme, base::WrapUnique(new net::TrkProtocolHandler));
|
||||
+ DCHECK(set_protocol);
|
||||
|
||||
// Set up interceptors in the reverse order.
|
||||
std::unique_ptr<net::URLRequestJobFactory> top_job_factory =
|
||||
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
|
||||
@@ -496,7 +496,8 @@ void AutocompleteInput::ParseForEmphasizeComponents(
|
||||
@@ -488,7 +488,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) ||
|
||||
@@ -103,7 +72,7 @@ diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnib
|
||||
(static_cast<int>(text.length()) > after_scheme_and_colon)) {
|
||||
// Obtain the URL prefixed by view-source or blob and parse it.
|
||||
base::string16 real_url(text.substr(after_scheme_and_colon));
|
||||
@@ -569,7 +570,9 @@ int AutocompleteInput::NumNonHostComponents(const url::Parsed& parts) {
|
||||
@@ -561,7 +562,9 @@ int AutocompleteInput::NumNonHostComponents(const url::Parsed& parts) {
|
||||
bool AutocompleteInput::HasHTTPScheme(const base::string16& input) {
|
||||
std::string utf8_input(base::UTF16ToUTF8(input));
|
||||
url::Component scheme;
|
||||
@@ -117,7 +86,7 @@ diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnib
|
||||
diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc
|
||||
--- a/components/url_formatter/url_fixer.cc
|
||||
+++ b/components/url_formatter/url_fixer.cc
|
||||
@@ -552,6 +552,10 @@ GURL FixupURL(const std::string& text, const std::string& desired_tld) {
|
||||
@@ -557,6 +557,10 @@ GURL FixupURL(const std::string& text, const std::string& desired_tld) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +100,8 @@ 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
|
||||
@@ -513,6 +513,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() {
|
||||
RegisterWebSafeScheme(url::kHttpsScheme);
|
||||
@@ -634,6 +634,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() {
|
||||
#endif // BUILDFLAG(ENABLE_WEBSOCKETS)
|
||||
RegisterWebSafeScheme(url::kFtpScheme);
|
||||
RegisterWebSafeScheme(url::kDataScheme);
|
||||
+ RegisterWebSafeScheme(url::kTraceScheme);
|
||||
@@ -142,7 +111,7 @@ diff --git a/content/browser/child_process_security_policy_impl.cc b/content/bro
|
||||
diff --git a/net/BUILD.gn b/net/BUILD.gn
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -1801,6 +1801,8 @@ component("net") {
|
||||
@@ -1083,6 +1083,8 @@ component("net") {
|
||||
"url_request/report_sender.h",
|
||||
"url_request/static_http_user_agent_settings.cc",
|
||||
"url_request/static_http_user_agent_settings.h",
|
||||
@@ -239,7 +208,7 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
|
||||
|
||||
using base::Time;
|
||||
using std::string;
|
||||
@@ -592,6 +594,12 @@ URLRequest::URLRequest(const GURL& url,
|
||||
@@ -562,6 +564,12 @@ URLRequest::URLRequest(const GURL& url,
|
||||
// Sanity check out environment.
|
||||
DCHECK(base::ThreadTaskRunnerHandle::IsSet());
|
||||
|
||||
@@ -255,30 +224,29 @@ 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
|
||||
@@ -40,6 +40,7 @@
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "net/quic/quic_stream_factory.h"
|
||||
#include "net/ssl/ssl_config_service_defaults.h"
|
||||
#include "net/url_request/data_protocol_handler.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_intercepting_job_factory.h"
|
||||
@@ -641,6 +642,9 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
|
||||
}
|
||||
url_request_interceptors_.clear();
|
||||
#include "net/url_request/url_request_job_factory_impl.h"
|
||||
@@ -602,6 +603,8 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
|
||||
job_factory->SetProtocolHandler(scheme_handler.first,
|
||||
std::move(scheme_handler.second));
|
||||
}
|
||||
+ job_factory->SetProtocolHandler(url::kTraceScheme,
|
||||
+ std::make_unique<TrkProtocolHandler>());
|
||||
+
|
||||
if (create_intercepting_job_factory_) {
|
||||
top_job_factory = std::move(create_intercepting_job_factory_)
|
||||
.Run(std::move(top_job_factory));
|
||||
protocol_handlers_.clear();
|
||||
|
||||
#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
|
||||
@@ -26,6 +26,7 @@ const char kHttpsScheme[] = "https";
|
||||
const char kJavaScriptScheme[] = "javascript";
|
||||
const char kMailToScheme[] = "mailto";
|
||||
@@ -28,6 +28,7 @@ const char kMailToScheme[] = "mailto";
|
||||
// See also: https://www.iana.org/assignments/uri-schemes/prov/quic-transport
|
||||
const char kQuicTransportScheme[] = "quic-transport";
|
||||
const char kTelScheme[] = "tel";
|
||||
+const char kTraceScheme[] = "trk";
|
||||
const char kWsScheme[] = "ws";
|
||||
@@ -287,9 +255,9 @@ diff --git a/url/url_constants.cc b/url/url_constants.cc
|
||||
diff --git a/url/url_constants.h b/url/url_constants.h
|
||||
--- a/url/url_constants.h
|
||||
+++ b/url/url_constants.h
|
||||
@@ -32,6 +32,7 @@ COMPONENT_EXPORT(URL) extern const char kHttpsScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char kJavaScriptScheme[];
|
||||
@@ -32,6 +32,7 @@ COMPONENT_EXPORT(URL) extern const char kJavaScriptScheme[];
|
||||
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 kTraceScheme[];
|
||||
COMPONENT_EXPORT(URL) extern const char kWsScheme[];
|
||||
@@ -298,15 +266,15 @@ diff --git a/url/url_constants.h b/url/url_constants.h
|
||||
diff --git a/url/url_util.cc b/url/url_util.cc
|
||||
--- a/url/url_util.cc
|
||||
+++ b/url/url_util.cc
|
||||
@@ -52,6 +52,7 @@ struct SchemeRegistry {
|
||||
kHttpsScheme,
|
||||
kAboutScheme,
|
||||
kDataScheme,
|
||||
+ kTraceScheme,
|
||||
kWssScheme,
|
||||
};
|
||||
|
||||
@@ -67,6 +68,7 @@ struct SchemeRegistry {
|
||||
@@ -34,6 +34,7 @@ struct SchemeRegistry {
|
||||
std::vector<SchemeWithType> standard_schemes = {
|
||||
{kHttpsScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION},
|
||||
{kHttpScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION},
|
||||
+ {kTraceScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION},
|
||||
// Yes, file URLs can have a hostname, so file URLs should be handled as
|
||||
// "standard". File URLs never have a port as specified by the SchemeType
|
||||
// field. Unlike other SCHEME_WITH_HOST schemes, the 'host' in a file
|
||||
@@ -77,6 +78,7 @@ struct SchemeRegistry {
|
||||
kAboutScheme,
|
||||
kJavaScriptScheme,
|
||||
kDataScheme,
|
||||
|
||||
@@ -0,0 +1,253 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Tue, 28 Jul 2020 12:28:58 +0200
|
||||
Subject: Block gateway attacks via websockets
|
||||
|
||||
---
|
||||
services/network/public/cpp/features.cc | 2 +-
|
||||
.../renderer/core/loader/base_fetch_context.h | 1 +
|
||||
.../core/loader/frame_fetch_context.cc | 18 ++++++++++
|
||||
.../core/loader/frame_fetch_context.h | 1 +
|
||||
.../core/loader/worker_fetch_context.cc | 19 +++++++++++
|
||||
.../core/loader/worker_fetch_context.h | 1 +
|
||||
.../background_fetch_manager.cc | 34 +++++++++----------
|
||||
.../websockets/websocket_channel_impl.cc | 5 +++
|
||||
.../modules/websockets/websocket_common.cc | 27 +++++++++++++++
|
||||
.../modules/websockets/websocket_common.h | 4 +++
|
||||
10 files changed, 93 insertions(+), 19 deletions(-)
|
||||
|
||||
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
|
||||
@@ -123,7 +123,7 @@ const base::Feature kCrossOriginEmbedderPolicy{
|
||||
//
|
||||
// https://wicg.github.io/cors-rfc1918/#integration-fetch
|
||||
const base::Feature kBlockNonSecureExternalRequests{
|
||||
- "BlockNonSecureExternalRequests", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ "BlockNonSecureExternalRequests", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
// Enables or defaults splittup up server (not proxy) entries in the
|
||||
// HttpAuthCache.
|
||||
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
|
||||
@@ -65,6 +65,7 @@ class CORE_EXPORT BaseFetchContext : public FetchContext {
|
||||
virtual PreviewsResourceLoadingHints* GetPreviewsResourceLoadingHints()
|
||||
const = 0;
|
||||
virtual bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const = 0;
|
||||
+ virtual bool ShouldBlockGateWayAttacks(network::mojom::IPAddressSpace requestor_space, const KURL&) const = 0;
|
||||
virtual std::unique_ptr<WebSocketHandshakeThrottle>
|
||||
CreateWebSocketHandshakeThrottle() = 0;
|
||||
|
||||
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
|
||||
@@ -755,6 +755,24 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const {
|
||||
return should_block_request;
|
||||
}
|
||||
|
||||
+bool FrameFetchContext::ShouldBlockGateWayAttacks(network::mojom::IPAddressSpace requestor_space, const KURL& request_url) const {
|
||||
+ // 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;
|
||||
+}
|
||||
+
|
||||
void FrameFetchContext::DispatchDidBlockRequest(
|
||||
const ResourceRequest& resource_request,
|
||||
const FetchInitiatorInfo& fetch_initiator_info,
|
||||
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
|
||||
@@ -150,6 +150,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext {
|
||||
bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const override;
|
||||
std::unique_ptr<WebSocketHandshakeThrottle> CreateWebSocketHandshakeThrottle()
|
||||
override;
|
||||
+ bool ShouldBlockGateWayAttacks(network::mojom::IPAddressSpace requestor_space, const KURL&) const override;
|
||||
bool ShouldBlockFetchByMixedContentCheck(
|
||||
mojom::blink::RequestContextType request_context,
|
||||
const base::Optional<ResourceRequest::RedirectInfo>& redirect_info,
|
||||
diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.cc b/third_party/blink/renderer/core/loader/worker_fetch_context.cc
|
||||
--- a/third_party/blink/renderer/core/loader/worker_fetch_context.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/worker_fetch_context.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "third_party/blink/renderer/platform/loader/fetch/resource_timing_info.h"
|
||||
#include "third_party/blink/renderer/platform/loader/fetch/worker_resource_timing_notifier.h"
|
||||
#include "third_party/blink/renderer/platform/network/network_state_notifier.h"
|
||||
+#include "third_party/blink/renderer/platform/network/network_utils.h"
|
||||
#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"
|
||||
@@ -95,6 +96,24 @@ bool WorkerFetchContext::ShouldBlockRequestByInspector(const KURL& url) const {
|
||||
return should_block_request;
|
||||
}
|
||||
|
||||
+bool WorkerFetchContext::ShouldBlockGateWayAttacks(network::mojom::IPAddressSpace requestor_space, const KURL& request_url) const {
|
||||
+ // 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;
|
||||
+}
|
||||
+
|
||||
void WorkerFetchContext::DispatchDidBlockRequest(
|
||||
const ResourceRequest& resource_request,
|
||||
const FetchInitiatorInfo& fetch_initiator_info,
|
||||
diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.h b/third_party/blink/renderer/core/loader/worker_fetch_context.h
|
||||
--- a/third_party/blink/renderer/core/loader/worker_fetch_context.h
|
||||
+++ b/third_party/blink/renderer/core/loader/worker_fetch_context.h
|
||||
@@ -59,6 +59,7 @@ class WorkerFetchContext final : public BaseFetchContext {
|
||||
bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const override;
|
||||
std::unique_ptr<WebSocketHandshakeThrottle> CreateWebSocketHandshakeThrottle()
|
||||
override;
|
||||
+ bool ShouldBlockGateWayAttacks(network::mojom::IPAddressSpace requestor_space, const KURL&) const override;
|
||||
bool ShouldBlockFetchByMixedContentCheck(
|
||||
mojom::blink::RequestContextType request_context,
|
||||
const base::Optional<ResourceRequest::RedirectInfo>& redirect_info,
|
||||
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
|
||||
@@ -106,24 +106,22 @@ 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->GetSecurityContext().AddressSpace();
|
||||
-
|
||||
- // 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;
|
||||
- }
|
||||
+ network::mojom::IPAddressSpace requestor_space =
|
||||
+ execution_context->GetSecurityContext().AddressSpace();
|
||||
+
|
||||
+ // 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;
|
||||
}
|
||||
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
|
||||
@@ -233,6 +233,11 @@ bool WebSocketChannelImpl::Connect(const KURL& url, const String& protocol) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ if (GetBaseFetchContext()->ShouldBlockGateWayAttacks(execution_context_->GetSecurityContext().AddressSpace(), url)) {
|
||||
+ has_initiated_opening_handshake_ = false;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
if (auto* scheduler = execution_context_->GetScheduler()) {
|
||||
feature_handle_for_scheduler_ = scheduler->RegisterFeature(
|
||||
SchedulingPolicy::Feature::kWebSocket,
|
||||
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
|
||||
@@ -87,6 +87,15 @@ WebSocketCommon::ConnectResult WebSocketCommon::Connect(
|
||||
return ConnectResult::kException;
|
||||
}
|
||||
|
||||
+ network::mojom::IPAddressSpace requestor_space =
|
||||
+ execution_context->GetSecurityContext().AddressSpace();
|
||||
+ if (ShouldBlockGateWayAttacks(requestor_space, url_)) {
|
||||
+ state_ = kClosed;
|
||||
+ exception_state.ThrowSecurityError(
|
||||
+ "Access to this address is not allowed.");
|
||||
+ return ConnectResult::kException;
|
||||
+ }
|
||||
+
|
||||
if (!execution_context->GetContentSecurityPolicyForWorld()
|
||||
->AllowConnectToSource(url_, url_, RedirectStatus::kNoRedirect)) {
|
||||
state_ = kClosed;
|
||||
@@ -135,6 +144,24 @@ WebSocketCommon::ConnectResult WebSocketCommon::Connect(
|
||||
return ConnectResult::kSuccess;
|
||||
}
|
||||
|
||||
+bool WebSocketCommon::ShouldBlockGateWayAttacks(network::mojom::IPAddressSpace requestor_space, const KURL& request_url) const {
|
||||
+ // 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;
|
||||
+}
|
||||
+
|
||||
void WebSocketCommon::CloseInternal(int code,
|
||||
const String& reason,
|
||||
WebSocketChannel* channel,
|
||||
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
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <memory>
|
||||
|
||||
#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"
|
||||
@@ -53,6 +55,8 @@ class MODULES_EXPORT WebSocketCommon {
|
||||
void SetState(State state) { state_ = state; }
|
||||
const KURL& Url() const { return url_; }
|
||||
|
||||
+ bool ShouldBlockGateWayAttacks(network::mojom::IPAddressSpace requestor_space, const KURL& url) const;
|
||||
+
|
||||
// The following methods are public for testing.
|
||||
|
||||
// Returns true if |protocol| is a valid WebSocket subprotocol name.
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -6,64 +6,39 @@ Disable look-alike, metrics, ablation and navigation throttles
|
||||
Do not use experiments to enable/disable presets
|
||||
Always enable ad filtering
|
||||
Download filters by checking Last-Modified header first
|
||||
Fix RestoreForeignSessionTab by recreating the tab (issue #681)
|
||||
---
|
||||
.../chrome/browser/util/FeatureUtilities.java | 10 +
|
||||
chrome/browser/after_startup_task_utils.cc | 5 +
|
||||
chrome/browser/browser_process.h | 7 +
|
||||
chrome/browser/browser_process_impl.cc | 28 ++
|
||||
chrome/browser/browser_process_impl.h | 3 +
|
||||
chrome/browser/chrome_browser_main.cc | 5 +-
|
||||
.../browser/chrome_content_browser_client.cc | 17 --
|
||||
components/component_updater/BUILD.gn | 6 +
|
||||
chrome/browser/chrome_browser_main.cc | 2 +
|
||||
.../browser/chrome_content_browser_client.cc | 16 --
|
||||
.../sessions/session_restore_android.cc | 4 +-
|
||||
components/component_updater/BUILD.gn | 8 +
|
||||
.../adblock_updater_service.cc | 249 ++++++++++++++++++
|
||||
.../adblock_updater_service.h | 99 +++++++
|
||||
.../download_filters_task.cc | 228 ++++++++++++++++
|
||||
.../component_updater/download_filters_task.h | 131 +++++++++
|
||||
.../download_filters_task.cc | 221 ++++++++++++++++
|
||||
.../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.cc | 1 +
|
||||
.../content/browser/ruleset_version.h | 5 +
|
||||
.../browser/verified_ruleset_dealer.cc | 2 +
|
||||
.../browser/verified_ruleset_dealer.cc | 3 +
|
||||
.../browser/subresource_filter_features.cc | 113 +-------
|
||||
.../core/common/common_features.cc | 2 +-
|
||||
.../frame_host/navigation_throttle_runner.cc | 10 -
|
||||
21 files changed, 827 insertions(+), 145 deletions(-)
|
||||
.../frame_host/navigation_throttle_runner.cc | 5 -
|
||||
21 files changed, 812 insertions(+), 139 deletions(-)
|
||||
create mode 100644 components/component_updater/adblock_updater_service.cc
|
||||
create mode 100644 components/component_updater/adblock_updater_service.h
|
||||
create mode 100644 components/component_updater/download_filters_task.cc
|
||||
create mode 100644 components/component_updater/download_filters_task.h
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
|
||||
@@ -277,6 +277,14 @@ public class FeatureUtilities {
|
||||
cacheServiceManagerForBackgroundPrefetch();
|
||||
}
|
||||
|
||||
+ public static void setAdBlockFiltersURL(String url) {
|
||||
+ FeatureUtilitiesJni.get().setAdBlockFiltersURL(url);
|
||||
+ }
|
||||
+
|
||||
+ public static String getAdBlockFiltersURL() {
|
||||
+ return FeatureUtilitiesJni.get().getAdBlockFiltersURL();
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* @return True if tab model merging for Android N+ is enabled.
|
||||
*/
|
||||
@@ -845,5 +853,7 @@ public class FeatureUtilities {
|
||||
void setCustomTabVisible(boolean visible);
|
||||
void setIsInMultiWindowMode(boolean isInMultiWindowMode);
|
||||
boolean isNetworkServiceWarmUpEnabled();
|
||||
+ void setAdBlockFiltersURL(String url);
|
||||
+ String getAdBlockFiltersURL();
|
||||
}
|
||||
}
|
||||
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
|
||||
@@ -37,6 +37,8 @@
|
||||
@@ -36,6 +36,8 @@
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
#endif
|
||||
|
||||
@@ -93,7 +68,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
|
||||
|
||||
class BackgroundModeManager;
|
||||
class BrowserProcessPlatformPart;
|
||||
@@ -58,6 +59,10 @@ class ComponentUpdateService;
|
||||
@@ -63,6 +64,10 @@ class ComponentUpdateService;
|
||||
class SupervisedUserWhitelistInstaller;
|
||||
}
|
||||
|
||||
@@ -104,7 +79,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
|
||||
namespace extensions {
|
||||
class EventRouterForwarder;
|
||||
}
|
||||
@@ -229,6 +234,8 @@ class BrowserProcess {
|
||||
@@ -238,6 +243,8 @@ class BrowserProcess {
|
||||
|
||||
virtual component_updater::ComponentUpdateService* component_updater() = 0;
|
||||
|
||||
@@ -116,7 +91,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
|
||||
@@ -1005,6 +1005,34 @@ BrowserProcessImpl::component_updater() {
|
||||
@@ -1052,6 +1052,34 @@ BrowserProcessImpl::component_updater() {
|
||||
return component_updater_.get();
|
||||
}
|
||||
|
||||
@@ -154,7 +129,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
|
||||
@@ -177,6 +177,7 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
@@ -181,6 +181,7 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
#endif
|
||||
|
||||
component_updater::ComponentUpdateService* component_updater() override;
|
||||
@@ -162,7 +137,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
|
||||
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
|
||||
component_updater::SupervisedUserWhitelistInstaller*
|
||||
supervised_user_whitelist_installer() override;
|
||||
@@ -357,6 +358,8 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
@@ -368,6 +369,8 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
// but some users of component updater only install per-user.
|
||||
std::unique_ptr<component_updater::ComponentUpdateService> component_updater_;
|
||||
|
||||
@@ -174,39 +149,35 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
|
||||
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
|
||||
@@ -1715,8 +1715,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
|
||||
PreBrowserStart();
|
||||
|
||||
- if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate))
|
||||
+ if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) {
|
||||
RegisterComponentsForUpdate(profile_->GetPrefs());
|
||||
@@ -1570,6 +1570,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) {
|
||||
component_updater::RegisterComponentsForUpdate(profile_->IsOffTheRecord(),
|
||||
profile_->GetPrefs());
|
||||
+ // force initialisation
|
||||
+ g_browser_process->adblock_updater();
|
||||
+ }
|
||||
}
|
||||
|
||||
variations::VariationsService* variations_service =
|
||||
browser_process_->variations_service();
|
||||
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
|
||||
@@ -63,7 +63,6 @@
|
||||
@@ -64,7 +64,6 @@
|
||||
#include "chrome/browser/hid/chrome_hid_delegate.h"
|
||||
#include "chrome/browser/language/translate_frame_binder.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/router/media_router_feature.h"
|
||||
#include "chrome/browser/media/router/presentation/presentation_service_delegate_impl.h"
|
||||
#include "chrome/browser/media/router/presentation/receiver_presentation_service_delegate_impl.h"
|
||||
@@ -207,7 +206,6 @@
|
||||
#include "components/nacl/common/buildflags.h"
|
||||
#include "components/nacl/common/nacl_constants.h"
|
||||
@@ -216,7 +215,6 @@
|
||||
#include "components/metrics/client_info.h"
|
||||
#include "components/metrics_services_manager/metrics_services_manager.h"
|
||||
#include "components/net_log/chrome_net_log.h"
|
||||
-#include "components/page_load_metrics/browser/metrics_navigation_throttle.h"
|
||||
#include "components/page_load_metrics/browser/metrics_web_contents_observer.h"
|
||||
#include "components/page_load_metrics/browser/page_load_metrics_util.h"
|
||||
#include "components/payments/content/payment_request_display_manager.h"
|
||||
@@ -3798,16 +3796,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
||||
#include "components/performance_manager/embedder/performance_manager_registry.h"
|
||||
@@ -3899,16 +3897,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
||||
content::NavigationHandle* handle) {
|
||||
std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
|
||||
|
||||
@@ -221,20 +192,33 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
|
||||
- }
|
||||
-
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
MaybeAddThrottle(&throttles,
|
||||
FlashDownloadInterception::MaybeCreateThrottleFor(handle));
|
||||
@@ -3914,11 +3902,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
||||
safe_browsing::MaybeCreateNavigationThrottle(handle));
|
||||
MaybeAddThrottle(FlashDownloadInterception::MaybeCreateThrottleFor(handle),
|
||||
&throttles);
|
||||
@@ -4021,10 +4009,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
|
||||
&throttles);
|
||||
#endif
|
||||
|
||||
- MaybeAddThrottle(
|
||||
- &throttles,
|
||||
- lookalikes::LookalikeUrlNavigationThrottle::MaybeCreateNavigationThrottle(
|
||||
- handle));
|
||||
- LookalikeUrlNavigationThrottle::MaybeCreateNavigationThrottle(handle),
|
||||
- &throttles);
|
||||
-
|
||||
MaybeAddThrottle(&throttles,
|
||||
PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(handle));
|
||||
MaybeAddThrottle(PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(handle),
|
||||
&throttles);
|
||||
|
||||
diff --git a/chrome/browser/sessions/session_restore_android.cc b/chrome/browser/sessions/session_restore_android.cc
|
||||
--- a/chrome/browser/sessions/session_restore_android.cc
|
||||
+++ b/chrome/browser/sessions/session_restore_android.cc
|
||||
@@ -43,7 +43,9 @@ content::WebContents* SessionRestore::RestoreForeignSessionTab(
|
||||
TabAndroid* current_tab = TabAndroid::FromWebContents(web_contents);
|
||||
DCHECK(current_tab);
|
||||
if (disposition == WindowOpenDisposition::CURRENT_TAB) {
|
||||
- current_tab->SwapWebContents(std::move(new_web_contents), false, false);
|
||||
+ int active_tab_index = tab_model->GetActiveIndex();
|
||||
+ tab_model->CreateTab(current_tab, new_web_contents.release());
|
||||
+ tab_model->CloseTabAt(active_tab_index);
|
||||
} else {
|
||||
DCHECK(disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB ||
|
||||
disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB);
|
||||
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
|
||||
@@ -251,6 +235,15 @@ 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",
|
||||
@@ -36,6 +42,8 @@ static_library("component_updater") {
|
||||
"//third_party/boringssl:boringssl",
|
||||
"//ui/base",
|
||||
"//url",
|
||||
+ "//services/network/public/mojom",
|
||||
+ "//services/network/public/mojom:trust_tokens_interface",
|
||||
]
|
||||
}
|
||||
|
||||
diff --git a/components/component_updater/adblock_updater_service.cc b/components/component_updater/adblock_updater_service.cc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
@@ -613,7 +606,7 @@ diff --git a/components/component_updater/download_filters_task.cc b/components/
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/component_updater/download_filters_task.cc
|
||||
@@ -0,0 +1,228 @@
|
||||
@@ -0,0 +1,221 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -732,23 +725,14 @@ new file mode 100644
|
||||
+void DownloadFiltersTask::internalDownload() {
|
||||
+ simple_url_loader_->DownloadToTempFile(
|
||||
+ shared_url_network_factory_.get(),
|
||||
+ base::BindOnce(
|
||||
+ [](const network::SimpleURLLoader* simple_url_loader,
|
||||
+ update_client::NetworkFetcher::DownloadToFileCompleteCallback download_to_file_complete_callback,
|
||||
+ base::FilePath file_path) {
|
||||
+ std::move(download_to_file_complete_callback)
|
||||
+ .Run(file_path, simple_url_loader->NetError(),
|
||||
+ simple_url_loader->GetContentSize());
|
||||
+ },
|
||||
+ simple_url_loader_.get(),
|
||||
+ base::BindOnce(&DownloadFiltersTask::OnDownloadComplete, base::Unretained(this))
|
||||
+ ), kMaxBodySize);
|
||||
+ base::BindOnce(&DownloadFiltersTask::OnDownloadComplete, base::Unretained(this)),
|
||||
+ kMaxBodySize);
|
||||
+}
|
||||
+
|
||||
+void DownloadFiltersTask::OnHeadersDownloadComplete(scoped_refptr<net::HttpResponseHeaders> headers) {
|
||||
+ // something went wrong
|
||||
+ if (headers == nullptr) {
|
||||
+ OnDownloadComplete(base::FilePath(), simple_url_loader_->NetError(), simple_url_loader_->GetContentSize() /* 0 */);
|
||||
+ OnDownloadComplete(base::FilePath());
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
@@ -780,8 +764,10 @@ new file mode 100644
|
||||
+ LOG(INFO) << "DownloadFiltersTask: fetching URL '" << final_url.spec() << "' with method " << (min_last_modified_.is_null() ? "GET" : "HEAD");
|
||||
+}
|
||||
+
|
||||
+void DownloadFiltersTask::OnDownloadComplete(base::FilePath file_path, int net_error, int64_t content_size) {
|
||||
+void DownloadFiltersTask::OnDownloadComplete(base::FilePath file_path) {
|
||||
+ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
+ int net_error = simple_url_loader_->NetError();
|
||||
+ int64_t content_size = simple_url_loader_->GetContentSize();
|
||||
+
|
||||
+ const base::TimeTicks download_end_time(base::TimeTicks::Now());
|
||||
+ const base::TimeDelta download_time =
|
||||
@@ -846,7 +832,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,131 @@
|
||||
@@ -0,0 +1,129 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -947,9 +933,7 @@ new file mode 100644
|
||||
+ void OnDownloadProgress(uint64_t current);
|
||||
+ void OnResponseStarted(const GURL& final_url,
|
||||
+ const network::mojom::URLResponseHead& response_head);
|
||||
+ void OnDownloadComplete(base::FilePath file_path,
|
||||
+ int net_error,
|
||||
+ int64_t content_size);
|
||||
+ void OnDownloadComplete(base::FilePath file_path);
|
||||
+ void OnHeadersDownloadComplete(scoped_refptr<net::HttpResponseHeaders> headers);
|
||||
+ void createSimpleURLLoader(bool);
|
||||
+ void internalDownload();
|
||||
@@ -981,7 +965,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
|
||||
@@ -306,6 +306,17 @@ ContentSubresourceFilterThrottleManager::
|
||||
@@ -375,6 +375,17 @@ ContentSubresourceFilterThrottleManager::
|
||||
throttle->NotifyPageActivationWithRuleset(EnsureRulesetHandle(),
|
||||
ad_tagging_state);
|
||||
}
|
||||
@@ -1174,7 +1158,15 @@ diff --git a/components/subresource_filter/content/browser/ruleset_version.h b/c
|
||||
diff --git a/components/subresource_filter/content/browser/verified_ruleset_dealer.cc b/components/subresource_filter/content/browser/verified_ruleset_dealer.cc
|
||||
--- a/components/subresource_filter/content/browser/verified_ruleset_dealer.cc
|
||||
+++ b/components/subresource_filter/content/browser/verified_ruleset_dealer.cc
|
||||
@@ -35,6 +35,8 @@ base::File VerifiedRulesetDealer::OpenAndSetRulesetFile(
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "base/check.h"
|
||||
#include "base/files/file.h"
|
||||
#include "base/location.h"
|
||||
+#include "base/logging.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/task_runner_util.h"
|
||||
@@ -36,6 +37,8 @@ base::File VerifiedRulesetDealer::OpenAndSetRulesetFile(
|
||||
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("loading"),
|
||||
"VerifiedRulesetDealer::OpenAndSetRulesetFile", "file_valid",
|
||||
file.IsValid());
|
||||
@@ -1345,23 +1337,11 @@ diff --git a/components/subresource_filter/core/common/common_features.cc b/comp
|
||||
diff --git a/content/browser/frame_host/navigation_throttle_runner.cc b/content/browser/frame_host/navigation_throttle_runner.cc
|
||||
--- a/content/browser/frame_host/navigation_throttle_runner.cc
|
||||
+++ b/content/browser/frame_host/navigation_throttle_runner.cc
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "content/browser/frame_host/ancestor_throttle.h"
|
||||
#include "content/browser/frame_host/blocked_scheme_navigation_throttle.h"
|
||||
#include "content/browser/frame_host/form_submission_throttle.h"
|
||||
-#include "content/browser/frame_host/history_navigation_ablation_study_navigation_throttle.h"
|
||||
#include "content/browser/frame_host/mixed_content_navigation_throttle.h"
|
||||
#include "content/browser/frame_host/navigation_request.h"
|
||||
#include "content/browser/frame_host/navigator_delegate.h"
|
||||
@@ -120,15 +119,6 @@ void NavigationThrottleRunner::RegisterNavigationThrottles() {
|
||||
devtools_instrumentation::CreateNavigationThrottles(handle_)) {
|
||||
@@ -123,11 +123,6 @@ void NavigationThrottleRunner::RegisterNavigationThrottles() {
|
||||
devtools_instrumentation::CreateNavigationThrottles(request)) {
|
||||
AddThrottle(std::move(throttle));
|
||||
}
|
||||
-
|
||||
- // Delay navigation for an ablation study (if needed).
|
||||
- AddThrottle(HistoryNavigationAblationStudyNavigationThrottle::
|
||||
- MaybeCreateForNavigation(handle_));
|
||||
-
|
||||
- // Insert all testing NavigationThrottles last.
|
||||
- throttles_.insert(throttles_.end(),
|
||||
- std::make_move_iterator(testing_throttles.begin()),
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
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
|
||||
---
|
||||
chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
|
||||
.../peerconnection/peer_connection_dependency_factory.cc | 7 ++++---
|
||||
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
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
|
||||
@@ -87,8 +87,8 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
false);
|
||||
#endif
|
||||
// TODO(guoweis): Remove next 2 options at M50.
|
||||
- registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true);
|
||||
- registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, false);
|
||||
+ registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, false);
|
||||
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
|
||||
blink::kWebRTCIPHandlingDefault);
|
||||
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
|
||||
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
|
||||
@@ -421,12 +421,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
|
||||
|
||||
+17
-12
@@ -1,34 +1,39 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 14 Oct 2019 20:27:33 +0200
|
||||
Subject: Revert "[Merge to M78] Enable AImageReader by default."
|
||||
Date: Thu, 20 Feb 2020 22:44:06 +0100
|
||||
Subject: Disable AImageReader for ARM64/P and ARM64/Q
|
||||
|
||||
This reverts commit 60c3d4531b180b911767fb3ea7c3553d7f408c25.
|
||||
---
|
||||
gpu/config/gpu_finch_features.cc | 2 +-
|
||||
media/base/media_switches.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
gpu/config/gpu_finch_features.cc | 4 ++++
|
||||
media/base/media_switches.cc | 4 ++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
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
|
||||
@@ -31,7 +31,7 @@ bool FieldIsInBlacklist(const char* current_value, std::string blacklist_str) {
|
||||
@@ -15,7 +15,11 @@ namespace features {
|
||||
#if defined(OS_ANDROID)
|
||||
// Use android AImageReader when playing videos with MediaPlayer.
|
||||
const base::Feature kAImageReaderMediaPlayer{"AImageReaderMediaPlayer",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+#ifdef ARCH_CPU_ARM64
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+#else
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+#endif
|
||||
|
||||
// Use android SurfaceControl API for managing display compositor's buffer queue
|
||||
// and using overlays on Android.
|
||||
// Used only by webview to disable SurfaceControl.
|
||||
const base::Feature kDisableSurfaceControlForWebview{
|
||||
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
|
||||
@@ -453,7 +453,7 @@ const base::Feature kMediaDrmPreprovisioningAtStartup{
|
||||
@@ -544,7 +544,11 @@ const base::Feature kMediaDrmPreprovisioningAtStartup{
|
||||
|
||||
// Enables the Android Image Reader path for Video decoding(for AVDA and MCVD)
|
||||
const base::Feature kAImageReaderVideoOutput{"AImageReaderVideoOutput",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+#ifdef ARCH_CPU_ARM64
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+#else
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+#endif
|
||||
|
||||
// Prevents using SurfaceLayer for videos. This is meant to be used by embedders
|
||||
// that cannot support SurfaceLayer at the moment.
|
||||
@@ -0,0 +1,23 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Fri, 24 Jan 2020 09:46:48 +0100
|
||||
Subject: Disable DRM media origin IDs preprovisioning
|
||||
|
||||
---
|
||||
media/base/media_switches.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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
|
||||
@@ -533,7 +533,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",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
// Determines if MediaDrmOriginIdManager should attempt to pre-provision origin
|
||||
// IDs at startup (whenever a profile is loaded). Also used by tests that
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -3,10 +3,24 @@ Date: Thu, 12 Oct 2017 08:15:17 +0200
|
||||
Subject: Disable NTP remote suggestions by default
|
||||
|
||||
---
|
||||
components/ntp_snippets/features.cc | 4 ++--
|
||||
.../remote/remote_suggestions_status_service_impl.cc | 4 ++--
|
||||
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/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
|
||||
@@ -19,8 +19,8 @@ const char kEnableSnippets[] = "ntp_snippets.enable";
|
||||
const char kArticlesListVisible[] = "ntp_snippets.list_visible";
|
||||
|
||||
void RegisterFeedSharedProfilePrefs(PrefRegistrySimple* registry) {
|
||||
- registry->RegisterBooleanPref(kEnableSnippets, true);
|
||||
- registry->RegisterBooleanPref(kArticlesListVisible, true);
|
||||
+ registry->RegisterBooleanPref(kEnableSnippets, false);
|
||||
+ registry->RegisterBooleanPref(kArticlesListVisible, false);
|
||||
}
|
||||
|
||||
} // namespace prefs
|
||||
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
|
||||
@@ -28,20 +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};
|
||||
diff --git a/components/ntp_snippets/remote/remote_suggestions_status_service_impl.cc b/components/ntp_snippets/remote/remote_suggestions_status_service_impl.cc
|
||||
--- a/components/ntp_snippets/remote/remote_suggestions_status_service_impl.cc
|
||||
+++ b/components/ntp_snippets/remote/remote_suggestions_status_service_impl.cc
|
||||
@@ -36,8 +36,8 @@ RemoteSuggestionsStatusServiceImpl::~RemoteSuggestionsStatusServiceImpl() =
|
||||
// static
|
||||
void RemoteSuggestionsStatusServiceImpl::RegisterProfilePrefs(
|
||||
PrefRegistrySimple* registry) {
|
||||
- registry->RegisterBooleanPref(prefs::kEnableSnippets, true);
|
||||
- registry->RegisterBooleanPref(prefs::kArticlesListVisible, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kEnableSnippets, false);
|
||||
+ registry->RegisterBooleanPref(prefs::kArticlesListVisible, false);
|
||||
}
|
||||
|
||||
void RemoteSuggestionsStatusServiceImpl::Init(
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -6,13 +6,12 @@ Do not consider Jelly Bean unsupported
|
||||
---
|
||||
.../java/src/org/chromium/chrome/browser/omaha/OmahaBase.java | 2 +-
|
||||
.../org/chromium/chrome/browser/omaha/VersionNumberGetter.java | 2 +-
|
||||
chrome/browser/android/chrome_feature_list.cc | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
|
||||
@@ -136,7 +136,7 @@ public class OmahaBase {
|
||||
@@ -157,7 +157,7 @@ public class OmahaBase {
|
||||
|
||||
/** See {@link #sIsDisabled}. */
|
||||
static boolean isDisabled() {
|
||||
@@ -24,7 +23,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
|
||||
@@ -42,7 +42,7 @@ public class VersionNumberGetter {
|
||||
@@ -43,7 +43,7 @@ public class VersionNumberGetter {
|
||||
private static VersionNumberGetter sInstanceForTests;
|
||||
|
||||
/** If false, OmahaClient will never report that a newer version is available. */
|
||||
@@ -33,18 +32,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNu
|
||||
|
||||
protected VersionNumberGetter() { }
|
||||
|
||||
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/android/chrome_feature_list.cc
|
||||
@@ -458,7 +458,7 @@ const base::Feature kIntentBlockExternalFormRedirectsNoGesture{
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kJellyBeanSupported{"JellyBeanSupported",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kSearchEnginePromoExistingDevice{
|
||||
"SearchEnginePromo.ExistingDevice", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 26 Oct 2017 16:59:03 +0200
|
||||
Subject: Disable WebRTC by default
|
||||
|
||||
---
|
||||
chrome/browser/ui/browser_ui_prefs.cc | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
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
|
||||
@@ -83,10 +83,10 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
false);
|
||||
#endif
|
||||
// TODO(guoweis): Remove next 2 options at M50.
|
||||
- registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true);
|
||||
- registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, false);
|
||||
+ registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, false);
|
||||
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
|
||||
- blink::kWebRTCIPHandlingDefault);
|
||||
+ blink::kWebRTCIPHandlingDisableNonProxiedUdp);
|
||||
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
|
||||
registry->RegisterBooleanPref(prefs::kWebRtcEventLogCollectionAllowed, false);
|
||||
registry->RegisterListPref(prefs::kWebRtcLocalIpsAllowedUrls);
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 19 Dec 2019 21:46:10 +0100
|
||||
Subject: Disable addresses autofill by default
|
||||
|
||||
---
|
||||
.../autofill_assistant/AutofillAssistantPreferencesUtil.java | 2 +-
|
||||
.../autofill_assistant/AutofillAssistantPreferences.java | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
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
|
||||
@@ -25,7 +25,7 @@ class AutofillAssistantPreferencesUtil {
|
||||
/** Checks whether the Autofill Assistant switch preference in settings is on. */
|
||||
static boolean isAutofillAssistantSwitchOn() {
|
||||
return ContextUtils.getAppSharedPreferences().getBoolean(
|
||||
- AutofillAssistantPreferences.PREF_AUTOFILL_ASSISTANT_SWITCH, true);
|
||||
+ AutofillAssistantPreferences.PREF_AUTOFILL_ASSISTANT_SWITCH, false);
|
||||
}
|
||||
|
||||
/** Checks whether the Autofill Assistant onboarding has been accepted. */
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill_assistant/AutofillAssistantPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill_assistant/AutofillAssistantPreferences.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill_assistant/AutofillAssistantPreferences.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill_assistant/AutofillAssistantPreferences.java
|
||||
@@ -48,7 +48,7 @@ public class AutofillAssistantPreferences extends PreferenceFragmentCompat {
|
||||
// (e.g. the switch will say "On" when it is really turned off), so .setChecked() should be
|
||||
// called after .addPreference()
|
||||
autofillAssistantSwitch.setChecked(ContextUtils.getAppSharedPreferences().getBoolean(
|
||||
- PREF_AUTOFILL_ASSISTANT_SWITCH, true));
|
||||
+ PREF_AUTOFILL_ASSISTANT_SWITCH, false));
|
||||
}
|
||||
|
||||
private Context getStyledContext() {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -3,49 +3,32 @@ Date: Tue, 12 Jun 2018 15:09:26 +0200
|
||||
Subject: Disable all promo dialogs
|
||||
|
||||
---
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 30 +------------------
|
||||
1 file changed, 1 insertion(+), 29 deletions(-)
|
||||
.../chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
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
|
||||
@@ -801,35 +801,7 @@ public class ChromeTabbedActivity extends ChromeActivity implements ScreenshotMo
|
||||
try (TraceEvent e = TraceEvent.scoped(
|
||||
"ChromeTabbedActivity.createToolbarButtonInProductHelpController")) {
|
||||
ChromePreferenceManager preferenceManager = ChromePreferenceManager.getInstance();
|
||||
- // Promos can only be shown when we start with ACTION_MAIN intent and
|
||||
- // after FRE is complete. Native initialization can finish before the FRE flow is
|
||||
- // complete, and this will only show promos on the second opportunity. This is
|
||||
- // because the FRE is shown on the first opportunity, and we don't want to show such
|
||||
- // content back to back.
|
||||
- //
|
||||
- // TODO(tedchoc): Unify promo dialog logic as the search engine promo dialog checks
|
||||
- // might not have completed at this point and we could show multiple
|
||||
- // promos.
|
||||
- boolean isShowingPromo = mLocaleManager.hasShownSearchEnginePromoThisSession();
|
||||
- // Promo dialogs in multiwindow mode are broken on some devices:
|
||||
- // http://crbug.com/354696
|
||||
- boolean isLegacyMultiWindow = MultiWindowUtils.getInstance().isLegacyMultiWindow(this);
|
||||
- if (!isShowingPromo && !mIntentWithEffect && FirstRunStatus.getFirstRunFlowComplete()
|
||||
- && preferenceManager.readBoolean(
|
||||
- ChromePreferenceManager.PROMOS_SKIPPED_ON_FIRST_START, false)
|
||||
- && !VrModuleProvider.getDelegate().isInVr()
|
||||
- // VrModuleProvider.getDelegate().isInVr may not return true at this point
|
||||
- // even though Chrome is about to enter VR, so we need to also check whether
|
||||
- // we're launching into VR.
|
||||
- && !VrModuleProvider.getIntentDelegate().isLaunchingIntoVr(this, getIntent())
|
||||
- && !isLegacyMultiWindow) {
|
||||
- isShowingPromo = maybeShowPromo();
|
||||
- } else {
|
||||
- preferenceManager.writeBoolean(
|
||||
- ChromePreferenceManager.PROMOS_SKIPPED_ON_FIRST_START, true);
|
||||
- }
|
||||
-
|
||||
- ToolbarButtonInProductHelpController.create(this, isShowingPromo);
|
||||
+ ToolbarButtonInProductHelpController.create(this, false);
|
||||
}
|
||||
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
|
||||
@@ -307,7 +307,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator implements Native
|
||||
* displayed.
|
||||
*/
|
||||
private boolean triggerPromo(boolean intentWithEffect) {
|
||||
- try (TraceEvent e = TraceEvent.scoped("TabbedRootUiCoordinator.triggerPromo")) {
|
||||
+ /*try (TraceEvent e = TraceEvent.scoped("TabbedRootUiCoordinator.triggerPromo")) {
|
||||
SharedPreferencesManager preferenceManager = SharedPreferencesManager.getInstance();
|
||||
// Promos can only be shown when we start with ACTION_MAIN intent and
|
||||
// after FRE is complete. Native initialization can finish before the FRE flow is
|
||||
@@ -338,8 +338,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator implements Native
|
||||
preferenceManager.writeBoolean(
|
||||
ChromePreferenceKeys.PROMOS_SKIPPED_ON_FIRST_START, true);
|
||||
}
|
||||
- return isShowingPromo;
|
||||
- }
|
||||
+ return isShowingPromo; } */
|
||||
+ return false;
|
||||
}
|
||||
|
||||
private boolean maybeShowPromo() {
|
||||
--
|
||||
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
|
||||
@@ -15,7 +15,7 @@ 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 the Autofill Assistant onboarding has been accepted. */
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
From: Daniel Micay <danielmicay@gmail.com>
|
||||
Date: Wed, 23 Nov 2016 09:26:51 -0500
|
||||
Subject: Disable contextual search by default
|
||||
|
||||
Disable contextual search in preference by default
|
||||
---
|
||||
.../chromium/chrome/browser/preferences/PrefServiceBridge.java | 2 +-
|
||||
chrome/browser/profiles/profile.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
|
||||
@@ -449,7 +449,7 @@ public class PrefServiceBridge {
|
||||
* @return Whether the Contextual Search feature was disabled by the user explicitly.
|
||||
*/
|
||||
public boolean isContextualSearchDisabled() {
|
||||
- return getContextualSearchPreference().equals(CONTEXTUAL_SEARCH_DISABLED);
|
||||
+ return !getContextualSearchPreference().equals(CONTEXTUAL_SEARCH_ENABLED);
|
||||
}
|
||||
|
||||
/**
|
||||
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
|
||||
@@ -154,7 +154,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
#if defined(OS_ANDROID)
|
||||
registry->RegisterStringPref(
|
||||
prefs::kContextualSearchEnabled,
|
||||
- std::string(),
|
||||
+ "false",
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
#endif // defined(OS_ANDROID)
|
||||
registry->RegisterBooleanPref(prefs::kSessionExitedCleanly, true);
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 20 May 2019 23:14:36 +0200
|
||||
Subject: Disable dynamic module loading
|
||||
|
||||
---
|
||||
chrome/android/chrome_java_sources.gni | 13 --------
|
||||
.../browser/customtabs/CustomTabActivity.java | 18 -----------
|
||||
.../CustomTabIntentDataProvider.java | 17 ++---------
|
||||
.../customtabs/CustomTabsConnection.java | 30 -------------------
|
||||
.../CustomTabActivityComponent.java | 4 ---
|
||||
5 files changed, 2 insertions(+), 80 deletions(-)
|
||||
|
||||
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
|
||||
@@ -426,19 +426,6 @@ chrome_java_sources = [
|
||||
"java/src/org/chromium/chrome/browser/customtabs/content/TabCreationMode.java",
|
||||
"java/src/org/chromium/chrome/browser/customtabs/dependency_injection/CustomTabActivityComponent.java",
|
||||
"java/src/org/chromium/chrome/browser/customtabs/dependency_injection/CustomTabActivityModule.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/ActivityDelegate.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/ActivityDelegatePostMessageBackend.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/ActivityHostImpl.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/DynamicModuleConstants.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/DynamicModuleCoordinator.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/DynamicModuleNavigationEventObserver.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/DynamicModulePageLoadObserver.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/DynamicModuleToolbarController.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/ModuleEntryPoint.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/ModuleHostImpl.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/ModuleLoader.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/ModuleMetrics.java",
|
||||
- "java/src/org/chromium/chrome/browser/customtabs/dynamicmodule/ObjectWrapper.java",
|
||||
"java/src/org/chromium/chrome/browser/customtabs/features/CustomTabNavigationBarController.java",
|
||||
"java/src/org/chromium/chrome/browser/customtabs/features/ImmersiveModeController.java",
|
||||
"java/src/org/chromium/chrome/browser/customtabs/features/toolbar/CustomTabBrowserControlsVisibilityDelegate.java",
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
|
||||
@@ -51,7 +51,6 @@ import org.chromium.chrome.browser.customtabs.content.CustomTabIntentHandler.Int
|
||||
import org.chromium.chrome.browser.customtabs.content.TabCreationMode;
|
||||
import org.chromium.chrome.browser.customtabs.dependency_injection.CustomTabActivityComponent;
|
||||
import org.chromium.chrome.browser.customtabs.dependency_injection.CustomTabActivityModule;
|
||||
-import org.chromium.chrome.browser.customtabs.dynamicmodule.DynamicModuleCoordinator;
|
||||
import org.chromium.chrome.browser.customtabs.features.CustomTabNavigationBarController;
|
||||
import org.chromium.chrome.browser.customtabs.features.toolbar.CustomTabToolbarCoordinator;
|
||||
import org.chromium.chrome.browser.dependency_injection.ChromeActivityCommonsModule;
|
||||
@@ -94,9 +93,6 @@ public class CustomTabActivity extends ChromeActivity<CustomTabActivityComponent
|
||||
|
||||
private final CustomTabsConnection mConnection = CustomTabsConnection.getInstance();
|
||||
|
||||
- @Nullable
|
||||
- private DynamicModuleCoordinator mDynamicModuleCoordinator;
|
||||
-
|
||||
private CustomTabTaskDescriptionHelper mTaskDescriptionHelper;
|
||||
|
||||
private CustomTabNightModeStateController mNightModeStateController;
|
||||
@@ -233,12 +229,6 @@ public class CustomTabActivity extends ChromeActivity<CustomTabActivityComponent
|
||||
public void finishNativeInitialization() {
|
||||
if (!mIntentDataProvider.isInfoPage()) FirstRunSignInProcessor.start(this);
|
||||
|
||||
- // Try to initialize dynamic module early to enqueue navigation events
|
||||
- // @see DynamicModuleNavigationEventObserver
|
||||
- if (mIntentDataProvider.isDynamicModuleEnabled()) {
|
||||
- mDynamicModuleCoordinator = getComponent().resolveDynamicModuleCoordinator();
|
||||
- }
|
||||
-
|
||||
mConnection.showSignInToastIfNecessary(mSession, getIntent());
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && useSeparateTask()) {
|
||||
@@ -280,10 +270,6 @@ public class CustomTabActivity extends ChromeActivity<CustomTabActivityComponent
|
||||
WebContents webContents = tab == null ? null : tab.getWebContents();
|
||||
mConnection.resetPostMessageHandlerForSession(
|
||||
mIntentDataProvider.getSession(), webContents);
|
||||
-
|
||||
- if (mDynamicModuleCoordinator != null) {
|
||||
- mDynamicModuleCoordinator.resetPostMessageHandlersForCurrentSession(null);
|
||||
- }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -595,10 +581,6 @@ public class CustomTabActivity extends ChromeActivity<CustomTabActivityComponent
|
||||
if (mIntentDataProvider.isTrustedWebActivity()) {
|
||||
component.resolveTrustedWebActivityCoordinator();
|
||||
}
|
||||
- if (mConnection.shouldHideTopBarOnModuleManagedUrlsForSession(
|
||||
- mIntentDataProvider.getSession())) {
|
||||
- component.resolveDynamicModuleToolbarController();
|
||||
- }
|
||||
|
||||
return component;
|
||||
}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
|
||||
@@ -44,7 +44,6 @@ import org.chromium.chrome.browser.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.ChromeVersionInfo;
|
||||
import org.chromium.chrome.browser.IntentHandler;
|
||||
import org.chromium.chrome.browser.browserservices.BrowserServicesIntentDataProvider;
|
||||
-import org.chromium.chrome.browser.customtabs.dynamicmodule.ModuleMetrics;
|
||||
import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
|
||||
import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
|
||||
import org.chromium.chrome.browser.ui.widget.TintedDrawable;
|
||||
@@ -459,20 +458,8 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
|
||||
// even receive the extras for using the feature.
|
||||
if (componentName == null) return false;
|
||||
|
||||
- if (!ChromeFeatureList.isEnabled(ChromeFeatureList.CCT_MODULE)) {
|
||||
- Log.w(TAG, "The %s feature is disabled.", ChromeFeatureList.CCT_MODULE);
|
||||
- ModuleMetrics.recordLoadResult(ModuleMetrics.LoadResult.FEATURE_DISABLED);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- ExternalAuthUtils authUtils = ChromeApplication.getComponent().resolveExternalAuthUtils();
|
||||
- if (!authUtils.isGoogleSigned(componentName.getPackageName())) {
|
||||
- Log.w(TAG, "The %s package is not Google-signed.", componentName.getPackageName());
|
||||
- ModuleMetrics.recordLoadResult(ModuleMetrics.LoadResult.NOT_GOOGLE_SIGNED);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- return true;
|
||||
+ Log.w(TAG, "The %s feature is disabled.", ChromeFeatureList.CCT_MODULE);
|
||||
+ return false;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
|
||||
@@ -58,8 +58,6 @@ import org.chromium.chrome.browser.browserservices.Origin;
|
||||
import org.chromium.chrome.browser.browserservices.PostMessageHandler;
|
||||
import org.chromium.chrome.browser.browserservices.SessionDataHolder;
|
||||
import org.chromium.chrome.browser.browserservices.SessionHandler;
|
||||
-import org.chromium.chrome.browser.customtabs.dynamicmodule.ModuleLoader;
|
||||
-import org.chromium.chrome.browser.customtabs.dynamicmodule.ModuleMetrics;
|
||||
import org.chromium.chrome.browser.device.DeviceClassManager;
|
||||
import org.chromium.chrome.browser.init.ChainedTasks;
|
||||
import org.chromium.chrome.browser.init.ChromeBrowserInitializer;
|
||||
@@ -218,7 +216,6 @@ public class CustomTabsConnection {
|
||||
|
||||
private volatile ChainedTasks mWarmupTasks;
|
||||
|
||||
- private @Nullable ModuleLoader mModuleLoader;
|
||||
/**
|
||||
* <strong>DO NOT CALL</strong>
|
||||
* Public to be instanciable from {@link ChromeApplication}. This is however
|
||||
@@ -1382,7 +1379,6 @@ public class CustomTabsConnection {
|
||||
if (ChromeApplication.isSevereMemorySignal(level)) {
|
||||
getInstance().mClientManager.cleanupUnusedSessions();
|
||||
}
|
||||
- if (getInstance().mModuleLoader != null) getInstance().mModuleLoader.onTrimMemory(level);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -1519,32 +1515,6 @@ public class CustomTabsConnection {
|
||||
recordSpeculationStatusOnSwap(SPECULATION_STATUS_ON_SWAP_BACKGROUND_TAB_NOT_MATCHED);
|
||||
}
|
||||
|
||||
- public ModuleLoader getModuleLoader(ComponentName componentName, @Nullable String assetName) {
|
||||
- if (!ChromeFeatureList.isEnabled(ChromeFeatureList.CCT_MODULE_DEX_LOADING)) {
|
||||
- assetName = null;
|
||||
- }
|
||||
-
|
||||
- if (mModuleLoader != null) {
|
||||
- boolean isComponentNameChanged =
|
||||
- !componentName.equals(mModuleLoader.getComponentName());
|
||||
- boolean isAssetNameChanged =
|
||||
- !TextUtils.equals(assetName, mModuleLoader.getDexAssetName());
|
||||
- ModuleLoader.ModuleApkVersion newModuleApkVersion =
|
||||
- ModuleLoader.ModuleApkVersion.getModuleVersion(componentName.getPackageName());
|
||||
- boolean isModuleVersionChanged =
|
||||
- !mModuleLoader.getModuleApkVersion().equals(newModuleApkVersion);
|
||||
-
|
||||
- if (isComponentNameChanged || isAssetNameChanged || isModuleVersionChanged) {
|
||||
- mModuleLoader.destroyModule(ModuleMetrics.DestructionReason.MODULE_LOADER_CHANGED);
|
||||
- mModuleLoader = null;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (mModuleLoader == null) mModuleLoader = new ModuleLoader(componentName, assetName);
|
||||
-
|
||||
- return mModuleLoader;
|
||||
- }
|
||||
-
|
||||
@CalledByNative
|
||||
public static void notifyClientOfDetachedRequestCompletion(
|
||||
CustomTabsSessionToken session, String url, int status) {
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/dependency_injection/CustomTabActivityComponent.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/dependency_injection/CustomTabActivityComponent.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/dependency_injection/CustomTabActivityComponent.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/dependency_injection/CustomTabActivityComponent.java
|
||||
@@ -18,8 +18,6 @@ import org.chromium.chrome.browser.customtabs.content.CustomTabActivityTabContro
|
||||
import org.chromium.chrome.browser.customtabs.content.CustomTabActivityTabFactory;
|
||||
import org.chromium.chrome.browser.customtabs.content.CustomTabActivityTabProvider;
|
||||
import org.chromium.chrome.browser.customtabs.content.CustomTabIntentHandler;
|
||||
-import org.chromium.chrome.browser.customtabs.dynamicmodule.DynamicModuleCoordinator;
|
||||
-import org.chromium.chrome.browser.customtabs.dynamicmodule.DynamicModuleToolbarController;
|
||||
import org.chromium.chrome.browser.customtabs.features.ImmersiveModeController;
|
||||
import org.chromium.chrome.browser.customtabs.features.toolbar.CustomTabToolbarCoordinator;
|
||||
import org.chromium.chrome.browser.dependency_injection.ActivityScope;
|
||||
@@ -36,8 +34,6 @@ import dagger.Subcomponent;
|
||||
@ActivityScope
|
||||
public interface CustomTabActivityComponent extends ChromeActivityComponent {
|
||||
TrustedWebActivityCoordinator resolveTrustedWebActivityCoordinator();
|
||||
- DynamicModuleToolbarController resolveDynamicModuleToolbarController();
|
||||
- DynamicModuleCoordinator resolveDynamicModuleCoordinator();
|
||||
|
||||
CustomTabBottomBarDelegate resolveBottomBarDelegate();
|
||||
CustomTabActivityTabController resolveTabController();
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 19 Dec 2019 22:52:53 +0100
|
||||
Subject: Disable feeds support by default
|
||||
|
||||
---
|
||||
components/feed/feed_feature_list.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc
|
||||
--- a/components/feed/feed_feature_list.cc
|
||||
+++ b/components/feed/feed_feature_list.cc
|
||||
@@ -7,7 +7,7 @@
|
||||
namespace feed {
|
||||
|
||||
const base::Feature kInterestFeedContentSuggestions{
|
||||
- "InterestFeedContentSuggestions", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ "InterestFeedContentSuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
// InterestFeedV2 takes precedence over InterestFeedContentSuggestions.
|
||||
const base::Feature kInterestFeedV2{"InterestFeedV2",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -3,53 +3,64 @@ Date: Sun, 8 Jul 2018 18:16:34 +0200
|
||||
Subject: Disable fetching of all field trials
|
||||
|
||||
---
|
||||
.../chrome/browser/ChromeFeatureList.java | 15 +++------------
|
||||
.../variations/service/variations_service.cc | 12 +-----------
|
||||
2 files changed, 4 insertions(+), 23 deletions(-)
|
||||
.../browser/flags/ChromeFeatureList.java | 19 ++++---------------
|
||||
.../variations/service/variations_service.cc | 12 +-----------
|
||||
2 files changed, 5 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
|
||||
@@ -107,10 +107,7 @@ public abstract class ChromeFeatureList {
|
||||
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
|
||||
@@ -122,9 +122,7 @@ public abstract class ChromeFeatureList {
|
||||
* the specified parameter does not exist.
|
||||
*/
|
||||
public static String getFieldTrialParamByFeature(String featureName, String paramName) {
|
||||
- if (FeatureList.hasTestFeatures()) return "";
|
||||
- assert FeatureList.isInitialized();
|
||||
- return ChromeFeatureListJni.get().getFieldTrialParamByFeature(featureName, paramName);
|
||||
+ return "";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,10 +139,7 @@ public abstract class ChromeFeatureList {
|
||||
*/
|
||||
public static int getFieldTrialParamByFeatureAsInt(
|
||||
String featureName, String paramName, int defaultValue) {
|
||||
- if (sTestFeatures != null) return defaultValue;
|
||||
- assert isInitialized();
|
||||
- if (FeatureList.hasTestFeatures()) return defaultValue;
|
||||
- assert FeatureList.isInitialized();
|
||||
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsInt(
|
||||
- featureName, paramName, defaultValue);
|
||||
+ return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,10 +124,7 @@ public abstract class ChromeFeatureList {
|
||||
@@ -161,10 +156,7 @@ public abstract class ChromeFeatureList {
|
||||
*/
|
||||
public static double getFieldTrialParamByFeatureAsDouble(
|
||||
String featureName, String paramName, double defaultValue) {
|
||||
- if (sTestFeatures != null) return defaultValue;
|
||||
- assert isInitialized();
|
||||
- if (FeatureList.hasTestFeatures()) return defaultValue;
|
||||
- assert FeatureList.isInitialized();
|
||||
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsDouble(
|
||||
- featureName, paramName, defaultValue);
|
||||
+ return defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -147,10 +141,7 @@ public abstract class ChromeFeatureList {
|
||||
@@ -181,10 +173,7 @@ public abstract class ChromeFeatureList {
|
||||
*/
|
||||
public static boolean getFieldTrialParamByFeatureAsBoolean(
|
||||
String featureName, String paramName, boolean defaultValue) {
|
||||
- if (sTestFeatures != null) return defaultValue;
|
||||
- assert isInitialized();
|
||||
- if (FeatureList.hasTestFeatures()) return defaultValue;
|
||||
- assert FeatureList.isInitialized();
|
||||
- return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsBoolean(
|
||||
- featureName, paramName, defaultValue);
|
||||
+ return defaultValue;
|
||||
}
|
||||
|
||||
// Alphabetical:
|
||||
/** Alphabetical: */
|
||||
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
|
||||
@@ -241,17 +241,7 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers,
|
||||
@@ -243,17 +243,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() {
|
||||
|
||||
@@ -11,7 +11,7 @@ Subject: Disable media router and remoting by default
|
||||
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
|
||||
@@ -57,17 +57,16 @@ const PrefService::Preference* GetMediaRouterPref(
|
||||
@@ -50,17 +50,16 @@ const PrefService::Preference* GetMediaRouterPref(
|
||||
|
||||
bool MediaRouterEnabled(content::BrowserContext* context) {
|
||||
#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@@ -40,7 +40,7 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse
|
||||
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
|
||||
@@ -232,7 +232,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -345,7 +345,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
prefs::kMediaRouterFirstRunFlowAcknowledged,
|
||||
false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
@@ -52,9 +52,9 @@ diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profil
|
||||
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
|
||||
@@ -422,7 +422,7 @@ void ProfileImpl::RegisterProfilePrefs(
|
||||
registry->RegisterStringPref(
|
||||
prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string());
|
||||
@@ -412,7 +412,7 @@ void ProfileImpl::RegisterProfilePrefs(
|
||||
#endif
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
|
||||
- registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kEnableMediaRouter, false);
|
||||
|
||||
@@ -3,9 +3,9 @@ Date: Wed, 20 Feb 2019 21:41:26 +0100
|
||||
Subject: Disable metrics collection for NTP tiles
|
||||
|
||||
---
|
||||
.../android/ntp/most_visited_sites_bridge.cc | 21 -------------------
|
||||
components/ntp_tiles/BUILD.gn | 3 ---
|
||||
2 files changed, 24 deletions(-)
|
||||
.../browser/android/ntp/most_visited_sites_bridge.cc | 11 ++---------
|
||||
components/ntp_tiles/BUILD.gn | 3 ---
|
||||
2 files changed, 2 insertions(+), 12 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
|
||||
@@ -17,8 +17,8 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
|
||||
-#include "components/ntp_tiles/metrics.h"
|
||||
#include "components/ntp_tiles/most_visited_sites.h"
|
||||
#include "components/ntp_tiles/section_type.h"
|
||||
#include "components/rappor/rappor_service_impl.h"
|
||||
@@ -45,7 +44,6 @@ using ntp_tiles::NTPTilesVector;
|
||||
#include "ui/gfx/android/java_bitmap.h"
|
||||
@@ -44,7 +43,6 @@ using ntp_tiles::NTPTilesVector;
|
||||
using ntp_tiles::SectionType;
|
||||
using ntp_tiles::TileTitleSource;
|
||||
using ntp_tiles::TileSource;
|
||||
@@ -26,7 +26,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -236,7 +234,6 @@ void MostVisitedSitesBridge::RecordPageImpression(
|
||||
@@ -235,7 +233,6 @@ void MostVisitedSitesBridge::RecordPageImpression(
|
||||
JNIEnv* env,
|
||||
const JavaParamRef<jobject>& obj,
|
||||
jint jtiles_count) {
|
||||
@@ -34,26 +34,23 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
|
||||
}
|
||||
|
||||
void MostVisitedSitesBridge::RecordTileImpression(
|
||||
@@ -249,18 +246,6 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
@@ -248,6 +245,7 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
jint jsource,
|
||||
jlong jdata_generation_time_ms,
|
||||
const JavaParamRef<jstring>& jurl) {
|
||||
- GURL url(ConvertJavaStringToUTF8(env, jurl));
|
||||
- TileTitleSource title_source = static_cast<TileTitleSource>(jtitle_source);
|
||||
- TileSource source = static_cast<TileSource>(jsource);
|
||||
- TileVisualType visual_type = static_cast<TileVisualType>(jvisual_type);
|
||||
- favicon_base::IconType icon_type =
|
||||
- static_cast<favicon_base::IconType>(jicon_type);
|
||||
-
|
||||
- ntp_tiles::metrics::RecordTileImpression(
|
||||
- ntp_tiles::NTPTileImpression(
|
||||
- jindex, source, title_source, visual_type, icon_type,
|
||||
- base::Time::FromJavaTime(jdata_generation_time_ms), url),
|
||||
- g_browser_process->rappor_service());
|
||||
+#if 0
|
||||
GURL url(ConvertJavaStringToUTF8(env, jurl));
|
||||
TileTitleSource title_source = static_cast<TileTitleSource>(jtitle_source);
|
||||
TileSource source = static_cast<TileSource>(jsource);
|
||||
@@ -258,6 +256,7 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
ntp_tiles::metrics::RecordTileImpression(ntp_tiles::NTPTileImpression(
|
||||
jindex, source, title_source, visual_type, icon_type,
|
||||
base::Time::FromJavaTime(jdata_generation_time_ms), url));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
@@ -271,12 +256,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
@@ -268,12 +267,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
jint title_source,
|
||||
jint source,
|
||||
jlong jdata_generation_time_ms) {
|
||||
@@ -78,7 +75,7 @@ diff --git a/components/ntp_tiles/BUILD.gn b/components/ntp_tiles/BUILD.gn
|
||||
"most_visited_sites.cc",
|
||||
"most_visited_sites.h",
|
||||
"ntp_tile.cc",
|
||||
@@ -78,7 +76,6 @@ source_set("unit_tests") {
|
||||
@@ -79,7 +77,6 @@ source_set("unit_tests") {
|
||||
"custom_links_manager_impl_unittest.cc",
|
||||
"custom_links_store_unittest.cc",
|
||||
"icon_cacher_impl_unittest.cc",
|
||||
|
||||
@@ -10,7 +10,7 @@ Subject: Disable metrics on all I/O threads
|
||||
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
|
||||
@@ -905,7 +905,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
@@ -944,7 +944,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
|
||||
registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled,
|
||||
@@ -22,7 +22,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
|
||||
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
|
||||
--- a/chrome/browser/profiles/profile_io_data.cc
|
||||
+++ b/chrome/browser/profiles/profile_io_data.cc
|
||||
@@ -47,8 +47,6 @@
|
||||
@@ -45,8 +45,6 @@
|
||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||
#include "components/cookie_config/cookie_store_util.h"
|
||||
#include "components/dom_distiller/core/url_constants.h"
|
||||
|
||||
@@ -11,7 +11,7 @@ a corresponding user option to individually disable their usage.
|
||||
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
|
||||
@@ -433,13 +433,13 @@ bool IDNToUnicodeOneComponent(const base::char16* comp,
|
||||
@@ -479,13 +479,13 @@ ComponentResult IDNToUnicodeOneComponent(
|
||||
} // namespace
|
||||
|
||||
const FormatUrlType kFormatUrlOmitNothing = 0;
|
||||
|
||||
@@ -3,21 +3,115 @@ Date: Sun, 15 Dec 2019 22:39:56 +0100
|
||||
Subject: Disable password reuse detection on android
|
||||
|
||||
---
|
||||
components/password_manager/core/browser/BUILD.gn | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
.../android/password_reuse_controller_android.cc | 12 ++++++++++++
|
||||
.../password_reuse_dialog_view_android.cc | 11 +++++++++--
|
||||
components/password_manager/core/browser/BUILD.gn | 6 +++---
|
||||
3 files changed, 24 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/safe_browsing/android/password_reuse_controller_android.cc b/chrome/browser/safe_browsing/android/password_reuse_controller_android.cc
|
||||
--- a/chrome/browser/safe_browsing/android/password_reuse_controller_android.cc
|
||||
+++ b/chrome/browser/safe_browsing/android/password_reuse_controller_android.cc
|
||||
@@ -17,17 +17,25 @@ PasswordReuseControllerAndroid::PasswordReuseControllerAndroid(
|
||||
ChromePasswordProtectionService* service,
|
||||
ReusedPasswordAccountType password_type,
|
||||
OnWarningDone done_callback)
|
||||
+#if defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED)
|
||||
: service_(service),
|
||||
+#else
|
||||
+ :
|
||||
+#endif
|
||||
url_(web_contents->GetLastCommittedURL()),
|
||||
password_type_(password_type),
|
||||
window_android_(web_contents->GetTopLevelNativeWindow()),
|
||||
done_callback_(std::move(done_callback)) {
|
||||
modal_construction_start_time_ = base::TimeTicks::Now();
|
||||
+#if defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED)
|
||||
service_->AddObserver(this);
|
||||
+#endif
|
||||
}
|
||||
|
||||
PasswordReuseControllerAndroid::~PasswordReuseControllerAndroid() {
|
||||
+#if defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED)
|
||||
service_->RemoveObserver(this);
|
||||
+#endif
|
||||
dialog_view_.reset();
|
||||
LogModalWarningDialogLifetime(modal_construction_start_time_);
|
||||
}
|
||||
@@ -48,20 +56,24 @@ base::string16 PasswordReuseControllerAndroid::GetButtonText() const {
|
||||
return l10n_util::GetStringUTF16(IDS_CLOSE);
|
||||
}
|
||||
|
||||
+#if defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED)
|
||||
base::string16 PasswordReuseControllerAndroid::GetWarningDetailText(
|
||||
std::vector<size_t>* placeholder_offsets) const {
|
||||
return service_->GetWarningDetailText(password_type_, placeholder_offsets);
|
||||
}
|
||||
+#endif
|
||||
|
||||
base::string16 PasswordReuseControllerAndroid::GetTitle() const {
|
||||
return l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHANGE_PASSWORD_SUMMARY);
|
||||
}
|
||||
|
||||
+#if defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED)
|
||||
const std::vector<base::string16>
|
||||
PasswordReuseControllerAndroid::GetPlaceholdersForSavedPasswordWarningText()
|
||||
const {
|
||||
return service_->GetPlaceholdersForSavedPasswordWarningText();
|
||||
}
|
||||
+#endif
|
||||
|
||||
void PasswordReuseControllerAndroid::OnGaiaPasswordChanged() {
|
||||
delete this;
|
||||
diff --git a/chrome/browser/ui/android/safe_browsing/password_reuse_dialog_view_android.cc b/chrome/browser/ui/android/safe_browsing/password_reuse_dialog_view_android.cc
|
||||
--- a/chrome/browser/ui/android/safe_browsing/password_reuse_dialog_view_android.cc
|
||||
+++ b/chrome/browser/ui/android/safe_browsing/password_reuse_dialog_view_android.cc
|
||||
@@ -29,6 +29,7 @@ void PasswordReuseDialogViewAndroid::Show(ui::WindowAndroid* window_android) {
|
||||
java_object_.Reset(Java_SafeBrowsingPasswordReuseDialogBridge_create(
|
||||
env, window_android->GetJavaObject(), reinterpret_cast<intptr_t>(this)));
|
||||
|
||||
+#if defined(SYNC_PASSWORD_REUSE_WARNING_ENABLED)
|
||||
std::vector<size_t> placeholder_offsets;
|
||||
base::string16 warning_detail_text =
|
||||
controller_->GetWarningDetailText(&placeholder_offsets);
|
||||
@@ -50,14 +51,20 @@ void PasswordReuseDialogViewAndroid::Show(ui::WindowAndroid* window_android) {
|
||||
base::android::ToJavaIntArray(env, start_ranges, len);
|
||||
base::android::ScopedJavaLocalRef<jintArray> j_end_ranges =
|
||||
base::android::ToJavaIntArray(env, end_ranges, len);
|
||||
-
|
||||
+#else
|
||||
+ int start_ranges[0], end_ranges[0];
|
||||
+ base::android::ScopedJavaLocalRef<jintArray> j_start_ranges =
|
||||
+ base::android::ToJavaIntArray(env, start_ranges, 0);
|
||||
+ base::android::ScopedJavaLocalRef<jintArray> j_end_ranges =
|
||||
+ base::android::ToJavaIntArray(env, end_ranges, 0);
|
||||
Java_SafeBrowsingPasswordReuseDialogBridge_showDialog(
|
||||
env, java_object_,
|
||||
base::android::ConvertUTF16ToJavaString(env, controller_->GetTitle()),
|
||||
- base::android::ConvertUTF16ToJavaString(env, warning_detail_text),
|
||||
+ base::android::ConvertUTF16ToJavaString(env, controller_->GetTitle()),
|
||||
base::android::ConvertUTF16ToJavaString(env,
|
||||
controller_->GetButtonText()),
|
||||
j_start_ranges, j_end_ranges);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void PasswordReuseDialogViewAndroid::Close(
|
||||
diff --git a/components/password_manager/core/browser/BUILD.gn b/components/password_manager/core/browser/BUILD.gn
|
||||
--- a/components/password_manager/core/browser/BUILD.gn
|
||||
+++ b/components/password_manager/core/browser/BUILD.gn
|
||||
@@ -12,7 +12,7 @@ if (is_android) {
|
||||
@@ -12,9 +12,9 @@ if (is_android) {
|
||||
|
||||
# TODO(crbug.com/1006430): Fix password reuse detection not fully functional on
|
||||
# Android.
|
||||
-password_reuse_detection_support = !is_ios
|
||||
-password_reuse_warning_support = !is_ios
|
||||
-password_on_focus_ping_support = !is_ios
|
||||
+password_reuse_detection_support = !is_ios && !is_android
|
||||
password_reuse_warning_support = !is_android && !is_ios
|
||||
password_on_focus_ping_support = !is_android && !is_ios
|
||||
+password_reuse_warning_support = !is_ios && !is_android
|
||||
+password_on_focus_ping_support = !is_ios && !is_android
|
||||
|
||||
config("password_reuse_detection_config") {
|
||||
defines = []
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: Disable plugins enumeration
|
||||
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
|
||||
@@ -1169,10 +1169,8 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
|
||||
@@ -1482,10 +1482,8 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
|
||||
}
|
||||
|
||||
PluginData* LocalFrame::GetPluginData() const {
|
||||
|
||||
@@ -5,14 +5,25 @@ Subject: Disable promos displayed in bookmarks manager
|
||||
Remove personalized signin promo view from
|
||||
bookmarks, never reach signin thresholds.
|
||||
---
|
||||
...rsonalized_signin_promo_view_bookmarks.xml | 30 -----------
|
||||
.../bookmarks/BookmarkItemsAdapter.java | 23 +-------
|
||||
.../bookmarks/BookmarkPromoHeader.java | 54 +------------------
|
||||
.../ReorderBookmarkItemsAdapter.java | 19 +------
|
||||
.../browser/signin/SigninPromoController.java | 19 +------
|
||||
5 files changed, 7 insertions(+), 138 deletions(-)
|
||||
chrome/android/chrome_java_resources.gni | 1 -
|
||||
...rsonalized_signin_promo_view_bookmarks.xml | 30 -----
|
||||
.../bookmarks/BookmarkItemsAdapter.java | 30 +----
|
||||
.../bookmarks/BookmarkPromoHeader.java | 125 +-----------------
|
||||
.../browser/signin/SigninPromoController.java | 19 +--
|
||||
5 files changed, 5 insertions(+), 200 deletions(-)
|
||||
delete mode 100644 chrome/android/java/res/layout/personalized_signin_promo_view_bookmarks.xml
|
||||
|
||||
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
|
||||
@@ -977,7 +977,6 @@ chrome_java_resources = [
|
||||
"java/res/layout/payment_request_spinny.xml",
|
||||
"java/res/layout/payments_request_editor_textview.xml",
|
||||
"java/res/layout/personalized_signin_promo_view_body.xml",
|
||||
- "java/res/layout/personalized_signin_promo_view_bookmarks.xml",
|
||||
"java/res/layout/personalized_signin_promo_view_header.xml",
|
||||
"java/res/layout/personalized_signin_promo_view_modern_content_suggestions.xml",
|
||||
"java/res/layout/personalized_signin_promo_view_recent_tabs.xml",
|
||||
diff --git a/chrome/android/java/res/layout/personalized_signin_promo_view_bookmarks.xml b/chrome/android/java/res/layout/personalized_signin_promo_view_bookmarks.xml
|
||||
deleted file mode 100644
|
||||
--- a/chrome/android/java/res/layout/personalized_signin_promo_view_bookmarks.xml
|
||||
@@ -33,14 +44,14 @@ deleted file mode 100644
|
||||
- android:gravity="center_horizontal"
|
||||
- android:orientation="vertical"
|
||||
- android:paddingBottom="12dp"
|
||||
- android:paddingTop="14dp">
|
||||
- android:paddingTop="14dp"
|
||||
- android:paddingStart="16dp"
|
||||
- android:paddingEnd="16dp">
|
||||
-
|
||||
- <FrameLayout
|
||||
- android:layout_width="match_parent"
|
||||
- android:layout_height="wrap_content"
|
||||
- android:layout_marginBottom="12dp"
|
||||
- android:layout_marginEnd="12dp"
|
||||
- android:layout_marginStart="12dp">
|
||||
- android:layout_marginBottom="12dp">
|
||||
-
|
||||
- <include layout="@layout/personalized_signin_promo_view_header"/>
|
||||
- </FrameLayout>
|
||||
@@ -52,91 +63,159 @@ deleted file mode 100644
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java
|
||||
@@ -60,7 +60,6 @@ class BookmarkItemsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem;
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkModelObserver;
|
||||
import org.chromium.chrome.browser.bookmarks.BookmarkRow.Location;
|
||||
-import org.chromium.chrome.browser.signin.PersonalizedSigninPromoView;
|
||||
import org.chromium.chrome.browser.sync.ProfileSyncService;
|
||||
import org.chromium.components.bookmarks.BookmarkId;
|
||||
import org.chromium.components.bookmarks.BookmarkType;
|
||||
@@ -63,7 +62,6 @@ class BookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkItem>
|
||||
// ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.SYNC_PROMO, or ViewType.INVALID_PROMO
|
||||
private int mPromoHeaderType = ViewType.INVALID_PROMO;
|
||||
private BookmarkDelegate mDelegate;
|
||||
private Context mContext;
|
||||
- private BookmarkPromoHeader mPromoHeaderManager;
|
||||
private String mSearchText;
|
||||
private BookmarkId mCurrentFolder;
|
||||
|
||||
@@ -219,9 +218,9 @@ class BookmarkItemsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
|
||||
switch (viewType) {
|
||||
private ProfileSyncService mProfileSyncService;
|
||||
@@ -190,9 +188,9 @@ class BookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkItem>
|
||||
case ViewType.PERSONALIZED_SIGNIN_PROMO:
|
||||
- return mPromoHeaderManager.createPersonalizedSigninPromoHolder(parent);
|
||||
// fall through
|
||||
case ViewType.PERSONALIZED_SYNC_PROMO:
|
||||
- return mPromoHeaderManager.createPersonalizedSigninAndSyncPromoHolder(parent);
|
||||
+ return null;
|
||||
case ViewType.SYNC_PROMO:
|
||||
- return mPromoHeaderManager.createSyncPromoHolder(parent);
|
||||
+ return null;
|
||||
case ViewType.FOLDER:
|
||||
BookmarkFolderRow folder = (BookmarkFolderRow) LayoutInflater.from(
|
||||
parent.getContext()).inflate(R.layout.bookmark_folder_row, parent, false);
|
||||
@@ -242,8 +241,6 @@ class BookmarkItemsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
return createViewHolderHelper(parent, R.layout.bookmark_folder_row);
|
||||
case ViewType.BOOKMARK:
|
||||
@@ -206,11 +204,7 @@ class BookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkItem>
|
||||
@Override
|
||||
public void onBindViewHolder(ViewHolder holder, int position) {
|
||||
switch (holder.getItemViewType()) {
|
||||
case ViewType.PERSONALIZED_SIGNIN_PROMO:
|
||||
- PersonalizedSigninPromoView view = (PersonalizedSigninPromoView) holder.itemView;
|
||||
- mPromoHeaderManager.setupPersonalizedSigninPromo(view);
|
||||
break;
|
||||
case ViewType.SYNC_PROMO:
|
||||
break;
|
||||
@@ -262,7 +259,6 @@ class BookmarkItemsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
public void onViewRecycled(ViewHolder holder) {
|
||||
switch (holder.getItemViewType()) {
|
||||
if (holder.getItemViewType() == ViewType.PERSONALIZED_SIGNIN_PROMO) {
|
||||
- PersonalizedSigninPromoView view = (PersonalizedSigninPromoView) holder.itemView;
|
||||
- mPromoHeaderManager.setupPersonalizedSigninPromo(view);
|
||||
} else if (holder.getItemViewType() == ViewType.PERSONALIZED_SYNC_PROMO) {
|
||||
- PersonalizedSigninPromoView view = (PersonalizedSigninPromoView) holder.itemView;
|
||||
- mPromoHeaderManager.setupPersonalizedSyncPromo(view);
|
||||
} else if (!(holder.getItemViewType() == ViewType.SYNC_PROMO)) {
|
||||
BookmarkRow row = ((BookmarkRow) holder.itemView);
|
||||
BookmarkId id = getIdByPosition(position);
|
||||
@@ -239,7 +233,6 @@ class BookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkItem>
|
||||
case ViewType.PERSONALIZED_SIGNIN_PROMO:
|
||||
// fall through
|
||||
case ViewType.PERSONALIZED_SYNC_PROMO:
|
||||
- mPromoHeaderManager.detachPersonalizePromoView();
|
||||
break;
|
||||
default:
|
||||
// Other view holders don't have special recycling code.
|
||||
@@ -298,7 +294,6 @@ class BookmarkItemsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
}
|
||||
@@ -265,7 +258,6 @@ class BookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkItem>
|
||||
updateHeader(!topLevelFoldersShowing());
|
||||
};
|
||||
|
||||
- mPromoHeaderManager = new BookmarkPromoHeader(mContext, promoHeaderChangeAction);
|
||||
populateTopLevelFoldersList();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
@@ -309,7 +304,6 @@ class BookmarkItemsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
mDelegate.removeUIObserver(this);
|
||||
|
||||
mElements = new ArrayList<>();
|
||||
@@ -281,7 +273,6 @@ class BookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkItem>
|
||||
mDelegate.getModel().removeObserver(mBookmarkModelObserver);
|
||||
mDelegate.getSelectionDelegate().removeObserver(this);
|
||||
mDelegate = null;
|
||||
- mPromoHeaderManager.destroy();
|
||||
mProfileSyncService.removeSyncStateChangedListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -389,19 +383,6 @@ class BookmarkItemsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
if (currentUIState == BookmarkUIState.STATE_SEARCHING) return;
|
||||
@@ -407,23 +398,6 @@ class BookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkItem>
|
||||
return;
|
||||
} else if (currentUIState == BookmarkUIState.STATE_SEARCHING) {
|
||||
mPromoHeaderType = ViewType.INVALID_PROMO;
|
||||
- } else {
|
||||
- switch (mPromoHeaderManager.getPromoState()) {
|
||||
- case BookmarkPromoHeader.PromoState.PROMO_NONE:
|
||||
- mPromoHeaderType = ViewType.INVALID_PROMO;
|
||||
- break;
|
||||
- case BookmarkPromoHeader.PromoState.PROMO_SIGNIN_PERSONALIZED:
|
||||
- mPromoHeaderType = ViewType.PERSONALIZED_SIGNIN_PROMO;
|
||||
- break;
|
||||
- case BookmarkPromoHeader.PromoState.PROMO_SYNC_PERSONALIZED:
|
||||
- mPromoHeaderType = ViewType.PERSONALIZED_SYNC_PROMO;
|
||||
- break;
|
||||
- case BookmarkPromoHeader.PromoState.PROMO_SYNC:
|
||||
- mPromoHeaderType = ViewType.SYNC_PROMO;
|
||||
- break;
|
||||
- default:
|
||||
- assert false : "Unexpected value for promo state!";
|
||||
- }
|
||||
}
|
||||
|
||||
assert currentUIState == BookmarkUIState.STATE_FOLDER : "Unexpected UI state";
|
||||
-
|
||||
- switch (mPromoHeaderManager.getPromoState()) {
|
||||
- case BookmarkPromoHeader.PromoState.PROMO_NONE:
|
||||
- return;
|
||||
- case BookmarkPromoHeader.PromoState.PROMO_SIGNIN_PERSONALIZED:
|
||||
- mPromoHeaderSection.add(ViewType.PERSONALIZED_SIGNIN_PROMO);
|
||||
- return;
|
||||
- case BookmarkPromoHeader.PromoState.PROMO_SYNC:
|
||||
- mPromoHeaderSection.add(ViewType.SYNC_PROMO);
|
||||
- return;
|
||||
- default:
|
||||
- assert false : "Unexpected value for promo state!";
|
||||
- }
|
||||
}
|
||||
|
||||
private void populateTopLevelFoldersList() {
|
||||
boolean willShowPromo = hasPromoHeader();
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java
|
||||
@@ -19,7 +19,6 @@ import org.chromium.base.ContextUtils;
|
||||
import org.chromium.base.VisibleForTesting;
|
||||
import org.chromium.chrome.R;
|
||||
@@ -21,15 +21,9 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.preferences.ChromePreferenceKeys;
|
||||
import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
|
||||
import org.chromium.chrome.browser.signin.IdentityServicesProvider;
|
||||
-import org.chromium.chrome.browser.signin.PersonalizedSigninPromoView;
|
||||
import org.chromium.chrome.browser.signin.ProfileDataCache;
|
||||
import org.chromium.chrome.browser.signin.SigninManager;
|
||||
import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver;
|
||||
@@ -132,19 +131,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
-import org.chromium.chrome.browser.signin.SigninManager;
|
||||
-import org.chromium.chrome.browser.signin.SigninManager.SignInStateObserver;
|
||||
import org.chromium.chrome.browser.signin.SigninPromoController;
|
||||
-import org.chromium.chrome.browser.signin.SigninPromoUtil;
|
||||
import org.chromium.chrome.browser.signin.SyncPromoView;
|
||||
-import org.chromium.chrome.browser.sync.AndroidSyncSettings;
|
||||
-import org.chromium.chrome.browser.sync.AndroidSyncSettings.AndroidSyncSettingsObserver;
|
||||
import org.chromium.components.signin.AccountManagerFacadeProvider;
|
||||
import org.chromium.components.signin.AccountsChangeObserver;
|
||||
import org.chromium.components.signin.base.CoreAccountInfo;
|
||||
@@ -44,7 +38,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||
* Class that manages all the logic and UI behind the signin promo header in the bookmark
|
||||
* content UI. The header is shown only on certain situations, (e.g., not signed in).
|
||||
*/
|
||||
-class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObserver,
|
||||
+class BookmarkPromoHeader implements
|
||||
ProfileDataCache.Observer, AccountsChangeObserver {
|
||||
/**
|
||||
* Specifies the various states in which the Bookmarks promo can be.
|
||||
@@ -65,7 +59,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
private static @Nullable @PromoState Integer sPromoStateForTests;
|
||||
|
||||
private final Context mContext;
|
||||
- private final SigninManager mSignInManager;
|
||||
private final Runnable mPromoHeaderChangeAction;
|
||||
|
||||
private @Nullable ProfileDataCache mProfileDataCache;
|
||||
@@ -80,11 +73,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
mContext = context;
|
||||
mPromoHeaderChangeAction = promoHeaderChangeAction;
|
||||
|
||||
- AndroidSyncSettings.get().registerObserver(this);
|
||||
-
|
||||
- mSignInManager = IdentityServicesProvider.get().getSigninManager();
|
||||
- mSignInManager.addSignInStateObserver(this);
|
||||
-
|
||||
mPromoState = calculatePromoState();
|
||||
if (mPromoState == PromoState.PROMO_SYNC) {
|
||||
SharedPreferencesManager.getInstance().incrementInt(
|
||||
@@ -110,15 +98,11 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
* Clean ups the class. Must be called once done using this class.
|
||||
*/
|
||||
void destroy() {
|
||||
- AndroidSyncSettings.get().unregisterObserver(this);
|
||||
-
|
||||
if (mSigninPromoController != null) {
|
||||
AccountManagerFacadeProvider.getInstance().removeObserver(this);
|
||||
mProfileDataCache.removeObserver(this);
|
||||
mSigninPromoController.onPromoDestroyed();
|
||||
}
|
||||
-
|
||||
- mSignInManager.removeSignInStateObserver(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,18 +113,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
return mPromoState;
|
||||
}
|
||||
|
||||
@@ -144,8 +223,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
- * @return Personalized signin promo header {@link ViewHolder} instance that can be used with
|
||||
- * {@link RecyclerView}.
|
||||
- */
|
||||
- // TODO(crbug.com/160194): Clean up after bookmark reordering launches.
|
||||
- ViewHolder createPersonalizedSigninPromoHolder(ViewGroup parent) {
|
||||
- ViewHolder createPersonalizedSigninAndSyncPromoHolder(ViewGroup parent) {
|
||||
- View view = LayoutInflater.from(mContext).inflate(
|
||||
- R.layout.personalized_signin_promo_view_bookmarks, parent, false);
|
||||
-
|
||||
@@ -156,7 +234,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
/**
|
||||
* @return Sync promo header {@link ViewHolder} instance that can be used with
|
||||
* {@link RecyclerView}.
|
||||
@@ -157,42 +143,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
@@ -152,56 +124,11 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
return new ViewHolder(view) {};
|
||||
}
|
||||
|
||||
@@ -169,6 +247,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
- this::setPersonalizedSigninPromoDeclined);
|
||||
- }
|
||||
-
|
||||
- void setupPersonalizedSyncPromo(PersonalizedSigninPromoView view) {
|
||||
- setupPersonalizedSigninPromo(view);
|
||||
- view.getStatusMessage().setVisibility(View.VISIBLE);
|
||||
- view.getChooseAccountButton().setVisibility(View.GONE);
|
||||
- view.getSigninButton().setText(R.string.sync_promo_turn_on_sync);
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * Detaches the previously configured {@link PersonalizedSigninPromoView}.
|
||||
- */
|
||||
@@ -180,36 +265,95 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
- * Saves that the personalized signin promo was declined and updates the UI.
|
||||
- */
|
||||
- private void setPersonalizedSigninPromoDeclined() {
|
||||
- SharedPreferences.Editor sharedPreferencesEditor =
|
||||
- ContextUtils.getAppSharedPreferences().edit();
|
||||
- sharedPreferencesEditor.putBoolean(PREF_PERSONALIZED_SIGNIN_PROMO_DECLINED, true);
|
||||
- sharedPreferencesEditor.apply();
|
||||
- mPromoState = calculatePromoState();
|
||||
- SharedPreferencesManager.getInstance().writeBoolean(
|
||||
- ChromePreferenceKeys.SIGNIN_PROMO_PERSONALIZED_DECLINED, true);
|
||||
- updatePromoState();
|
||||
- triggerPromoUpdate();
|
||||
- }
|
||||
-
|
||||
- /**
|
||||
- * @return Whether the user declined the personalized signin promo.
|
||||
- */
|
||||
- private boolean wasPersonalizedSigninPromoDeclined() {
|
||||
- return ContextUtils.getAppSharedPreferences().getBoolean(
|
||||
- PREF_PERSONALIZED_SIGNIN_PROMO_DECLINED, false);
|
||||
- @VisibleForTesting
|
||||
- static boolean wasPersonalizedSigninPromoDeclined() {
|
||||
- return SharedPreferencesManager.getInstance().readBoolean(
|
||||
- ChromePreferenceKeys.SIGNIN_PROMO_PERSONALIZED_DECLINED, false);
|
||||
- }
|
||||
-
|
||||
/**
|
||||
* @return Whether the personalized signin promo should be shown to user.
|
||||
*/
|
||||
private boolean shouldShowBookmarkSigninPromo() {
|
||||
- return mSignInManager.isSignInAllowed()
|
||||
- && SigninPromoController.hasNotReachedImpressionLimit(
|
||||
- SigninAccessPoint.BOOKMARK_MANAGER)
|
||||
- && !wasPersonalizedSigninPromoDeclined();
|
||||
+ return false;
|
||||
}
|
||||
|
||||
private @PromoState int calculatePromoState() {
|
||||
if (sPromoStateForTests != null) {
|
||||
@@ -209,30 +136,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
return sPromoStateForTests;
|
||||
@@ -205,8 +155,7 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
if (!ChromeSigninController.get().isSignedIn()) {
|
||||
boolean impressionLimitReached = !SigninPromoController.hasNotReachedImpressionLimit(
|
||||
SigninAccessPoint.BOOKMARK_MANAGER);
|
||||
- if (!mSignInManager.isSignInAllowed() || impressionLimitReached
|
||||
- || wasPersonalizedSigninPromoDeclined()) {
|
||||
+ if (!mSignInManager.isSignInAllowed() || impressionLimitReached) {
|
||||
return PromoState.PROMO_NONE;
|
||||
}
|
||||
return PromoState.PROMO_SIGNIN_PERSONALIZED;
|
||||
@@ -254,7 +203,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
}
|
||||
|
||||
- if (!AndroidSyncSettings.get().isMasterSyncEnabled()) {
|
||||
- return PromoState.PROMO_NONE;
|
||||
- }
|
||||
-
|
||||
- if (!mSignInManager.getIdentityManager().hasPrimaryAccount()) {
|
||||
- if (ChromeFeatureList.isEnabled(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)) {
|
||||
- CoreAccountInfo primaryAccount =
|
||||
- mSignInManager.getIdentityManager().getPrimaryAccountInfo(
|
||||
- ConsentLevel.NOT_REQUIRED);
|
||||
- if (primaryAccount != null && !wasPersonalizedSigninPromoDeclined()) {
|
||||
- return PromoState.PROMO_SYNC_PERSONALIZED;
|
||||
- }
|
||||
- }
|
||||
- return shouldShowBookmarkSigninPromo() ? PromoState.PROMO_SIGNIN_PERSONALIZED
|
||||
- : PromoState.PROMO_NONE;
|
||||
- }
|
||||
-
|
||||
- boolean impressionLimitNotReached =
|
||||
- SharedPreferencesManager.getInstance().readInt(
|
||||
- ChromePreferenceKeys.SIGNIN_AND_SYNC_PROMO_SHOW_COUNT)
|
||||
- < MAX_SIGNIN_AND_SYNC_PROMO_SHOW_COUNT;
|
||||
- if (!AndroidSyncSettings.get().isChromeSyncEnabled() && impressionLimitNotReached) {
|
||||
- return PromoState.PROMO_SYNC;
|
||||
- }
|
||||
return PromoState.PROMO_NONE;
|
||||
}
|
||||
|
||||
@@ -254,29 +157,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
mProfileDataCache.addObserver(this);
|
||||
}
|
||||
|
||||
- // AndroidSyncSettingsObserver implementation.
|
||||
- @Override
|
||||
- public void androidSyncSettingsChanged() {
|
||||
- // AndroidSyncSettings calls this method from non-UI threads.
|
||||
- PostTask.runOrPostTask(UiThreadTaskTraits.DEFAULT, () -> {
|
||||
- updatePromoState();
|
||||
- triggerPromoUpdate();
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- // SignInStateObserver implementation.
|
||||
- @Override
|
||||
- public void onSignedIn() {
|
||||
- updatePromoState();
|
||||
- triggerPromoUpdate();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void onSignedOut() {
|
||||
- updatePromoState();
|
||||
- triggerPromoUpdate();
|
||||
- }
|
||||
-
|
||||
// ProfileDataCache.Observer implementation.
|
||||
@Override
|
||||
public void onProfileDataUpdated(String accountId) {
|
||||
@@ -290,7 +170,6 @@ class BookmarkPromoHeader implements AndroidSyncSettingsObserver, SignInStateObs
|
||||
}
|
||||
|
||||
private void triggerPromoUpdate() {
|
||||
@@ -217,72 +361,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
mPromoHeaderChangeAction.run();
|
||||
}
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ReorderBookmarkItemsAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ReorderBookmarkItemsAdapter.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ReorderBookmarkItemsAdapter.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ReorderBookmarkItemsAdapter.java
|
||||
@@ -188,8 +188,6 @@ class ReorderBookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkIte
|
||||
assert mDelegate != null;
|
||||
|
||||
switch (viewType) {
|
||||
- case ViewType.PERSONALIZED_SIGNIN_PROMO:
|
||||
- return mPromoHeaderManager.createPersonalizedSigninPromoHolder(parent);
|
||||
case ViewType.SYNC_PROMO:
|
||||
return mPromoHeaderManager.createSyncPromoHolder(parent);
|
||||
case ViewType.FOLDER:
|
||||
@@ -204,10 +202,7 @@ class ReorderBookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkIte
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(ViewHolder holder, int position) {
|
||||
- if (holder.getItemViewType() == ViewType.PERSONALIZED_SIGNIN_PROMO) {
|
||||
- PersonalizedSigninPromoView view = (PersonalizedSigninPromoView) holder.itemView;
|
||||
- mPromoHeaderManager.setupPersonalizedSigninPromo(view);
|
||||
- } else if (!(holder.getItemViewType() == ViewType.SYNC_PROMO)) {
|
||||
+ if (!(holder.getItemViewType() == ViewType.SYNC_PROMO)) {
|
||||
BookmarkRow row = ((BookmarkRow) holder.itemView);
|
||||
BookmarkId id = getIdByPosition(position);
|
||||
row.setBookmarkId(id, getLocationFromPosition(position));
|
||||
@@ -231,13 +226,6 @@ class ReorderBookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkIte
|
||||
|
||||
@Override
|
||||
public void onViewRecycled(ViewHolder holder) {
|
||||
- switch (holder.getItemViewType()) {
|
||||
- case ViewType.PERSONALIZED_SIGNIN_PROMO:
|
||||
- mPromoHeaderManager.detachPersonalizePromoView();
|
||||
- break;
|
||||
- default:
|
||||
- // Other view holders don't have special recycling code.
|
||||
- }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -406,9 +394,6 @@ class ReorderBookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkIte
|
||||
case BookmarkPromoHeader.PromoState.PROMO_NONE:
|
||||
mPromoHeaderType = ViewType.INVALID_PROMO;
|
||||
break;
|
||||
- case BookmarkPromoHeader.PromoState.PROMO_SIGNIN_PERSONALIZED:
|
||||
- mPromoHeaderType = ViewType.PERSONALIZED_SIGNIN_PROMO;
|
||||
- break;
|
||||
case BookmarkPromoHeader.PromoState.PROMO_SYNC:
|
||||
mPromoHeaderType = ViewType.SYNC_PROMO;
|
||||
break;
|
||||
@@ -573,4 +558,4 @@ class ReorderBookmarkItemsAdapter extends DragReorderableListAdapter<BookmarkIte
|
||||
private void clearHighlight() {
|
||||
mHighlightedBookmark = null;
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoController.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoController.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoController.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoController.java
|
||||
@@ -75,23 +75,8 @@ public class SigninPromoController {
|
||||
@@ -69,24 +69,7 @@ public class SigninPromoController {
|
||||
* @param accessPoint The access point for which the impression limit is being checked.
|
||||
*/
|
||||
public static boolean hasNotReachedImpressionLimit(@AccessPoint int accessPoint) {
|
||||
SharedPreferences sharedPreferences = ContextUtils.getAppSharedPreferences();
|
||||
- SharedPreferencesManager preferencesManager = SharedPreferencesManager.getInstance();
|
||||
- switch (accessPoint) {
|
||||
- case SigninAccessPoint.BOOKMARK_MANAGER:
|
||||
- return sharedPreferences.getInt(SIGNIN_PROMO_IMPRESSIONS_COUNT_BOOKMARKS, 0)
|
||||
- < MAX_IMPRESSIONS_BOOKMARKS;
|
||||
- return getSigninPromoImpressionsCountBookmarks() < MAX_IMPRESSIONS_BOOKMARKS;
|
||||
- case SigninAccessPoint.NTP_CONTENT_SUGGESTIONS:
|
||||
- // There is no impression limit for NTP content suggestions.
|
||||
- return true;
|
||||
@@ -290,14 +379,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPr
|
||||
- // There is no impression limit for Recent Tabs.
|
||||
- return true;
|
||||
- case SigninAccessPoint.SETTINGS:
|
||||
- return sharedPreferences.getInt(SIGNIN_PROMO_IMPRESSIONS_COUNT_SETTINGS, 0)
|
||||
- return preferencesManager.readInt(
|
||||
- ChromePreferenceKeys.SIGNIN_PROMO_IMPRESSIONS_COUNT_SETTINGS)
|
||||
- < MAX_IMPRESSIONS_SETTINGS;
|
||||
- default:
|
||||
- assert false : "Unexpected value for access point: " + accessPoint;
|
||||
- return false;
|
||||
- }
|
||||
+ // never show anything
|
||||
+ return true;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,15 +12,15 @@ 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
|
||||
@@ -317,7 +317,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest(
|
||||
}
|
||||
|
||||
std::string DomDistillerViewerSource::GetContentSecurityPolicyStyleSrc() {
|
||||
- return "style-src 'self' https://fonts.googleapis.com;";
|
||||
+ return "style-src 'self';";
|
||||
}
|
||||
|
||||
std::string DomDistillerViewerSource::GetContentSecurityPolicyChildSrc() {
|
||||
@@ -337,7 +337,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest(
|
||||
std::string DomDistillerViewerSource::GetContentSecurityPolicy(
|
||||
network::mojom::CSPDirectiveName directive) {
|
||||
if (directive == network::mojom::CSPDirectiveName::StyleSrc) {
|
||||
- return "style-src 'self' https://fonts.googleapis.com;";
|
||||
+ return "style-src 'self';";
|
||||
} else if (directive == network::mojom::CSPDirectiveName::ChildSrc) {
|
||||
return "child-src *;";
|
||||
}
|
||||
diff --git a/components/dom_distiller/core/html/preview.html b/components/dom_distiller/core/html/preview.html
|
||||
--- a/components/dom_distiller/core/html/preview.html
|
||||
+++ b/components/dom_distiller/core/html/preview.html
|
||||
@@ -36,10 +36,10 @@ diff --git a/components/dom_distiller/core/html/preview.html b/components/dom_di
|
||||
diff --git a/components/dom_distiller/core/javascript/dom_distiller_viewer.js b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
|
||||
--- a/components/dom_distiller/core/javascript/dom_distiller_viewer.js
|
||||
+++ b/components/dom_distiller/core/javascript/dom_distiller_viewer.js
|
||||
@@ -130,7 +130,7 @@ function maybeSetWebFont() {
|
||||
return;
|
||||
@@ -116,7 +116,7 @@ function maybeSetWebFont() {
|
||||
}
|
||||
|
||||
var e = document.createElement('link');
|
||||
const e = document.createElement('link');
|
||||
- e.href = 'https://fonts.googleapis.com/css?family=Roboto';
|
||||
+ e.href = 'chrome://resources/css/roboto.css';
|
||||
e.rel = 'stylesheet';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sat, 22 Aug 2020 12:46:20 +0200
|
||||
Subject: Disable scroll-to-text-fragment
|
||||
|
||||
---
|
||||
chrome/browser/ui/prefs/prefs_tab_helper.cc | 2 +-
|
||||
content/child/runtime_features.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
||||
--- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
||||
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
|
||||
@@ -357,7 +357,7 @@ void PrefsTabHelper::RegisterProfilePrefs(
|
||||
prefs::kEnableReferrers,
|
||||
!base::FeatureList::IsEnabled(features::kNoReferrers));
|
||||
registry->RegisterBooleanPref(prefs::kEnableEncryptedMedia, true);
|
||||
- registry->RegisterBooleanPref(prefs::kScrollToTextFragmentEnabled, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kScrollToTextFragmentEnabled, false);
|
||||
#if defined(OS_ANDROID)
|
||||
registry->RegisterDoublePref(prefs::kWebKitFontScaleFactor, 1.0);
|
||||
registry->RegisterBooleanPref(prefs::kWebKitForceEnableZoom,
|
||||
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
|
||||
@@ -461,7 +461,7 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) {
|
||||
{wrf::EnableWebGPU, switches::kEnableUnsafeWebGPU, true},
|
||||
{wrf::EnablePresentationAPI, switches::kDisablePresentationAPI, false},
|
||||
{wrf::EnableTextFragmentAnchor, switches::kDisableScrollToTextFragment,
|
||||
- false},
|
||||
+ true},
|
||||
{wrf::EnableRemotePlaybackAPI, switches::kDisableRemotePlaybackAPI,
|
||||
false},
|
||||
{wrf::EnableTimerThrottlingForBackgroundTabs,
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 12 Aug 2019 08:47:04 +0200
|
||||
Subject: Disable search-ready omnibox by default
|
||||
|
||||
---
|
||||
chrome/browser/android/chrome_feature_list.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/android/chrome_feature_list.cc
|
||||
@@ -518,7 +518,7 @@ const base::Feature kScrollToExpandPaymentHandler{
|
||||
"ScrollToExpandPaymentHandler", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kSearchReadyOmniboxFeature{
|
||||
- "SearchReadyOmnibox", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ "SearchReadyOmnibox", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kServiceManagerForBackgroundPrefetch{
|
||||
"ServiceManagerForBackgroundPrefetch", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: Disable seed-based field trials
|
||||
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
|
||||
@@ -538,8 +538,10 @@ bool VariationsFieldTrialCreator::SetupFieldTrials(
|
||||
@@ -536,8 +536,10 @@ bool VariationsFieldTrialCreator::SetupFieldTrials(
|
||||
#endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED)
|
||||
bool used_seed = false;
|
||||
if (!used_testing_config) {
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Fri, 24 Jan 2020 19:17:22 +0100
|
||||
Subject: Disable smart selection by default
|
||||
|
||||
Allow web search in incognito mode (reverts
|
||||
commit 48d4ae54f7565c429bf29cd63806aee5d7e93e69)
|
||||
|
||||
Notice that re-enabling smart selection would make incognito mode potentially
|
||||
leak information through the TextClassifier set by OEM, if any
|
||||
---
|
||||
chrome/browser/flags/android/chrome_feature_list.cc | 2 +-
|
||||
.../content/browser/selection/SelectionPopupControllerImpl.java | 2 +-
|
||||
2 files 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
|
||||
@@ -376,7 +376,7 @@ const base::Feature kChromeSharingHubV15{"ChromeSharingHubV15",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kChromeSmartSelection{"ChromeSmartSelection",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kCommandLineOnNonRooted{"CommandLineOnNonRooted",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
|
||||
--- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
|
||||
+++ b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java
|
||||
@@ -815,7 +815,7 @@ public class SelectionPopupControllerImpl extends ActionModeCallbackHelper
|
||||
menu.removeItem(R.id.select_action_menu_share);
|
||||
}
|
||||
|
||||
- if (isFocusedNodeEditable() || isIncognito()
|
||||
+ if (isFocusedNodeEditable()
|
||||
|| !isSelectActionModeAllowed(MENU_ITEM_WEB_SEARCH)) {
|
||||
menu.removeItem(R.id.select_action_menu_web_search);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: Disable some signed exchange features
|
||||
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
|
||||
@@ -507,7 +507,7 @@ const base::Feature kSignedExchangePrefetchCacheForNavigations{
|
||||
@@ -562,7 +562,7 @@ const base::Feature kSignedExchangePrefetchCacheForNavigations{
|
||||
// Signed Exchange Reporting for distributors
|
||||
// https://www.chromestatus.com/features/5687904902840320
|
||||
const base::Feature kSignedExchangeReportingForDistributors{
|
||||
@@ -18,7 +18,7 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c
|
||||
|
||||
// Subresource prefetching+loading via Signed HTTP Exchange
|
||||
// https://www.chromestatus.com/features/5126805474246656
|
||||
@@ -517,7 +517,7 @@ const base::Feature kSignedExchangeSubresourcePrefetch{
|
||||
@@ -572,7 +572,7 @@ const base::Feature kSignedExchangeSubresourcePrefetch{
|
||||
// Origin-Signed HTTP Exchanges (for WebPackage Loading)
|
||||
// https://www.chromestatus.com/features/5745285984681984
|
||||
const base::Feature kSignedHTTPExchange{"SignedHTTPExchange",
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
From: Michael Gilbert <mgilbert@debian.org>
|
||||
Date: Wed, 21 Nov 2018 02:37:35 +0000
|
||||
Subject: Disable support for RAR files inspection
|
||||
|
||||
---
|
||||
.../download_protection/file_analyzer.cc | 2 +-
|
||||
chrome/common/safe_browsing/BUILD.gn | 33 -------------------
|
||||
.../file_util/safe_archive_analyzer.cc | 4 +--
|
||||
3 files changed, 2 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
|
||||
--- a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
|
||||
+++ b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
|
||||
@@ -87,7 +87,7 @@ void FileAnalyzer::Start(const base::FilePath& target_path,
|
||||
if (inspection_type == DownloadFileType::ZIP) {
|
||||
StartExtractZipFeatures();
|
||||
} else if (inspection_type == DownloadFileType::RAR) {
|
||||
- StartExtractRarFeatures();
|
||||
+ LOG(WARNING) << "Safebrowser inspection of rar files is disabled in this build";
|
||||
#if defined(OS_MACOSX)
|
||||
} else if (inspection_type == DownloadFileType::DMG) {
|
||||
StartExtractDmgFeatures();
|
||||
diff --git a/chrome/common/safe_browsing/BUILD.gn b/chrome/common/safe_browsing/BUILD.gn
|
||||
--- a/chrome/common/safe_browsing/BUILD.gn
|
||||
+++ b/chrome/common/safe_browsing/BUILD.gn
|
||||
@@ -52,38 +52,6 @@ if (safe_browsing_mode == 1) {
|
||||
public_deps = [ "//components/safe_browsing/core:csd_proto" ]
|
||||
}
|
||||
|
||||
- source_set("rar_analyzer") {
|
||||
- sources = [
|
||||
- "rar_analyzer.cc",
|
||||
- "rar_analyzer.h",
|
||||
- ]
|
||||
-
|
||||
- deps = [
|
||||
- ":archive_analyzer_results",
|
||||
- ":download_type_util",
|
||||
- "//base",
|
||||
- "//base:i18n",
|
||||
- "//components/safe_browsing/core:features",
|
||||
- "//third_party/unrar:unrar",
|
||||
- ]
|
||||
-
|
||||
- defines = [
|
||||
- "_FILE_OFFSET_BITS=64",
|
||||
- "LARGEFILE_SOURCE",
|
||||
- "RAR_SMP",
|
||||
- "SILENT",
|
||||
-
|
||||
- # The following is set to disable certain macro definitions in the unrar
|
||||
- # source code.
|
||||
- "CHROMIUM_UNRAR",
|
||||
-
|
||||
- # Disables exceptions in unrar, replaces them with process termination.
|
||||
- "UNRAR_NO_EXCEPTIONS",
|
||||
- ]
|
||||
-
|
||||
- public_deps = [ "//components/safe_browsing/core:csd_proto" ]
|
||||
- }
|
||||
-
|
||||
source_set("disk_image_type_sniffer_mac") {
|
||||
sources = [
|
||||
"disk_image_type_sniffer_mac.cc",
|
||||
@@ -150,7 +118,6 @@ source_set("safe_browsing") {
|
||||
":archive_analyzer_results",
|
||||
":binary_feature_extractor",
|
||||
":download_type_util",
|
||||
- ":rar_analyzer",
|
||||
"//components/safe_browsing/core:features",
|
||||
]
|
||||
|
||||
diff --git a/chrome/services/file_util/safe_archive_analyzer.cc b/chrome/services/file_util/safe_archive_analyzer.cc
|
||||
--- a/chrome/services/file_util/safe_archive_analyzer.cc
|
||||
+++ b/chrome/services/file_util/safe_archive_analyzer.cc
|
||||
@@ -7,7 +7,6 @@
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/zip_analyzer.h"
|
||||
#include "mojo/public/cpp/bindings/strong_binding.h"
|
||||
|
||||
@@ -48,8 +47,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file,
|
||||
AnalyzeRarFileCallback callback) {
|
||||
DCHECK(rar_file.IsValid());
|
||||
|
||||
+ LOG(FATAL) << "AnalyzeRarFile is disabled in this build";
|
||||
safe_browsing::ArchiveAnalyzerResults results;
|
||||
- safe_browsing::rar_analyzer::AnalyzeRarFile(
|
||||
- std::move(rar_file), std::move(temporary_file), &results);
|
||||
std::move(callback).Run(results);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -4,8 +4,8 @@ Subject: Disable sync services menu entry
|
||||
|
||||
---
|
||||
chrome/android/java/res/xml/main_preferences.xml | 6 ------
|
||||
chrome/android/java/res/xml/privacy_preferences.xml | 7 -------
|
||||
2 files changed, 13 deletions(-)
|
||||
chrome/android/java/res/xml/privacy_preferences.xml | 8 --------
|
||||
2 files changed, 14 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/main_preferences.xml
|
||||
@@ -14,30 +14,30 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j
|
||||
android:key="sign_in"
|
||||
android:order="1"
|
||||
android:title="@string/sign_in_to_chrome"/>
|
||||
- <org.chromium.chrome.browser.preferences.ChromeBasePreference
|
||||
- <org.chromium.components.browser_ui.settings.ChromeBasePreference
|
||||
- android:key="sync_and_services"
|
||||
- android:order="2"
|
||||
- android:layout="@layout/account_management_account_row"
|
||||
- android:title="@string/prefs_sync_and_services"
|
||||
- android:fragment="org.chromium.chrome.browser.preferences.sync.SyncAndServicesPreferences"/>
|
||||
- android:fragment="org.chromium.chrome.browser.sync.settings.SyncAndServicesSettings"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="basics_section"
|
||||
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
|
||||
@@ -33,12 +33,5 @@
|
||||
@@ -33,12 +33,4 @@
|
||||
android:title="@string/clear_browsing_data_title"
|
||||
android:summary="@string/clear_browsing_data_summary"
|
||||
android:fragment="org.chromium.chrome.browser.preferences.privacy.ClearBrowsingDataTabsFragment" />
|
||||
- <android.support.v7.preference.Preference
|
||||
android:fragment="org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment" />
|
||||
- <Preference
|
||||
- android:key="sync_and_services_link_divider"
|
||||
- android:layout="@layout/divider_preference"
|
||||
- android:selectable="false"/>
|
||||
- <org.chromium.chrome.browser.preferences.TextMessagePreference
|
||||
- <org.chromium.components.browser_ui.settings.TextMessagePreference
|
||||
- android:key="sync_and_services_link"
|
||||
- android:summary="@string/privacy_sync_and_services_link"
|
||||
app:allowDividerBelow="false" />
|
||||
- app:allowDividerBelow="false" />
|
||||
</PreferenceScreen>
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From: Blaise <BlaiseD@GMail.com>
|
||||
Date: Sun, 23 Aug 2020 14:32:55 -0500
|
||||
Subject: Disable the DIAL repeating discovery
|
||||
|
||||
This causes unnecessary SSDP network spam
|
||||
---
|
||||
chrome/browser/media/router/discovery/dial/dial_registry.cc | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/media/router/discovery/dial/dial_registry.cc b/chrome/browser/media/router/discovery/dial/dial_registry.cc
|
||||
--- a/chrome/browser/media/router/discovery/dial/dial_registry.cc
|
||||
+++ b/chrome/browser/media/router/discovery/dial/dial_registry.cc
|
||||
@@ -192,10 +192,6 @@ void DialRegistry::StartPeriodicDiscovery() {
|
||||
|
||||
dial_ = CreateDialService();
|
||||
dial_->AddObserver(this);
|
||||
- DoDiscovery();
|
||||
- repeating_timer_.reset(new base::RepeatingTimer());
|
||||
- repeating_timer_->Start(FROM_HERE, refresh_interval_delta_, this,
|
||||
- &DialRegistry::DoDiscovery);
|
||||
}
|
||||
|
||||
void DialRegistry::DoDiscovery() {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -10,7 +10,7 @@ author: Chad Miller <chad.miller@canonical.com>
|
||||
diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc
|
||||
--- a/components/content_settings/core/browser/cookie_settings.cc
|
||||
+++ b/components/content_settings/core/browser/cookie_settings.cc
|
||||
@@ -58,7 +58,7 @@ void CookieSettings::GetCookieSettings(
|
||||
@@ -63,7 +63,7 @@ void CookieSettings::GetCookieSettings(
|
||||
void CookieSettings::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 12 Aug 2019 08:45:43 +0200
|
||||
Subject: Disable unified consent on Android
|
||||
|
||||
---
|
||||
components/unified_consent/feature.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/components/unified_consent/feature.cc b/components/unified_consent/feature.cc
|
||||
--- a/components/unified_consent/feature.cc
|
||||
+++ b/components/unified_consent/feature.cc
|
||||
@@ -11,7 +11,7 @@ namespace unified_consent {
|
||||
// base::Feature definition.
|
||||
const base::Feature kUnifiedConsent {
|
||||
"UnifiedConsent",
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
base::FEATURE_DISABLED_BY_DEFAULT
|
||||
#else
|
||||
base::FEATURE_ENABLED_BY_DEFAULT
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -3,8 +3,8 @@ Date: Sat, 27 Oct 2018 17:54:01 +0200
|
||||
Subject: Disable update scheduler
|
||||
|
||||
---
|
||||
.../chrome/browser/component_updater/UpdateScheduler.java | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
.../chrome/browser/component_updater/UpdateScheduler.java | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java b/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java
|
||||
@@ -21,13 +21,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/component_updat
|
||||
}
|
||||
|
||||
/* package */ void onStartTaskBeforeNativeLoaded(TaskFinishedCallback callback) {
|
||||
@@ -112,4 +109,4 @@ public class UpdateScheduler {
|
||||
void onStartTask(long nativeBackgroundTaskUpdateScheduler, UpdateScheduler caller);
|
||||
void onStopTask(long nativeBackgroundTaskUpdateScheduler, UpdateScheduler caller);
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 27 Feb 2020 23:23:59 +0100
|
||||
Subject: Do not compile QR code sharing
|
||||
|
||||
---
|
||||
chrome/android/java/AndroidManifest.xml | 16 ------------
|
||||
.../ChromeProvidedSharingOptionsProvider.java | 25 -------------------
|
||||
chrome/browser/share/android/java_sources.gni | 18 -------------
|
||||
3 files changed, 59 deletions(-)
|
||||
|
||||
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
|
||||
@@ -729,22 +729,6 @@ by a child template that "extends" this file.
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
- <activity
|
||||
- android:name="org.chromium.chrome.browser.share.qrcode.QrCodeShareActivity"
|
||||
- android:icon="@drawable/ic_launcher"
|
||||
- android:label="@string/qr_code_share_icon_label"
|
||||
- android:enabled="false"
|
||||
- android:excludeFromRecents="true"
|
||||
- android:exported="true"
|
||||
- android:noHistory="true"
|
||||
- android:theme="@android:style/Theme.NoDisplay"
|
||||
- android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize" >
|
||||
- <intent-filter>
|
||||
- <action android:name="android.intent.action.SEND" />
|
||||
- <category android:name="android.intent.category.DEFAULT" />
|
||||
- <data android:mimeType="text/plain" />
|
||||
- </intent-filter>
|
||||
- </activity>
|
||||
|
||||
<activity
|
||||
android:name="org.chromium.chrome.browser.vr.VrCancelAnimationActivity"
|
||||
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
|
||||
--- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
|
||||
+++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
|
||||
@@ -22,7 +22,6 @@ import org.chromium.chrome.browser.preferences.Pref;
|
||||
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
|
||||
import org.chromium.chrome.browser.send_tab_to_self.SendTabToSelfShareActivity;
|
||||
import org.chromium.chrome.browser.share.ChromeShareExtras;
|
||||
-import org.chromium.chrome.browser.share.qrcode.QrCodeCoordinator;
|
||||
import org.chromium.chrome.browser.share.screenshot.ScreenshotCoordinator;
|
||||
import org.chromium.chrome.browser.share.share_sheet.ShareSheetPropertyModelBuilder.ContentType;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
@@ -145,10 +144,6 @@ class ChromeProvidedSharingOptionsProvider {
|
||||
mOrderedFirstPartyOptions.add(createCopyTextFirstPartyOption());
|
||||
}
|
||||
mOrderedFirstPartyOptions.add(createSendTabToSelfFirstPartyOption());
|
||||
- if (ChromeFeatureList.isEnabled(ChromeFeatureList.CHROME_SHARE_QRCODE)
|
||||
- && !mTabProvider.get().getWebContents().isIncognito()) {
|
||||
- mOrderedFirstPartyOptions.add(createQrCodeFirstPartyOption());
|
||||
- }
|
||||
if (mPrefServiceBridge.getBoolean(Pref.PRINTING_ENABLED)) {
|
||||
mOrderedFirstPartyOptions.add(createPrintingFirstPartyOption());
|
||||
}
|
||||
@@ -261,26 +256,6 @@ class ChromeProvidedSharingOptionsProvider {
|
||||
ContentType.IMAGE));
|
||||
}
|
||||
|
||||
- private FirstPartyOption createQrCodeFirstPartyOption() {
|
||||
- PropertyModel propertyModel = ShareSheetPropertyModelBuilder.createPropertyModel(
|
||||
- AppCompatResources.getDrawable(mActivity, R.drawable.qr_code),
|
||||
- mActivity.getResources().getString(R.string.qr_code_share_icon_label),
|
||||
- (currentActivity)
|
||||
- -> {
|
||||
- RecordUserAction.record("SharingHubAndroid.QRCodeSelected");
|
||||
- RecordHistogram.recordMediumTimesHistogram(
|
||||
- "Sharing.SharingHubAndroid.TimeToShare",
|
||||
- System.currentTimeMillis() - mShareStartTime);
|
||||
- mBottomSheetController.hideContent(mBottomSheetContent, true);
|
||||
- QrCodeCoordinator qrCodeCoordinator = new QrCodeCoordinator(mActivity, mUrl);
|
||||
- qrCodeCoordinator.show();
|
||||
- },
|
||||
- /*isFirstParty=*/true);
|
||||
- return new FirstPartyOption(propertyModel,
|
||||
- Arrays.asList(ContentType.LINK_PAGE_VISIBLE, ContentType.LINK_PAGE_NOT_VISIBLE,
|
||||
- ContentType.IMAGE));
|
||||
- }
|
||||
-
|
||||
private FirstPartyOption createPrintingFirstPartyOption() {
|
||||
PropertyModel propertyModel = ShareSheetPropertyModelBuilder.createPropertyModel(
|
||||
AppCompatResources.getDrawable(mActivity, R.drawable.sharing_print),
|
||||
diff --git a/chrome/browser/share/android/java_sources.gni b/chrome/browser/share/android/java_sources.gni
|
||||
--- a/chrome/browser/share/android/java_sources.gni
|
||||
+++ b/chrome/browser/share/android/java_sources.gni
|
||||
@@ -8,24 +8,6 @@ share_java_sources = [
|
||||
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/BitmapDownloadRequest.java",
|
||||
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/BitmapUriRequest.java",
|
||||
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/clipboard/ClipboardImageFileProvider.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QRCodeGenerationRequest.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeCoordinator.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialog.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialogTab.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodePageAdapter.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/TabLayoutPageListener.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/CameraPreview.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/CameraPreviewOverlay.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanCoordinator.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanMediator.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanView.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanViewBinder.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanViewProperties.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareCoordinator.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareMediator.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareView.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareViewBinder.java",
|
||||
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/share_tab/QrCodeShareViewProperties.java",
|
||||
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotCoordinator.java",
|
||||
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetCoordinator.java",
|
||||
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetDialog.java",
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -5,13 +5,12 @@ Subject: Do not grant notifications to default search engine
|
||||
Block gelocation by default instead of granting it for non-enterprise use cases (almost the totality of users)
|
||||
---
|
||||
.../search_permissions_service.cc | 20 ++++++-------------
|
||||
chrome/common/chrome_features.cc | 2 +-
|
||||
2 files changed, 7 insertions(+), 15 deletions(-)
|
||||
1 file changed, 6 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/android/search_permissions/search_permissions_service.cc b/chrome/browser/android/search_permissions/search_permissions_service.cc
|
||||
--- a/chrome/browser/android/search_permissions/search_permissions_service.cc
|
||||
+++ b/chrome/browser/android/search_permissions/search_permissions_service.cc
|
||||
@@ -190,7 +190,7 @@ void SearchPermissionsService::ResetDSEPermission(ContentSettingsType type) {
|
||||
@@ -191,7 +191,7 @@ void SearchPermissionsService::ResetDSEPermission(ContentSettingsType type) {
|
||||
DCHECK(dse_url.is_empty() || IsPermissionControlledByDSE(type, dse_origin));
|
||||
|
||||
if (!dse_url.is_empty())
|
||||
@@ -20,7 +19,7 @@ diff --git a/chrome/browser/android/search_permissions/search_permissions_servic
|
||||
}
|
||||
|
||||
void SearchPermissionsService::ResetDSEPermissions() {
|
||||
@@ -333,11 +333,7 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
|
||||
@@ -334,11 +334,7 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,7 +32,7 @@ diff --git a/chrome/browser/android/search_permissions/search_permissions_servic
|
||||
pref_service_->ClearPref(prefs::kDSEWasDisabledByPolicy);
|
||||
|
||||
// Initialize the pref for geolocation if it hasn't been initialized yet.
|
||||
@@ -370,10 +366,8 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
|
||||
@@ -371,10 +367,8 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
|
||||
pref_service_->ClearPref(prefs::kDSEGeolocationSettingDeprecated);
|
||||
} else if (dse_geolocation_setting == CONTENT_SETTING_ASK) {
|
||||
// If the user hasn't explicitly allowed or blocked geolocation for the
|
||||
@@ -46,8 +45,8 @@ diff --git a/chrome/browser/android/search_permissions/search_permissions_servic
|
||||
}
|
||||
|
||||
// Update the content setting with the auto-grants for the DSE.
|
||||
@@ -398,11 +392,9 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
|
||||
GetContentSetting(dse_origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
|
||||
@@ -399,11 +393,9 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
|
||||
GetContentSetting(dse_origin, ContentSettingsType::NOTIFICATIONS);
|
||||
ContentSetting dse_notifications_setting = notifications_setting_to_restore;
|
||||
// If the user hasn't explicitly allowed or blocked notifications for the
|
||||
- // DSE, initialize it to allowed.
|
||||
@@ -60,18 +59,6 @@ diff --git a/chrome/browser/android/search_permissions/search_permissions_servic
|
||||
}
|
||||
|
||||
// Update the content setting with the auto-grants for the DSE.
|
||||
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
|
||||
@@ -311,7 +311,7 @@ const base::FeatureParam<std::string> kDnsOverHttpsTemplatesParam{
|
||||
#if defined(OS_ANDROID)
|
||||
// Enable changing default downloads storage location on Android.
|
||||
const base::Feature kDownloadsLocationChange{"DownloadsLocationChange",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
#endif
|
||||
|
||||
// If enabled, Drive will use FCM for its invalidations.
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 12 Oct 2017 08:09:24 +0200
|
||||
Subject: Do not hide component extensions
|
||||
|
||||
---
|
||||
extensions/common/extension.cc | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
|
||||
--- a/extensions/common/extension.cc
|
||||
+++ b/extensions/common/extension.cc
|
||||
@@ -361,9 +361,8 @@ bool Extension::ShouldDisplayInNewTabPage() const {
|
||||
}
|
||||
|
||||
bool Extension::ShouldExposeViaManagementAPI() const {
|
||||
- // Hide component extensions because they are only extensions as an
|
||||
- // implementation detail of Chrome.
|
||||
- return !extensions::Manifest::IsComponentLocation(location());
|
||||
+ // do not hide component extensions
|
||||
+ return true;
|
||||
}
|
||||
|
||||
Extension::ManifestData* Extension::GetManifestData(const std::string& key)
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -5,108 +5,50 @@ Subject: Do not ignore download location prompt setting
|
||||
Upstream has decided that it works as intended (https://bugs.chromium.org/p/chromium/issues/detail?id=916606)
|
||||
but users would like to decide where to save a file even when there is no SD card available;
|
||||
do not skip the prompt in such cases.
|
||||
---
|
||||
.../DownloadLocationDialogBridge.java | 73 ++++++-------------
|
||||
1 file changed, 21 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogBridge.java
|
||||
@@ -32,9 +32,6 @@ public class DownloadLocationDialogBridge implements ModalDialogProperties.Contr
|
||||
private PropertyModel mDialogModel;
|
||||
private DownloadLocationCustomView mCustomView;
|
||||
private ModalDialogManager mModalDialogManager;
|
||||
- private long mTotalBytes;
|
||||
- private @DownloadLocationDialogType int mDialogType;
|
||||
- private String mSuggestedPath;
|
||||
private Context mContext;
|
||||
Do not tick "Don't show again" by default
|
||||
---
|
||||
.../dialogs/DownloadLocationCustomView.java | 4 ----
|
||||
.../dialogs/DownloadLocationDialogCoordinator.java | 13 -------------
|
||||
2 files changed, 17 deletions(-)
|
||||
|
||||
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
|
||||
@@ -63,10 +63,6 @@ public class DownloadLocationCustomView
|
||||
CharSequence title) {
|
||||
mDialogType = dialogType;
|
||||
|
||||
private DownloadLocationDialogBridge(long nativeDownloadLocationDialogBridge) {
|
||||
@@ -67,12 +64,28 @@ public class DownloadLocationDialogBridge implements ModalDialogProperties.Contr
|
||||
- // Automatically check "don't show again" the first time the user is seeing the dialog.
|
||||
- boolean isInitial = DownloadDialogBridge.getPromptForDownloadAndroid()
|
||||
- == DownloadPromptStatus.SHOW_INITIAL;
|
||||
- mDontShowAgain.setChecked(isInitial);
|
||||
mDontShowAgain.setOnCheckedChangeListener(this);
|
||||
|
||||
mModalDialogManager = activity.getModalDialogManager();
|
||||
mContext = activity;
|
||||
- mTotalBytes = totalBytes;
|
||||
- mDialogType = dialogType;
|
||||
- mSuggestedPath = suggestedPath;
|
||||
|
||||
- DownloadDirectoryProvider.getInstance().getAllDirectoriesOptions(
|
||||
- (ArrayList<DirectoryOption> dirs) -> { onDirectoryOptionsRetrieved(dirs); });
|
||||
+ // Already showing the dialog.
|
||||
+ if (mDialogModel != null) return;
|
||||
+
|
||||
+ // Actually show the dialog.
|
||||
+ mCustomView = (DownloadLocationCustomView) LayoutInflater.from(mContext).inflate(
|
||||
+ R.layout.download_location_dialog, null);
|
||||
+ mCustomView.initialize(dialogType, new File(suggestedPath));
|
||||
+
|
||||
+ Resources resources = mContext.getResources();
|
||||
+ mDialogModel =
|
||||
+ new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
|
||||
+ .with(ModalDialogProperties.CONTROLLER, this)
|
||||
+ .with(ModalDialogProperties.TITLE, getTitle(totalBytes, dialogType))
|
||||
+ .with(ModalDialogProperties.CUSTOM_VIEW, mCustomView)
|
||||
+ .with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, resources,
|
||||
+ R.string.duplicate_download_infobar_download_button)
|
||||
+ .with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, resources,
|
||||
+ R.string.cancel)
|
||||
+ .build();
|
||||
+
|
||||
+ mModalDialogManager.showDialog(mDialogModel, ModalDialogManager.ModalDialogType.APP);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -105,50 +118,6 @@ public class DownloadLocationDialogBridge implements ModalDialogProperties.Contr
|
||||
mCustomView = null;
|
||||
}
|
||||
|
||||
- /**
|
||||
- * Called after retrieved the download directory options.
|
||||
- * @param dirs An list of available download directories.
|
||||
- */
|
||||
- private void onDirectoryOptionsRetrieved(ArrayList<DirectoryOption> dirs) {
|
||||
mFileName.setText(suggestedPath.getName());
|
||||
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
|
||||
@@ -120,19 +120,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties.
|
||||
* @param dirs An list of available download directories.
|
||||
*/
|
||||
private void onDirectoryOptionsRetrieved(ArrayList<DirectoryOption> dirs) {
|
||||
- // If there is only one directory available, don't show the default dialog, and set the
|
||||
- // download directory to default. Dialog will still show for other types of dialogs, like
|
||||
- // name conflict or disk error.
|
||||
- if (dirs.size() == 1 && mDialogType == DownloadLocationDialogType.DEFAULT) {
|
||||
- final DirectoryOption dir = dirs.get(0);
|
||||
- if (dir.type == DirectoryOption.DownloadLocationDirectoryType.DEFAULT) {
|
||||
- assert(!TextUtils.isEmpty(dir.location));
|
||||
- PrefServiceBridge.getInstance().setDownloadAndSaveFileDefaultDirectory(
|
||||
- dir.location);
|
||||
- DownloadLocationDialogBridgeJni.get().onComplete(
|
||||
- mNativeDownloadLocationDialogBridge, DownloadLocationDialogBridge.this,
|
||||
- mSuggestedPath);
|
||||
- assert (!TextUtils.isEmpty(dir.location));
|
||||
- DownloadDialogBridge.setDownloadAndSaveFileDefaultDirectory(dir.location);
|
||||
- mController.onDownloadLocationDialogComplete(mSuggestedPath);
|
||||
- }
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // Already showing the dialog.
|
||||
- if (mDialogModel != null) return;
|
||||
-
|
||||
- // Actually show the dialog.
|
||||
- mCustomView = (DownloadLocationCustomView) LayoutInflater.from(mContext).inflate(
|
||||
- R.layout.download_location_dialog, null);
|
||||
- mCustomView.initialize(mDialogType, new File(mSuggestedPath));
|
||||
-
|
||||
- Resources resources = mContext.getResources();
|
||||
- mDialogModel =
|
||||
- new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS)
|
||||
- .with(ModalDialogProperties.CONTROLLER, this)
|
||||
- .with(ModalDialogProperties.TITLE, getTitle(mTotalBytes, mDialogType))
|
||||
- .with(ModalDialogProperties.CUSTOM_VIEW, mCustomView)
|
||||
- .with(ModalDialogProperties.POSITIVE_BUTTON_TEXT, resources,
|
||||
- R.string.duplicate_download_infobar_download_button)
|
||||
- .with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT, resources,
|
||||
- R.string.cancel)
|
||||
- .build();
|
||||
-
|
||||
- mModalDialogManager.showDialog(mDialogModel, ModalDialogManager.ModalDialogType.APP);
|
||||
- }
|
||||
-
|
||||
private String getTitle(long totalBytes, @DownloadLocationDialogType int dialogType) {
|
||||
switch (dialogType) {
|
||||
case DownloadLocationDialogType.LOCATION_FULL:
|
||||
// Already showing the dialog.
|
||||
if (mDialogModel != null) return;
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ Subject: Do not store passwords by default
|
||||
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
|
||||
--- a/components/password_manager/core/browser/password_manager.cc
|
||||
+++ b/components/password_manager/core/browser/password_manager.cc
|
||||
@@ -155,10 +155,10 @@ void PasswordManager::RegisterProfilePrefs(
|
||||
registry->RegisterBooleanPref(prefs::kBlacklistedCredentialsNormalized,
|
||||
false);
|
||||
@@ -206,10 +206,10 @@ FormData SimplifiedFormDataFromFormStructure(
|
||||
void PasswordManager::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
- prefs::kCredentialsEnableService, true,
|
||||
+ prefs::kCredentialsEnableService, false,
|
||||
|
||||
+10
-6
@@ -1,15 +1,16 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 17 Mar 2019 19:09:00 +0100
|
||||
Subject: Enable site per process isolation for devices with enough memory
|
||||
Subject: Enable SPPI for devices with enough memory
|
||||
|
||||
---
|
||||
chrome/common/chrome_features.cc | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
chrome/common/chrome_features.cc | 4 ----
|
||||
components/site_isolation/features.cc | 2 +-
|
||||
2 files changed, 1 insertion(+), 5 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
|
||||
@@ -651,11 +651,7 @@ const base::Feature kShowTrustedPublisherURL{"ShowTrustedPublisherURL",
|
||||
@@ -637,11 +637,7 @@ const base::Feature kShowTrustedPublisherURL{"ShowTrustedPublisherURL",
|
||||
// browser_features, as they are only used on the browser side.
|
||||
const base::Feature kSitePerProcess {
|
||||
"site-per-process",
|
||||
@@ -20,8 +21,11 @@ diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
||||
-#endif
|
||||
};
|
||||
|
||||
// Controls a mode for dynamically process-isolating sites where the user has
|
||||
@@ -685,7 +681,7 @@ const base::Feature kSiteIsolationForPasswordSites{
|
||||
#if defined(OS_CHROMEOS)
|
||||
diff --git a/components/site_isolation/features.cc b/components/site_isolation/features.cc
|
||||
--- a/components/site_isolation/features.cc
|
||||
+++ b/components/site_isolation/features.cc
|
||||
@@ -36,7 +36,7 @@ const base::Feature kSiteIsolationForPasswordSites {
|
||||
// base::SysInfo::AmountOfPhysicalMemoryMB().
|
||||
const base::Feature kSitePerProcessOnlyForHighMemoryClients{
|
||||
"site-per-process-only-for-high-memory-clients",
|
||||
@@ -1,23 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 30 May 2019 03:42:06 +0200
|
||||
Subject: Enable changing default downloads storage location by default
|
||||
|
||||
---
|
||||
chrome/common/chrome_features.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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
|
||||
@@ -311,7 +311,7 @@ const base::FeatureParam<std::string> kDnsOverHttpsTemplatesParam{
|
||||
#if defined(OS_ANDROID)
|
||||
// Enable changing default downloads storage location on Android.
|
||||
const base::Feature kDownloadsLocationChange{"DownloadsLocationChange",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
#endif
|
||||
|
||||
// If enabled, Drive will use FCM for its invalidations.
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 20 Aug 2020 20:15:34 +0200
|
||||
Subject: Enable darken websites checkbox in themes
|
||||
|
||||
Unexpire #darken-websites-checkbox-in-themes-setting
|
||||
---
|
||||
chrome/browser/flag-metadata.json | 2 +-
|
||||
chrome/browser/flags/android/chrome_feature_list.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
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
|
||||
@@ -783,7 +783,7 @@
|
||||
{
|
||||
"name": "darken-websites-checkbox-in-themes-setting",
|
||||
"owners": [ "lazzzis@google.com", "twellington" ],
|
||||
- "expiry_milestone": 83
|
||||
+ "expiry_milestone": -1
|
||||
},
|
||||
{
|
||||
"name": "data-saver-server-previews",
|
||||
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
|
||||
@@ -432,7 +432,7 @@ const base::Feature kContextualSearchTranslations{
|
||||
"ContextualSearchTranslations", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kDarkenWebsitesCheckboxInThemesSetting{
|
||||
- "DarkenWebsitesCheckboxInThemesSetting", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ "DarkenWebsitesCheckboxInThemesSetting", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kDirectActions{"DirectActions",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 30 May 2019 03:44:07 +0200
|
||||
Subject: Enable download rename option by default
|
||||
|
||||
---
|
||||
chrome/browser/android/chrome_feature_list.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/android/chrome_feature_list.cc
|
||||
@@ -414,7 +414,7 @@ const base::Feature kDownloadNotificationBadge{
|
||||
"DownloadNotificationBadge", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kDownloadRename{"DownloadRename",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kDownloadTabManagementModule{
|
||||
"DownloadTabManagementModule", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -42,7 +42,7 @@ Excerpt from https://github.com/bromite/bromite/issues/226
|
||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -297,6 +297,10 @@ config("compiler") {
|
||||
@@ -288,6 +288,10 @@ config("compiler") {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
+ }
|
||||
+
|
||||
# Linker warnings.
|
||||
if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
|
||||
!is_mac && !is_ios && current_os != "aix") {
|
||||
if (fatal_linker_warnings && !is_mac && !is_ios && current_os != "aix") {
|
||||
ldflags += [ "-Wl,--fatal-warnings" ]
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Fri, 7 Aug 2020 13:41:21 +0200
|
||||
Subject: Enable improved cookie controls by default
|
||||
|
||||
---
|
||||
components/content_settings/core/common/features.cc | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/components/content_settings/core/common/features.cc b/components/content_settings/core/common/features.cc
|
||||
--- a/components/content_settings/core/common/features.cc
|
||||
+++ b/components/content_settings/core/common/features.cc
|
||||
@@ -11,7 +11,7 @@ namespace content_settings {
|
||||
|
||||
// Enables an improved UI for third-party cookie blocking in incognito mode.
|
||||
const base::Feature kImprovedCookieControls{"ImprovedCookieControls",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
// Default setting for improved cookie controls.
|
||||
const base::FeatureParam<bool> kImprovedCookieControlsDefaultInIncognito{
|
||||
@@ -20,10 +20,10 @@ const base::FeatureParam<bool> kImprovedCookieControlsDefaultInIncognito{
|
||||
// Enables an improved UI for existing third-party cookie blocking users.
|
||||
const base::Feature kImprovedCookieControlsForThirdPartyCookieBlocking{
|
||||
"ImprovedCookieControlsForThirdPartyCookieBlocking",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kDisallowWildcardsInPluginContentSettings{
|
||||
"DisallowWildcardsInPluginContentSettings",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
-} // namespace content_settings
|
||||
\ No newline at end of file
|
||||
+} // namespace content_settings
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Fri, 17 Jul 2020 09:28:36 +0200
|
||||
Subject: Enable legacy TLS interstitital warning
|
||||
|
||||
Expose show-legacy-tls-warnings flag on Android as well
|
||||
---
|
||||
chrome/browser/about_flags.cc | 2 --
|
||||
chrome/browser/ssl/tls_deprecation_config.cc | 22 +------------------
|
||||
components/security_state/core/features.cc | 2 +-
|
||||
net/base/features.cc | 2 +-
|
||||
.../network/legacy_tls_config_distributor.cc | 21 +-----------------
|
||||
services/network/ssl_config_service_mojo.cc | 7 ++----
|
||||
6 files changed, 6 insertions(+), 50 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
|
||||
@@ -5366,11 +5366,9 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kElasticOverscrollWin)},
|
||||
#endif
|
||||
|
||||
-#if !defined(OS_ANDROID)
|
||||
{"show-legacy-tls-warnings", flag_descriptions::kLegacyTLSWarningsName,
|
||||
flag_descriptions::kLegacyTLSWarningsDescription, kOsDesktop,
|
||||
FEATURE_VALUE_TYPE(security_state::features::kLegacyTLSWarnings)},
|
||||
-#endif
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
{"enable-assistant-aec", flag_descriptions::kEnableGoogleAssistantAecName,
|
||||
diff --git a/chrome/browser/ssl/tls_deprecation_config.cc b/chrome/browser/ssl/tls_deprecation_config.cc
|
||||
--- a/chrome/browser/ssl/tls_deprecation_config.cc
|
||||
+++ b/chrome/browser/ssl/tls_deprecation_config.cc
|
||||
@@ -58,27 +58,7 @@ void SetRemoteTLSDeprecationConfig(const std::string& binary_config) {
|
||||
}
|
||||
|
||||
bool ShouldSuppressLegacyTLSWarning(const GURL& url) {
|
||||
- if (!url.has_host() || !url.SchemeIsCryptographic())
|
||||
- return false;
|
||||
-
|
||||
- auto* proto = TLSDeprecationConfigSingleton::GetInstance().GetProto();
|
||||
- // If the config is not yet loaded, we err on the side of not showing warnings
|
||||
- // for any sites.
|
||||
- if (!proto)
|
||||
- return true;
|
||||
-
|
||||
- // Convert bytes from crypto::SHA256 so we can compare to the proto contents.
|
||||
- std::string host_hash_bytes = crypto::SHA256HashString(url.host_piece());
|
||||
- std::string host_hash = base::ToLowerASCII(
|
||||
- base::HexEncode(host_hash_bytes.c_str(), host_hash_bytes.size()));
|
||||
- const auto& control_site_hashes = proto->control_site_hashes();
|
||||
-
|
||||
- // Perform binary search on the sorted list of control site hashes to check
|
||||
- // if the input URL's hostname is included.
|
||||
- auto lower = std::lower_bound(control_site_hashes.begin(),
|
||||
- control_site_hashes.end(), host_hash);
|
||||
-
|
||||
- return lower != control_site_hashes.end() && *lower == host_hash;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void ResetTLSDeprecationConfigForTesting() {
|
||||
diff --git a/components/security_state/core/features.cc b/components/security_state/core/features.cc
|
||||
--- a/components/security_state/core/features.cc
|
||||
+++ b/components/security_state/core/features.cc
|
||||
@@ -16,7 +16,7 @@ const char kMarkHttpAsParameterWarningAndDangerousOnFormEdits[] =
|
||||
const char kMarkHttpAsParameterDangerWarning[] = "danger-warning";
|
||||
|
||||
const base::Feature kLegacyTLSWarnings{"LegacyTLSWarnings",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kSafetyTipUI{"SafetyTip",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
diff --git a/net/base/features.cc b/net/base/features.cc
|
||||
--- a/net/base/features.cc
|
||||
+++ b/net/base/features.cc
|
||||
@@ -153,7 +153,7 @@ const base::Feature kTurnOffStreamingMediaCaching{
|
||||
"TurnOffStreamingMediaCaching", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kLegacyTLSEnforced{"LegacyTLSEnforced",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kSchemefulSameSite{"SchemefulSameSite",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
diff --git a/services/network/legacy_tls_config_distributor.cc b/services/network/legacy_tls_config_distributor.cc
|
||||
--- a/services/network/legacy_tls_config_distributor.cc
|
||||
+++ b/services/network/legacy_tls_config_distributor.cc
|
||||
@@ -51,26 +51,7 @@ scoped_refptr<LegacyTLSExperimentConfig> LegacyTLSExperimentConfig::Parse(
|
||||
|
||||
bool LegacyTLSExperimentConfig::ShouldSuppressLegacyTLSWarning(
|
||||
const std::string& hostname) const {
|
||||
- // Match on eTLD+1 rather than full hostname (to account for subdomains and
|
||||
- // redirects). If no registrable domain is found, default to using the
|
||||
- // hostname as-is.
|
||||
- auto domain = net::registry_controlled_domains::GetDomainAndRegistry(
|
||||
- hostname, net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
|
||||
- if (domain.empty())
|
||||
- domain = hostname;
|
||||
-
|
||||
- // Convert bytes from crypto::SHA256 so we can compare to the proto contents.
|
||||
- std::string host_hash_bytes = crypto::SHA256HashString(domain);
|
||||
- std::string host_hash = base::ToLowerASCII(
|
||||
- base::HexEncode(host_hash_bytes.data(), host_hash_bytes.size()));
|
||||
- const auto& control_site_hashes = proto_.control_site_hashes();
|
||||
-
|
||||
- // Perform binary search on the sorted list of control site hashes to check
|
||||
- // if the input URL's hostname is included.
|
||||
- auto lower = std::lower_bound(control_site_hashes.begin(),
|
||||
- control_site_hashes.end(), host_hash);
|
||||
-
|
||||
- return lower != control_site_hashes.end() && *lower == host_hash;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
LegacyTLSConfigDistributor::LegacyTLSConfigDistributor() = default;
|
||||
diff --git a/services/network/ssl_config_service_mojo.cc b/services/network/ssl_config_service_mojo.cc
|
||||
--- a/services/network/ssl_config_service_mojo.cc
|
||||
+++ b/services/network/ssl_config_service_mojo.cc
|
||||
@@ -120,11 +120,8 @@ bool SSLConfigServiceMojo::CanShareConnectionWithClientCerts(
|
||||
|
||||
bool SSLConfigServiceMojo::ShouldSuppressLegacyTLSWarning(
|
||||
const std::string& hostname) const {
|
||||
- // If the config is not yet loaded, we err on the side of not showing warnings
|
||||
- // for any sites.
|
||||
- if (!legacy_tls_config_)
|
||||
- return true;
|
||||
- return legacy_tls_config_->ShouldSuppressLegacyTLSWarning(hostname);
|
||||
+ // never suppress any warning
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void SSLConfigServiceMojo::OnNewCRLSet(scoped_refptr<net::CRLSet> crl_set) {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Sun, 14 Apr 2019 12:02:57 +0200
|
||||
Subject: Enable night mode menu entry by default
|
||||
|
||||
---
|
||||
chrome/browser/android/chrome_feature_list.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/android/chrome_feature_list.cc
|
||||
@@ -246,7 +246,7 @@ const base::Feature kAdjustWebApkInstallationSpace = {
|
||||
"AdjustWebApkInstallationSpace", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kAndroidNightMode{"AndroidNightMode",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const base::Feature kAndroidNightModeCCT{"AndroidNightModeCCT",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Fri, 31 Jul 2020 08:27:26 +0200
|
||||
Subject: Enable prefetch-privacy-changes by default
|
||||
|
||||
---
|
||||
third_party/blink/common/features.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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
|
||||
@@ -283,7 +283,7 @@ const base::Feature kFontAccess{"FontAccess",
|
||||
// Prefetch request properties are updated to be privacy-preserving. See
|
||||
// crbug.com/988956.
|
||||
const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
const char kMixedContentAutoupgradeModeParamName[] = "mode";
|
||||
const char kMixedContentAutoupgradeModeAllPassive[] = "all-passive";
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Fri, 31 Jul 2020 08:28:35 +0200
|
||||
Subject: Enable reduced-referrer-granularity by default
|
||||
|
||||
---
|
||||
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
|
||||
@@ -456,7 +456,7 @@ const base::Feature kProactivelySwapBrowsingInstance{
|
||||
// Reduce the amount of information in the default 'referer' header for
|
||||
// cross-origin requests.
|
||||
const base::Feature kReducedReferrerGranularity{
|
||||
- "ReducedReferrerGranularity", base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ "ReducedReferrerGranularity", base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
// Controls whether FileURLLoaderFactory can fetch additional files based on the
|
||||
// isolated world's origin. This feature is disabled by default because we want
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 10 Feb 2020 23:13:13 +0100
|
||||
Subject: Enable user-agent freeze by default
|
||||
|
||||
---
|
||||
third_party/blink/common/features.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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
|
||||
@@ -52,7 +52,7 @@ const base::Feature kFreezePurgeMemoryAllPagesFrozen{
|
||||
|
||||
// Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
|
||||
const base::Feature kFreezeUserAgent{"FreezeUserAgent",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT};
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT};
|
||||
|
||||
// When enabled, use the maximum possible bounds in compositing overlap testing
|
||||
// for fixed position elements.
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -3,19 +3,20 @@ Date: Sat, 20 Jan 2018 19:44:43 +0100
|
||||
Subject: Fix crash when accessing page info / site settings
|
||||
|
||||
---
|
||||
chrome/browser/permissions/permission_manager.cc | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
components/permissions/permission_manager.cc | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/chrome/browser/permissions/permission_manager.cc b/chrome/browser/permissions/permission_manager.cc
|
||||
--- a/chrome/browser/permissions/permission_manager.cc
|
||||
+++ b/chrome/browser/permissions/permission_manager.cc
|
||||
@@ -761,6 +761,9 @@ PermissionResult PermissionManager::GetPermissionStatusHelper(
|
||||
diff --git a/components/permissions/permission_manager.cc b/components/permissions/permission_manager.cc
|
||||
--- a/components/permissions/permission_manager.cc
|
||||
+++ b/components/permissions/permission_manager.cc
|
||||
@@ -682,6 +682,10 @@ PermissionResult PermissionManager::GetPermissionStatusHelper(
|
||||
if (status != CONTENT_SETTING_DEFAULT)
|
||||
return PermissionResult(status, PermissionStatusSource::UNSPECIFIED);
|
||||
PermissionContextBase* context = GetPermissionContext(permission);
|
||||
+ if (context == nullptr) {
|
||||
+ return PermissionResult(CONTENT_SETTING_BLOCK, PermissionStatusSource::UNSPECIFIED);
|
||||
+ }
|
||||
+
|
||||
PermissionResult result = context->GetPermissionStatus(
|
||||
render_frame_host, canonical_requesting_origin.GetOrigin(),
|
||||
embedding_origin.GetOrigin());
|
||||
|
||||
@@ -3,13 +3,13 @@ Date: Sun, 13 Aug 2017 19:33:04 -0400
|
||||
Subject: Hide passwords manager link
|
||||
|
||||
---
|
||||
.../preferences/password/SavePasswordsPreferences.java | 4 ++--
|
||||
.../browser/password_manager/settings/PasswordSettings.java | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
|
||||
@@ -251,7 +251,7 @@ public class SavePasswordsPreferences
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
|
||||
@@ -284,7 +284,7 @@ public class PasswordSettings
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/pas
|
||||
|
||||
PreferenceGroup passwordParent;
|
||||
if (mSearchQuery == null) {
|
||||
@@ -326,7 +326,7 @@ public class SavePasswordsPreferences
|
||||
@@ -360,7 +360,7 @@ public class PasswordSettings
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ diff --git a/chrome/android/java/res/layout/fre_tosanduma.xml b/chrome/android/j
|
||||
android:layout_height="wrap_content"
|
||||
android:lineSpacingMultiplier="1.4"
|
||||
android:text="@string/fre_send_report_check"
|
||||
- android:textAppearance="@style/TextAppearance.BlackBodyDefault" />
|
||||
+ android:textAppearance="@style/TextAppearance.BlackBodyDefault" android:visibility="gone" />
|
||||
- android:textAppearance="@style/TextAppearance.TextMedium.Primary" />
|
||||
+ android:textAppearance="@style/TextAppearance.TextMedium.Primary" android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -5,35 +5,48 @@ Subject: Increase number of autocomplete matches from 5 to 10
|
||||
Patch from https://github.com/Eloston/ungoogled-chromium/issues/814#issuecomment-526874703
|
||||
---
|
||||
components/omnibox/browser/autocomplete_result.cc | 3 ++-
|
||||
components/omnibox/browser/omnibox_field_trial.cc | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
components/omnibox/browser/omnibox_field_trial.cc | 6 +++---
|
||||
2 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/components/omnibox/browser/autocomplete_result.cc b/components/omnibox/browser/autocomplete_result.cc
|
||||
--- a/components/omnibox/browser/autocomplete_result.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_result.cc
|
||||
@@ -74,7 +74,8 @@ struct MatchGURLHash {
|
||||
@@ -76,7 +76,8 @@ struct MatchGURLHash {
|
||||
// static
|
||||
size_t AutocompleteResult::GetMaxMatches(bool is_zero_suggest) {
|
||||
size_t AutocompleteResult::GetMaxMatches(bool input_from_omnibox_focus) {
|
||||
#if (defined(OS_ANDROID))
|
||||
- constexpr size_t kDefaultMaxAutocompleteMatches = 5;
|
||||
+ // changed from 6, this needs to be double the value of default_max_matches_per_provider from components/omnibox/browser/omnibox_field_trial.cc
|
||||
+ constexpr size_t kDefaultMaxAutocompleteMatches = 10;
|
||||
if (is_zero_suggest)
|
||||
return kDefaultMaxAutocompleteMatches;
|
||||
#else
|
||||
#elif defined(OS_IOS) // !defined(OS_ANDROID)
|
||||
constexpr size_t kDefaultMaxAutocompleteMatches = 6;
|
||||
#else // !defined(OS_ANDROID) && !defined(OS_IOS)
|
||||
diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc
|
||||
--- a/components/omnibox/browser/omnibox_field_trial.cc
|
||||
+++ b/components/omnibox/browser/omnibox_field_trial.cc
|
||||
@@ -329,7 +329,8 @@ void OmniboxFieldTrial::GetDemotionsByType(
|
||||
@@ -361,11 +361,11 @@ void OmniboxFieldTrial::GetDemotionsByType(
|
||||
|
||||
size_t OmniboxFieldTrial::GetProviderMaxMatches(
|
||||
AutocompleteProvider::Type provider) {
|
||||
- size_t default_max_matches_per_provider = 3;
|
||||
+ size_t default_max_matches_per_provider = 5; // was 3; this needs to be half the value of kDefaultMaxAutocompleteMatches from components/omnibox/browser/autocomplete_result.cc
|
||||
+ return default_max_matches_per_provider;
|
||||
|
||||
// If new search features are disabled, ignore the parameter and use the
|
||||
// default value.
|
||||
- if (!base::FeatureList::IsEnabled(omnibox::kNewSearchFeatures))
|
||||
+ /*if (!base::FeatureList::IsEnabled(omnibox::kNewSearchFeatures))
|
||||
return default_max_matches_per_provider;
|
||||
|
||||
std::string param_value = base::GetFieldTrialParamValueByFeature(
|
||||
omnibox::kUIExperimentMaxAutocompleteMatches,
|
||||
@@ -392,7 +392,7 @@ size_t OmniboxFieldTrial::GetProviderMaxMatches(
|
||||
else if (k == provider)
|
||||
return v;
|
||||
}
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
return default_max_matches_per_provider;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
+34
-25
File diff suppressed because one or more lines are too long
@@ -1,30 +1,28 @@
|
||||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Thu, 12 Oct 2017 08:09:24 +0200
|
||||
Date: Sat, 2 May 2020 00:25:25 +0200
|
||||
Subject: Modify default preferences
|
||||
|
||||
Do not hide component extensions
|
||||
---
|
||||
.../browser/background/background_mode_manager.cc | 2 +-
|
||||
chrome/browser/chrome_content_browser_client.cc | 2 +-
|
||||
chrome/browser/net/prediction_options.cc | 2 +-
|
||||
chrome/browser/net/prediction_options.h | 2 +-
|
||||
chrome/browser/profiles/profile.cc | 2 +-
|
||||
.../settings/reset_page/reset_profile_dialog.html | 2 +-
|
||||
chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
|
||||
.../ui/navigation_correction_tab_observer.cc | 2 +-
|
||||
.../ui/webui/local_discovery/local_discovery_ui.cc | 4 ----
|
||||
chrome/service/cloud_print/connector_settings.cc | 2 +-
|
||||
.../autofill/core/browser/autofill_manager.cc | 14 ++++----------
|
||||
components/autofill/core/common/autofill_prefs.cc | 2 +-
|
||||
components/bookmarks/browser/bookmark_utils.cc | 4 ++--
|
||||
.../safe_browsing/common/safe_browsing_prefs.cc | 4 ++--
|
||||
extensions/common/extension.cc | 8 --------
|
||||
15 files changed, 19 insertions(+), 37 deletions(-)
|
||||
chrome/browser/background/background_mode_manager.cc | 2 +-
|
||||
chrome/browser/chrome_content_browser_client.cc | 2 +-
|
||||
chrome/browser/net/prediction_options.cc | 2 +-
|
||||
chrome/browser/net/prediction_options.h | 2 +-
|
||||
chrome/browser/profiles/profile.cc | 2 +-
|
||||
.../settings/reset_page/reset_profile_dialog.html | 2 +-
|
||||
chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
|
||||
chrome/browser/ui/navigation_correction_tab_observer.cc | 2 +-
|
||||
.../ui/webui/local_discovery/local_discovery_ui.cc | 4 ----
|
||||
chrome/service/cloud_print/connector_settings.cc | 2 +-
|
||||
components/autofill/core/browser/autofill_manager.cc | 9 +++------
|
||||
components/autofill/core/common/autofill_prefs.cc | 2 +-
|
||||
components/bookmarks/browser/bookmark_utils.cc | 4 ++--
|
||||
.../safe_browsing/core/common/safe_browsing_prefs.cc | 4 ++--
|
||||
14 files changed, 18 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
|
||||
--- a/chrome/browser/background/background_mode_manager.cc
|
||||
+++ b/chrome/browser/background/background_mode_manager.cc
|
||||
@@ -302,7 +302,7 @@ void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
@@ -339,7 +339,7 @@ void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false);
|
||||
registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false);
|
||||
#endif
|
||||
@@ -36,7 +34,7 @@ diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/brows
|
||||
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
|
||||
@@ -1141,7 +1141,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
@@ -1277,7 +1277,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
void ChromeContentBrowserClient::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
|
||||
@@ -72,7 +70,7 @@ diff --git a/chrome/browser/net/prediction_options.h b/chrome/browser/net/predic
|
||||
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
|
||||
@@ -149,7 +149,7 @@ const char Profile::kProfileKey[] = "__PROFILE__";
|
||||
@@ -262,7 +262,7 @@ const char Profile::kProfileKey[] = "__PROFILE__";
|
||||
void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kSearchSuggestEnabled,
|
||||
@@ -84,7 +82,7 @@ diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profil
|
||||
diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
|
||||
--- a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
|
||||
+++ b/chrome/browser/resources/settings/reset_page/reset_profile_dialog.html
|
||||
@@ -50,7 +50,7 @@
|
||||
@@ -34,7 +34,7 @@
|
||||
</cr-button>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
@@ -96,7 +94,7 @@ diff --git a/chrome/browser/resources/settings/reset_page/reset_profile_dialog.h
|
||||
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
|
||||
@@ -67,11 +67,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -71,11 +71,11 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
|
||||
registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
|
||||
registry->RegisterBooleanPref(
|
||||
@@ -113,20 +111,20 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u
|
||||
diff --git a/chrome/browser/ui/navigation_correction_tab_observer.cc b/chrome/browser/ui/navigation_correction_tab_observer.cc
|
||||
--- a/chrome/browser/ui/navigation_correction_tab_observer.cc
|
||||
+++ b/chrome/browser/ui/navigation_correction_tab_observer.cc
|
||||
@@ -43,7 +43,7 @@ NavigationCorrectionTabObserver::~NavigationCorrectionTabObserver() {}
|
||||
// static
|
||||
@@ -59,7 +59,7 @@ void NavigationCorrectionTabObserver::SetAllowEnableCorrectionsForTesting(
|
||||
void NavigationCorrectionTabObserver::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* prefs) {
|
||||
- prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, true,
|
||||
+ prefs->RegisterBooleanPref(prefs::kAlternateErrorPagesEnabled, false,
|
||||
prefs->RegisterBooleanPref(embedder_support::kAlternateErrorPagesEnabled,
|
||||
- true,
|
||||
+ false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
|
||||
--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
|
||||
@@ -107,10 +107,6 @@ void LocalDiscoveryUI::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -109,10 +109,6 @@ void LocalDiscoveryUI::RegisterProfilePrefs(
|
||||
registry->RegisterBooleanPref(prefs::kLocalDiscoveryEnabled, true);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kLocalDiscoveryNotificationsEnabled,
|
||||
-#if defined(OS_WIN)
|
||||
@@ -151,19 +149,7 @@ diff --git a/chrome/service/cloud_print/connector_settings.cc b/chrome/service/c
|
||||
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
|
||||
--- a/components/autofill/core/browser/autofill_manager.cc
|
||||
+++ b/components/autofill/core/browser/autofill_manager.cc
|
||||
@@ -529,10 +529,7 @@ bool AutofillManager::ShouldParseForms(const std::vector<FormData>& forms,
|
||||
bool enabled = IsAutofillEnabled();
|
||||
sync_state_ = personal_data_ ? personal_data_->GetSyncSigninState()
|
||||
: AutofillSyncSigninState::kNumSyncStates;
|
||||
- if (!has_logged_autofill_enabled_) {
|
||||
- AutofillMetrics::LogIsAutofillEnabledAtPageLoad(enabled, sync_state_);
|
||||
- has_logged_autofill_enabled_ = true;
|
||||
- }
|
||||
+ has_logged_autofill_enabled_ = true;
|
||||
|
||||
return enabled;
|
||||
}
|
||||
@@ -818,10 +815,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
|
||||
@@ -948,10 +948,7 @@ void AutofillManager::OnQueryFormFieldAutofillImpl(
|
||||
// suggestions available.
|
||||
// TODO(mathp): Differentiate between number of suggestions available
|
||||
// (current metric) and number shown to the user.
|
||||
@@ -175,7 +161,7 @@ diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/a
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1450,8 +1444,8 @@ void AutofillManager::Reset() {
|
||||
@@ -1587,8 +1584,8 @@ void AutofillManager::Reset() {
|
||||
#if defined(OS_ANDROID) || defined(OS_IOS)
|
||||
autofill_assistant_.Reset();
|
||||
#endif
|
||||
@@ -189,7 +175,7 @@ diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/a
|
||||
diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc
|
||||
--- a/components/autofill/core/common/autofill_prefs.cc
|
||||
+++ b/components/autofill/core/common/autofill_prefs.cc
|
||||
@@ -152,7 +152,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -150,7 +150,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
prefs::kAutofillLastVersionDisusedAddressesDeleted, 0,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(
|
||||
@@ -216,10 +202,10 @@ diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmar
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kShowManagedBookmarksInBookmarkBar,
|
||||
diff --git a/components/safe_browsing/common/safe_browsing_prefs.cc b/components/safe_browsing/common/safe_browsing_prefs.cc
|
||||
--- a/components/safe_browsing/common/safe_browsing_prefs.cc
|
||||
+++ b/components/safe_browsing/common/safe_browsing_prefs.cc
|
||||
@@ -169,9 +169,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
||||
diff --git a/components/safe_browsing/core/common/safe_browsing_prefs.cc b/components/safe_browsing/core/common/safe_browsing_prefs.cc
|
||||
--- a/components/safe_browsing/core/common/safe_browsing_prefs.cc
|
||||
+++ b/components/safe_browsing/core/common/safe_browsing_prefs.cc
|
||||
@@ -189,9 +189,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
|
||||
registry->RegisterBooleanPref(
|
||||
@@ -229,26 +215,8 @@ diff --git a/components/safe_browsing/common/safe_browsing_prefs.cc b/components
|
||||
- prefs::kSafeBrowsingEnabled, true,
|
||||
+ prefs::kSafeBrowsingEnabled, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(prefs::kSafeBrowsingEnhanced, false);
|
||||
registry->RegisterBooleanPref(prefs::kSafeBrowsingProceedAnywayDisabled,
|
||||
false);
|
||||
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
|
||||
--- a/extensions/common/extension.cc
|
||||
+++ b/extensions/common/extension.cc
|
||||
@@ -365,14 +365,6 @@ bool Extension::ShouldDisplayInExtensionSettings() const {
|
||||
if (is_theme())
|
||||
return false;
|
||||
|
||||
- // Hide component extensions because they are only extensions as an
|
||||
- // implementation detail of Chrome.
|
||||
- if (extensions::Manifest::IsComponentLocation(location()) &&
|
||||
- !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
- switches::kShowComponentExtensionOptions)) {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
// Unless they are unpacked, never show hosted apps. Note: We intentionally
|
||||
// show packaged apps and platform apps because there are some pieces of
|
||||
// functionality that are only available in chrome://extensions/ but which
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user