I don't think it is not part of the browser (is it?).
They are like embedded dependencies. "third_party" contains 3,726,248 lines
of codes, according to 'sloccount'. They are not included for nothing.
https://chromium.googlesource.com/chromium/src/+/master/ui/webui/resources/js/analytics.js
only aims to make it easier to include google-analytics-bundle.js ... and
that script is itself included by
https://chromium.googlesource.com/chromium/src/+/master/ui/file_manager/file_manager_resources.grd
among "common scripts" or by
https://chromium.googlesource.com/chromium/src/+/master/ui/webui/resources/webui_resources.grd
Excluding "third_party/analytics/", there are 44 files that reference
(usually load) one of those four files:
$ grep --exclude-dir=third_party/analytics -e google-analytics-bundle.js -e
analytics.js -e file_manager_resources.grd -e webui_resources.grd -lR .
./android_webview/BUILD.gn
./chrome/browser/resources/chromeos/echo/manifest.json
./chrome/common/extensions/docs/templates/articles/analytics.html
./chrome/common/extensions/docs/templates/private/site.html
./chrome/test/data/chromeproxy/extension/_metadata/computed_hashes.json
./chrome/test/data/chromeproxy/extension/detailed_data_usage.html
./chrome/test/data/chromeproxy/extension/popup.html
./chrome/test/data/extensions/network_delay/pjohnlkdpdolplmenneanegndccmdlpc/1.0/analytics.js
./chrome/test/data/extensions/network_delay/pjohnlkdpdolplmenneanegndccmdlpc/1.0/background.html
./components/domain_reliability/baked_in_configs/google-analytics_com.json
./components/test/data/autofill/heuristics/input/115_checkout_walgreens.com.html
./components/test/data/autofill/heuristics/input/116_cc_checkout_walgreens.com.html
./components/test/data/autofill/heuristics/input/147_panera.custhelp.com_app_ask.html
./components/test/data/dom_distiller/core_features.json
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/angularjs/node_modules/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/backbone/node_modules/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/inferno/node_modules/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/jquery/node_modules/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/preact/dist/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/react/node_modules/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/functional-prog-examples/elm/node_modules/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/es2015/node_modules/todomvc-common/base.js
./third_party/WebKit/PerformanceTests/Speedometer/resources/todomvc/vanilla-examples/vanillajs/node_modules/todomvc-common/base.js
./tools/check_grd_for_unused_strings.py
./tools/gritsettings/resource_ids
./ui/file_manager/BUILD.gn
./ui/file_manager/audio_player/manifest.json
./ui/file_manager/file_manager/background/js/import_history_unittest.html
./ui/file_manager/file_manager/background/js/media_import_handler_unittest.html
./ui/file_manager/file_manager/common/js/error_util.js
./ui/file_manager/file_manager/common/js/metrics_unittest.html
./ui/file_manager/file_manager/foreground/js/import_controller_unittest.html
./ui/file_manager/file_manager/foreground/js/main_scripts.js
./ui/file_manager/file_manager/manifest.json
./ui/file_manager/file_manager_resources.grd
./ui/file_manager/gallery/manifest.json
./ui/file_manager/image_loader/manifest.json
./ui/file_manager/video_player/manifest.json
./ui/resources/BUILD.gn
./ui/webui/resources/PRESUBMIT.py
./ui/webui/resources/js/analytics.js
./ui/webui/resources/js/jstemplate_compiled.js
./ui/webui/resources/webui_resources.grd
Also,
https://chromium.googlesource.com/chromium/src/+/master/chrome/test/data/chromeproxy/extension/google-analytics-bundle.js
is another "version" of google-analytics-bundle.js, as obfuscated as the
other one, inside the "chrome" folder (rather than "third_party").
https://chromium.googlesource.com/chromium/src/+/master/chrome/test/data/chromeproxy/extension/
contains more obfuscated JavaScript bearing no license notice, e.g.,
detailed_data_usage_compiled.js:
https://chromium.googlesource.com/chromium/src/+/master/chrome/test/data/chromeproxy/extension/detailed_data_usage_compiled.js
Chromium does not connect to Google Analytics (otherwise we should have seen
it in tcpdump)
Your tests do not show that. Maybe data are send once 10 MB was collected,
maybe only on Halloween day, maybe when the users visits a website that uses
Google Analytics (more than 60% of the top-100k sites according to
https://trends.builtwith.com/analytics/Google-Analytics : scary), etc. With
obfuscated JavaScript involved, it is hard to be sure...
and cannot open rar files.
Talking about unrar, a comment on line 27 of
https://chromium.googlesource.com/chromium/src/+/master/chrome/services/file_util/public/cpp/BUILD.gn
says "This dependency is here temporarily".
But when you have a huge project which contains a mix of things perhaps it is
not very simple to unify licenses (another reason to hate lawyers). Is the
situation with Firefox any different?
I have never heard of licensing issues in Firefox. Mozilla has a rather
clear "Source Code License Policy"
https://www.mozilla.org/en-US/MPL/license-policy/
For instance, it states that the GPL is incompatible with the MPL. It asks
to "always consult the licensing team before importing Third Party Code" too.