diff --git a/docs/DIR_METADATA b/docs/DIR_METADATA index 57fb45a786d079..1d96b36b738a7d 100644 --- a/docs/DIR_METADATA +++ b/docs/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto # build@ isn't really the right component for this, but it'll # do until we create a component for documentation. diff --git a/docs/README.md b/docs/README.md index cdcfd3324bfa8d..41c28b993a0a3d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,7 +4,7 @@ This directory contains chromium project documentation in [Gitiles-flavored Markdown]. It is automatically [rendered by Gitiles]. [Gitiles-flavored Markdown]: https://gerrit.googlesource.com/gitiles/+/master/Documentation/markdown.md -[rendered by Gitiles]: https://chromium.googlesource.com/chromium/src/+/master/docs/ +[rendered by Gitiles]: https://chromium.googlesource.com/chromium/src/+/main/docs/ If you add new documents, please also add a link to them in the Document Index below. diff --git a/docs/accessibility/DIR_METADATA b/docs/accessibility/DIR_METADATA index 35eb41cc533e35..8dd4f6f73cae97 100644 --- a/docs/accessibility/DIR_METADATA +++ b/docs/accessibility/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Internals>Accessibility" diff --git a/docs/accessibility/espeak.md b/docs/accessibility/espeak.md index a09418ae9e09db..c3305f8305ce4b 100644 --- a/docs/accessibility/espeak.md +++ b/docs/accessibility/espeak.md @@ -92,7 +92,7 @@ The next steps require that you have the full Chrome OS source code checked out and you're in your chroot. See the Chromium OS Developer Guide for instructions: -https://chromium.googlesource.com/chromiumos/docs/+/master/developer_guide.md +https://chromium.googlesource.com/chromiumos/docs/+/main/developer_guide.md espeak-ng is in this directory: diff --git a/docs/accessibility/ia2_to_uia.md b/docs/accessibility/ia2_to_uia.md index 5dffbad8e29220..f4132b3e193c79 100644 --- a/docs/accessibility/ia2_to_uia.md +++ b/docs/accessibility/ia2_to_uia.md @@ -131,7 +131,7 @@ does not require the shared unique id. Consider the same example above. ~~~ ## Docs & References: -[Custom UIA Property and Pattern registration in Chromium](https://chromium.googlesource.com/chromium/src/+/master/ui/accessibility/platform/uia_registrar_win.h) +[Custom UIA Property and Pattern registration in Chromium](https://chromium.googlesource.com/chromium/src/+/main/ui/accessibility/platform/uia_registrar_win.h) [UI Automation IItemContainerPattern. It is used to look up IAccessible2 element via a unique id](https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nn-uiautomationclient-iuiautomationitemcontainerpattern) diff --git a/docs/accessibility/overview.md b/docs/accessibility/overview.md index de6e3823d8deb5..dfe4dc825e1ecb 100644 --- a/docs/accessibility/overview.md +++ b/docs/accessibility/overview.md @@ -510,9 +510,9 @@ which is renderer-side code, and in JavaScript by the [automation API]. The API is defined by [automation.idl], which must be kept synchronized with [ax_enums.mojom]. -[ax.mojom.AXActionData]: https://source.chromium.org/chromium/chromium/src/+/master:ui/accessibility/mojom/ax_action_data.mojom;l=13 -[ax.mojom.RenderAccessibilityHost::HandleAXEvents()]: https://source.chromium.org/chromium/chromium/src/+/master:content/common/render_accessibility.mojom;l=47 -[ax.mojom.RenderAccessibility.PerformAction()]: https://source.chromium.org/chromium/chromium/src/+/master:content/common/render_accessibility.mojom;l=86 +[ax.mojom.AXActionData]: https://source.chromium.org/chromium/chromium/src/+/main:ui/accessibility/mojom/ax_action_data.mojom;l=13 +[ax.mojom.RenderAccessibilityHost::HandleAXEvents()]: https://source.chromium.org/chromium/chromium/src/+/main:content/common/render_accessibility.mojom;l=47 +[ax.mojom.RenderAccessibility.PerformAction()]: https://source.chromium.org/chromium/chromium/src/+/main:content/common/render_accessibility.mojom;l=86 [AutomationInternalCustomBindings]: https://cs.chromium.org/chromium/src/extensions/renderer/api/automation/automation_internal_custom_bindings.h [AXContentNodeData]: https://cs.chromium.org/chromium/src/content/common/ax_content_node_data.h [AXLayoutObject]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/accessibility/ax_layout_object.h @@ -530,7 +530,7 @@ is defined by [automation.idl], which must be kept synchronized with [ViewAccessibility]: https://cs.chromium.org/chromium/src/ui/views/accessibility/view_accessibility.h [Node]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/dom/node.h [RenderAccessibilityImpl]: https://cs.chromium.org/chromium/src/content/renderer/accessibility/render_accessibility_impl.h -[RenderAccessibilityManager]: https://source.chromium.org/chromium/chromium/src/+/master:content/renderer/accessibility/render_accessibility_manager.h +[RenderAccessibilityManager]: https://source.chromium.org/chromium/chromium/src/+/main:content/renderer/accessibility/render_accessibility_manager.h [RenderFrameHostImpl]: https://cs.chromium.org/chromium/src/content/browser/renderer_host/render_frame_host_impl.h [ui::AXNodeData]: https://cs.chromium.org/chromium/src/ui/accessibility/ax_node_data.h [WebAXObject]: https://cs.chromium.org/chromium/src/third_party/blink/public/web/web_ax_object.h diff --git a/docs/accessibility/reader_mode.md b/docs/accessibility/reader_mode.md index 986f2bd12038e9..e3822e735b2d3c 100644 --- a/docs/accessibility/reader_mode.md +++ b/docs/accessibility/reader_mode.md @@ -11,7 +11,7 @@ project is integrated into Chrome on Desktop. ## Overview Desktop Reader Mode is hidden behind a -[base::Feature](https://source.chromium.org/chromium/chromium/src/+/master:components/dom_distiller/core/dom_distiller_features.cc) +[base::Feature](https://source.chromium.org/chromium/chromium/src/+/main:components/dom_distiller/core/dom_distiller_features.cc) flag, ‘enable-reader-mode’. To run Chrome with Reader Mode, set the “Enable Reader Mode” flag to “Enabled” in chrome://flags or start Chrome with --enable-feature=”ReaderMode”. @@ -72,7 +72,7 @@ forwards it to all registered observers, and caches it. ### Toggling Reader Mode Users can toggle reader mode using an omnibox icon or an option, Toggle Reader Mode, in the “customize and control Chrome” menu, both of which execute -BrowserCommands [ToggleDistilledView()](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/browser_commands.cc;bpv=1;bpt=1;l=1364?q=browser_commands%20dom_distiller&ss=chromium%2Fchromium%2Fsrc). +BrowserCommands [ToggleDistilledView()](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/browser_commands.cc;bpv=1;bpt=1;l=1364?q=browser_commands%20dom_distiller&ss=chromium%2Fchromium%2Fsrc). [ReaderModeIconView](https://cs.chromium.org/chromium/src/chrome/browser/ui/views/reader_mode/reader_mode_icon_view.h) is a DistillabilityObserver and sets its visibility based on the latest result @@ -144,7 +144,7 @@ considered a black box. In short, content is extracted from the fully rendered article via Javascript (specifically from the compiled Javascript file built from DOM Distiller, -[domdistiller.js](https://source.chromium.org/chromium/chromium/src/+/master:third_party/dom_distiller_js/dist/js/domdistiller.js)) +[domdistiller.js](https://source.chromium.org/chromium/chromium/src/+/main:third_party/dom_distiller_js/dist/js/domdistiller.js)) into a DistilledPageProto. The DOM Distiller retrieves the currently loaded document’s DOM and converts it @@ -166,11 +166,11 @@ the following: ### Displaying Reader Mode Pages -A [DistilledPageProto](https://source.chromium.org/chromium/chromium/src/+/master:components/dom_distiller/core/proto/distilled_page.proto) +A [DistilledPageProto](https://source.chromium.org/chromium/chromium/src/+/main:components/dom_distiller/core/proto/distilled_page.proto) is created for each page distilled, and is used to generate the HTML of the distilled page. Pages are loaded by -[DomDistillerViewerSource](https://source.chromium.org/chromium/chromium/src/+/master:components/dom_distiller/content/browser/dom_distiller_viewer_source.h), +[DomDistillerViewerSource](https://source.chromium.org/chromium/chromium/src/+/main:components/dom_distiller/content/browser/dom_distiller_viewer_source.h), which serves the HTML and resources for viewing pages. After the DOM is initially loaded, the contents are populated via Javascript. diff --git a/docs/accessibility/tests.md b/docs/accessibility/tests.md index ecd6489aed5081..c3104509c21ce7 100644 --- a/docs/accessibility/tests.md +++ b/docs/accessibility/tests.md @@ -44,7 +44,7 @@ out/release/content_shell \ ``` For information on modifying or adding web tests, see the main -[web tests documentation](https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_tests.md). +[web tests documentation](https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_tests.md). ## DumpAccessibilityTree tests diff --git a/docs/ad_tagging.md b/docs/ad_tagging.md index 6f53151e9f3bf3..ff1a298fe779e1 100644 --- a/docs/ad_tagging.md +++ b/docs/ad_tagging.md @@ -9,7 +9,7 @@ behavior](https://support.google.com/webtools/answer/7347327). The ad detection infrastructure is called Ad Tagging. Ad Tagging works by matching resource requests against a filter list (see how the list is -[generated](https://chromium.googlesource.com/chromium/src.git/+/master/components/subresource_filter/FILTER_LIST_GENERATION.md)) +[generated](https://chromium.googlesource.com/chromium/src.git/+/main/components/subresource_filter/FILTER_LIST_GENERATION.md)) to determine if they’re ad requests. Any requests matching the filter are tagged as ads. Further, requests (and some DOM elements such as iframes) made on behalf of previously tagged scripts are also tagged as ads by the @@ -23,7 +23,7 @@ request made within an ad iframe is considered an ad resource request. ### Subresource Filter The [Subresource -Filter](https://chromium.googlesource.com/chromium/src.git/+/master/components/subresource_filter/README.md) +Filter](https://chromium.googlesource.com/chromium/src.git/+/main/components/subresource_filter/README.md) loads the filter list and matches urls against it. The list is distributed via the component updater. This same list and component is used for blocking ads on abusive sites and those that violate the Better Ads Standard. diff --git a/docs/android_build_instructions.md b/docs/android_build_instructions.md index 4222400dbd3495..1d2dacccae04fb 100644 --- a/docs/android_build_instructions.md +++ b/docs/android_build_instructions.md @@ -400,7 +400,7 @@ will not fail if an analysis check fails. Make sure to check the terminal that the server is running in at regular intervals to fix outstanding issues caught by these analysis checks. -[fast_local_dev]: https://source.chromium.org/chromium/chromium/src/+/master:build/android/fast_local_dev_server.py +[fast_local_dev]: https://source.chromium.org/chromium/chromium/src/+/main:build/android/fast_local_dev_server.py #### Incremental Install [Incremental Install](/build/android/incremental_install/README.md) uses diff --git a/docs/android_debugging_instructions.md b/docs/android_debugging_instructions.md index 9430ed56011f63..3feba77c5d73d4 100644 --- a/docs/android_debugging_instructions.md +++ b/docs/android_debugging_instructions.md @@ -20,7 +20,7 @@ out/Default/bin/chrome_public_apk launch --args='--disable-fre' 'data:text/html; ``` ## Logging -[Chromium logging from LOG(INFO)](https://chromium.googlesource.com/chromium/src/+/master/docs/android_logging.md) +[Chromium logging from LOG(INFO)](https://chromium.googlesource.com/chromium/src/+/main/docs/android_logging.md) etc., is directed to the Android logcat logging facility. You can filter the messages, e.g. view chromium verbose logging, everything else at warning level with: diff --git a/docs/autofill/DIR_METADATA b/docs/autofill/DIR_METADATA index 326295f03267ae..1d322dd5e11271 100644 --- a/docs/autofill/DIR_METADATA +++ b/docs/autofill/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "UI>Browser>Autofill" diff --git a/docs/chrome_os_logging.md b/docs/chrome_os_logging.md index cdbb6e296b8838..406033bebdefd7 100644 --- a/docs/chrome_os_logging.md +++ b/docs/chrome_os_logging.md @@ -39,5 +39,5 @@ When actively debugging issues, Chrome's `--vmodule` flag is sometimes used to temporarily log messages at lower severities for particular modules. [base/logging.h]: ../base/logging.h -[session_manager]: https://chromium.googlesource.com/chromiumos/platform2/+/master/login_manager/ -[Passing Chrome flags from session_manager]: https://chromium.googlesource.com/chromiumos/platform2/+/master/login_manager/docs/flags.md +[session_manager]: https://chromium.googlesource.com/chromiumos/platform2/+/main/login_manager/ +[Passing Chrome flags from session_manager]: https://chromium.googlesource.com/chromiumos/platform2/+/main/login_manager/docs/flags.md diff --git a/docs/chrome_untrusted.md b/docs/chrome_untrusted.md index d4240e06ae739a..9dafab1e9e5304 100644 --- a/docs/chrome_untrusted.md +++ b/docs/chrome_untrusted.md @@ -57,7 +57,7 @@ Yes, but not by default and with some caveats. Any team that requires extra capabilities granted to `chrome-untrusted://` should consult with the security team to ensure they are non-dangerous. In this context, we consider non-dangerous any API that we would expose to the renderer process, e.g. UMA. -We currently use `postMessage()` to expose certain APIs to `chrome-untrusted://`. For example, the Media App uses `postMessage()` to pass a read-only file handle to `chrome-untrusted://media-app` from `chrome-untrusted://`. Teams are encouraged to get a review from someone in [SECURITY_OWNERS](https://source.chromium.org/chromium/chromium/src/+/master:ipc/SECURITY_OWNERS) when exposing capabilities over postMessage. +We currently use `postMessage()` to expose certain APIs to `chrome-untrusted://`. For example, the Media App uses `postMessage()` to pass a read-only file handle to `chrome-untrusted://media-app` from `chrome-untrusted://`. Teams are encouraged to get a review from someone in [SECURITY_OWNERS](https://source.chromium.org/chromium/chromium/src/+/main:ipc/SECURITY_OWNERS) when exposing capabilities over postMessage. We are hoping to move to Mojo to improve auditability of these APIs and to make the security review required. @@ -118,7 +118,7 @@ class UntrustedExampleUI : public ui::UntrustedWebUIController { 2. Register the WebUIConfig -Add the `WebUIConfig` to the list of WebUIConfigs in `[ChromeUntrustedWebUIControllerFactory](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/webui/chrome_untrusted_web_ui_controller_factory.cc)`. +Add the `WebUIConfig` to the list of WebUIConfigs in `[ChromeUntrustedWebUIControllerFactory](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/webui/chrome_untrusted_web_ui_controller_factory.cc)`. ```cpp register_config(std::make_unique()); diff --git a/docs/chromeos_build_instructions.md b/docs/chromeos_build_instructions.md index fa189693e778a1..e5153ec8e3bb8d 100644 --- a/docs/chromeos_build_instructions.md +++ b/docs/chromeos_build_instructions.md @@ -18,7 +18,7 @@ build configurations: ## Common setup First, follow the [normal Linux build -instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md) +instructions](https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md) as usual to get a Chromium checkout. You'll also need to add `'chromeos'` to the `target_os` list in your `.gclient` @@ -98,8 +98,8 @@ Some useful flags: virtual screens, by display position and size. * `--enable-features=Feature1,OtherFeature2`: Enable specified features. Features are often listed in chrome://flags, or in source files such as - [chrome_features.cc](https://source.chromium.org/chromium/chromium/src/+/master:chrome/common/chrome_features.cc) - or [ash_features.cc](https://source.chromium.org/chromium/chromium/src/+/master:ash/constants/ash_features.cc). + [chrome_features.cc](https://source.chromium.org/chromium/chromium/src/+/main:chrome/common/chrome_features.cc) + or [ash_features.cc](https://source.chromium.org/chromium/chromium/src/+/main:ash/constants/ash_features.cc). Note that changing values in chrome://flags does not work for linux-chromeos, and this flag must be used. * `--enable-ui-devtools[=9223]`: Allow debugging of the system UI through @@ -201,4 +201,4 @@ supplied in the imported .gni file after the `import()` line. For more information (like copying the locally-built Chrome to a device, or running Tast tests), consult Simple Chrome's -[full documentation](https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md). +[full documentation](https://chromium.googlesource.com/chromiumos/docs/+/main/simple_chrome_workflow.md). diff --git a/docs/chromeos_glossary.md b/docs/chromeos_glossary.md index acbb0997193d89..f5feec3eb173bf 100644 --- a/docs/chromeos_glossary.md +++ b/docs/chromeos_glossary.md @@ -1 +1 @@ -See [Chromium OS Glossary](https://chromium.googlesource.com/chromiumos/docs/+/master/glossary.md) +See [Chromium OS Glossary](https://chromium.googlesource.com/chromiumos/docs/+/main/glossary.md) diff --git a/docs/cipd_and_3pp.md b/docs/cipd_and_3pp.md index 8a3b0decae89bb..339f6a3de419b2 100644 --- a/docs/cipd_and_3pp.md +++ b/docs/cipd_and_3pp.md @@ -11,7 +11,7 @@ specified in [DEPS] and updated via `gclient sync`. * You can [browse Chromium's CIPD repository][browse] online. -[CIPD]: https://chromium.googlesource.com/infra/luci/luci-go/+/master/cipd/README.md +[CIPD]: https://chromium.googlesource.com/infra/luci/luci-go/+/main/cipd/README.md [DEPS]: /DEPS [browse]: https://chrome-infra-packages.appspot.com/p/chromium @@ -23,7 +23,7 @@ * By specifying a 3pp package, you can define how to build certain artifacts and where to upload to CIPD. Then our packagers will do the rest for you. -[support_3pp]: https://chromium.googlesource.com/infra/infra/+/master/recipes/README.recipes.md#recipe_modules-support_3pp +[support_3pp]: https://chromium.googlesource.com/infra/infra/+/main/recipes/README.recipes.md#recipe_modules-support_3pp ## Why use CIPD & 3pp?: @@ -96,9 +96,9 @@ into two main sections: * `upload`: contains some details on how the final result gets uploaded to CIPD. See [here][doc_upload] for more details. -[`spec.proto`]: https://chromium.googlesource.com/infra/infra/+/master/recipes/recipe_modules/support_3pp/spec.proto -[doc_create]: https://chromium.googlesource.com/infra/infra/+/master/recipes/README.recipes.md#creation-stages -[doc_upload]: https://chromium.googlesource.com/infra/infra/+/master/recipes/README.recipes.md#upload +[`spec.proto`]: https://chromium.googlesource.com/infra/infra/+/main/recipes/recipe_modules/support_3pp/spec.proto +[doc_create]: https://chromium.googlesource.com/infra/infra/+/main/recipes/README.recipes.md#creation-stages +[doc_upload]: https://chromium.googlesource.com/infra/infra/+/main/recipes/README.recipes.md#upload Staying with the example from above, the file `sample_cipd_dep/3pp/3pp.pb` may be like the following: @@ -355,7 +355,7 @@ cipd_package_definition("my_cipd_package") { sources = [ "//path/to:test_binary_file" ] } ``` -[build/cipd/cipd.gni]: https://source.chromium.org/chromium/chromium/src/+/master:build/cipd/cipd.gni +[build/cipd/cipd.gni]: https://source.chromium.org/chromium/chromium/src/+/main:build/cipd/cipd.gni ### Permissions in CIPD diff --git a/docs/clang_sheriffing.md b/docs/clang_sheriffing.md index ad9b905b8d02b5..ce9ee4be716cc9 100644 --- a/docs/clang_sheriffing.md +++ b/docs/clang_sheriffing.md @@ -198,7 +198,7 @@ work on linker bugs without having to have a Chromium build environment. To use `ld.lld`'s `--reproduce` flag, follow these steps: 1. Locally (build Chromium with a locally-built - clang)[https://chromium.googlesource.com/chromium/src.git/+/master/docs/clang.md#Using-a-custom-clang-binary] + clang)[https://chromium.googlesource.com/chromium/src.git/+/main/docs/clang.md#Using-a-custom-clang-binary] 1. After reproducing the link error, build just the failing target with ninja's `-v -d keeprsp` flags added: diff --git a/docs/clang_tool_refactoring.md b/docs/clang_tool_refactoring.md index 62ec4418d5811e..b7656af4543e2f 100644 --- a/docs/clang_tool_refactoring.md +++ b/docs/clang_tool_refactoring.md @@ -220,7 +220,7 @@ When `--apply-edits` switch is not presented, tool outputs are compared to `*-expected.txt` and if different, the result is saved in `*-actual.txt`. Note that in this case, only one test file is expected. -[//tools/clang]: https://chromium.googlesource.com/chromium/src/+/master/tools/clang/ +[//tools/clang]: https://chromium.googlesource.com/chromium/src/+/main/tools/clang/ [clang-docs-match-finder]: http://clang.llvm.org/doxygen/classclang_1_1ast__matchers_1_1MatchFinder.html [clang-docs-match-callback]: http://clang.llvm.org/doxygen/classclang_1_1ast__matchers_1_1MatchFinder_1_1MatchCallback.html [matcher-reference]: http://clang.llvm.org/docs/LibASTMatchersReference.html @@ -228,7 +228,7 @@ that in this case, only one test file is expected. [clang-docs-replacement]: http://clang.llvm.org/doxygen/classclang_1_1tooling_1_1Replacement.html [clang-docs]: http://clang.llvm.org/doxygen/index.html [clang-tooling-tutorial]: http://clang.llvm.org/docs/LibASTMatchersTutorial.html -[//tools/clang/blink_gc_plugin]: https://chromium.googlesource.com/chromium/src/+/master/tools/clang/blink_gc_plugin/ -[//tools/clang/plugins]: https://chromium.googlesource.com/chromium/src/+/master/tools/clang/plugins/ -[//tools/clang/rewrite_to_chrome_style]: https://chromium.googlesource.com/chromium/src/+/master/tools/clang/rewrite_to_chrome_style/ +[//tools/clang/blink_gc_plugin]: https://chromium.googlesource.com/chromium/src/+/main/tools/clang/blink_gc_plugin/ +[//tools/clang/plugins]: https://chromium.googlesource.com/chromium/src/+/main/tools/clang/plugins/ +[//tools/clang/rewrite_to_chrome_style]: https://chromium.googlesource.com/chromium/src/+/main/tools/clang/rewrite_to_chrome_style/ [clang-tools-extra]: (https://github.com/llvm-mirror/clang-tools-extra) diff --git a/docs/code_reviews.md b/docs/code_reviews.md index a6a7ab1d18c1a6..594edb126d2611 100644 --- a/docs/code_reviews.md +++ b/docs/code_reviews.md @@ -104,7 +104,7 @@ the code is updated. ### OWNERS file details -Refer to the [source code](https://chromium.googlesource.com/chromium/tools/depot_tools/+/master/owners.py) +Refer to the [source code](https://chromium.googlesource.com/chromium/tools/depot_tools/+/main/owners.py) for all details on the file format. This example indicates that two people are owners, in addition to any owners diff --git a/docs/commit_checklist.md b/docs/commit_checklist.md index f65bd690dad444..3d3a09cb161c9b 100644 --- a/docs/commit_checklist.md +++ b/docs/commit_checklist.md @@ -248,7 +248,7 @@ clean up your local branches. These commands will automatically delete merged branches. Mark the associated crbug as "fixed". [//]: # (the reference link section should be alphabetically sorted) -[build-instructions]: https://chromium.googlesource.com/chromium/src.git/+/master/docs/#Checking-Out-and-Building +[build-instructions]: https://chromium.googlesource.com/chromium/src.git/+/main/docs/#Checking-Out-and-Building [chromium-tree]: https://ci.chromium.org/p/chromium/g/main/console [contributing]: contributing.md [simple-chrome]: https://chromium.googlesource.com/chromiumos/docs/+/HEAD/simple_chrome_workflow.md diff --git a/docs/contributing.md b/docs/contributing.md index ff568ce234f321..42c0c7a88c7b8b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -465,7 +465,7 @@ formats. given commit diverged from main. [//]: # (the reference link section should be alphabetically sorted) -[checkout-and-build]: https://chromium.googlesource.com/chromium/src/+/master/docs/#checking-out-and-building +[checkout-and-build]: https://chromium.googlesource.com/chromium/src/+/main/docs/#checking-out-and-building [chrome-dd-review-process]: http://go/chrome-dd-review-process [chromium-design-docs]: https://groups.google.com/a/chromium.org/forum/#!forum/chromium-design-docs [code-reviews-owners]: code_reviews.md#OWNERS-files @@ -475,12 +475,12 @@ formats. [core-principles]: https://www.chromium.org/developers/core-principles [corporate-cla]: https://cla.developers.google.com/about/google-corporate?csw=1 [cr-authors]: https://chromium.googlesource.com/chromium/src/+/HEAD/AUTHORS -[cr-gitiles]: https://chromium.googlesource.com/chromium/src/+/master/ -[cr-styleguide]: https://chromium.googlesource.com/chromium/src/+/master/styleguide/styleguide.md +[cr-gitiles]: https://chromium.googlesource.com/chromium/src/+/main/ +[cr-styleguide]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/styleguide.md [crbug-new]: https://bugs.chromium.org/p/chromium/issues/entry [crbug]: https://bugs.chromium.org/p/chromium/issues/list -[cros-authors]: https://chromium.googlesource.com/chromium/src/+/master/AUTHORS -[cros-dev-guide]: https://chromium.googlesource.com/chromiumos/docs/+/master/developer_guide.md +[cros-authors]: https://chromium.googlesource.com/chromium/src/+/main/AUTHORS +[cros-dev-guide]: https://chromium.googlesource.com/chromiumos/docs/+/main/developer_guide.md [crrev]: https://chromium-review.googlesource.com [depot-tools-setup]: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up [design-doc-template]: https://docs.google.com/document/d/14YBYKgk-uSfjfwpKFlp_omgUq5hwMVazy_M965s_1KA diff --git a/docs/dbus_mojo_connection_service.md b/docs/dbus_mojo_connection_service.md index 5109b764022c44..31f40ef0787529 100644 --- a/docs/dbus_mojo_connection_service.md +++ b/docs/dbus_mojo_connection_service.md @@ -7,7 +7,7 @@ bootstrap CrOS services' Mojo connection. ## Bootstrap a new CrOS service -D-Bus Mojo Connection Service lives in [//chrome/browser/chromeos/dbus/mojo_connection_service_provider.h](https://chromium.googlesource.com/chromium/src.git/+/master/chrome/browser/chromeos/dbus/mojo_connection_service_provider.h). +D-Bus Mojo Connection Service lives in [//chrome/browser/chromeos/dbus/mojo_connection_service_provider.h](https://chromium.googlesource.com/chromium/src.git/+/main/chrome/browser/chromeos/dbus/mojo_connection_service_provider.h). Follow the example of CrOS Sensors' [changelist](https://chromium-review.googlesource.com/c/chromium/src/+/2352298). @@ -47,4 +47,4 @@ be enough for multi-login situations and handling failures. The arguments can also be used to determine if Chromium should accept the request, and which Mojo interface should be used to establish the Mojo channel. -[MojoConnectionService.conf]: https://chromium.googlesource.com/chromium/src.git/+/master/chrome/browser/chromeos/dbus/org.chromium.MojoConnectionService.conf +[MojoConnectionService.conf]: https://chromium.googlesource.com/chromium/src.git/+/main/chrome/browser/chromeos/dbus/org.chromium.MojoConnectionService.conf diff --git a/docs/design/DIR_METADATA b/docs/design/DIR_METADATA index fb07a25cf9dcf0..6d266b077f74d9 100644 --- a/docs/design/DIR_METADATA +++ b/docs/design/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Internals>Core" diff --git a/docs/design/README.md b/docs/design/README.md index f0accfc2949425..44d4e728b66eec 100644 --- a/docs/design/README.md +++ b/docs/design/README.md @@ -3,7 +3,7 @@ This directory contains chromium project documentation in [Gitiles-flavored Markdown](https://gerrit.googlesource.com/gitiles/+/master/Documentation/markdown.md). It is automatically -[rendered by Gitiles](https://chromium.googlesource.com/chromium/src/+/master/docs/). +[rendered by Gitiles](https://chromium.googlesource.com/chromium/src/+/main/docs/). Documents here have been imported from [the Project site](https://www.chromium.org/developers/design-documents). diff --git a/docs/disassemble_code.md b/docs/disassemble_code.md index f516666ea6fe73..13d68b15e4ff4d 100644 --- a/docs/disassemble_code.md +++ b/docs/disassemble_code.md @@ -1,6 +1,6 @@ # Dumping the compiled code from a chrome binary -[Rendered](https://chromium.googlesource.com/chromium/src/+/master/docs/disassemble_code.md) +[Rendered](https://chromium.googlesource.com/chromium/src/+/main/docs/disassemble_code.md) ## Background @@ -193,6 +193,6 @@ NextSibling(): ## Further reading -https://chromium.googlesource.com/chromium/src/+/master/docs/linux/minidump_to_core.md#Source-debugging +https://chromium.googlesource.com/chromium/src/+/main/docs/linux/minidump_to_core.md#Source-debugging https://www.chromium.org/developers/how-tos/debugging-on-windows diff --git a/docs/documentation_guidelines.md b/docs/documentation_guidelines.md index e934bbc83c52a5..a2e0937e0c56a8 100644 --- a/docs/documentation_guidelines.md +++ b/docs/documentation_guidelines.md @@ -65,7 +65,7 @@ Don't assume that readers know everything you currently know. If you got this far and have some experience with Chromium's code, you'll have figured out that these guidelines are aspirational more than what the world looks like today. So what do we do when working with existing code. -First off: ***[Documentation changes can be TBRed](https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#documentation-updates)***. Even in-code changes. If you have discovered something that isn't documented, have figured out how it works and would like to pay it forward, feel free to write something down and check it in. +First off: ***[Documentation changes can be TBRed](https://chromium.googlesource.com/chromium/src/+/main/docs/code_reviews.md#documentation-updates)***. Even in-code changes. If you have discovered something that isn't documented, have figured out how it works and would like to pay it forward, feel free to write something down and check it in. At the component level, if you are the owner of a component that isn't documented, please add a README.md with content as per the above. diff --git a/docs/enterprise/active_directory_native_integration.md b/docs/enterprise/active_directory_native_integration.md index 8f2cd4b57b98b6..786bacfa622955 100644 --- a/docs/enterprise/active_directory_native_integration.md +++ b/docs/enterprise/active_directory_native_integration.md @@ -78,7 +78,7 @@ For this purpose, DM Server creates a LaForge account for the user. A LaForge account is a shadow Gaia account with scope limited to the Play Store. To prove the user's identity, a SAML flow is employed with DM Server as service provider and AD (or really any other) as identity provider. The SAML flow is triggered by -[ArcActiveDirectoryEnrollmentTokenFetcher](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ash/arc/auth/arc_active_directory_enrollment_token_fetcher.h). +[ArcActiveDirectoryEnrollmentTokenFetcher](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ash/arc/auth/arc_active_directory_enrollment_token_fetcher.h). ### Instructions for Google Employees See [go/cros-ad-test-env](https://goto.google.com/cros-ad-test-env) for setting diff --git a/docs/enterprise/add_new_policy.md b/docs/enterprise/add_new_policy.md index 5cac32d1252727..1960516b8bcc88 100644 --- a/docs/enterprise/add_new_policy.md +++ b/docs/enterprise/add_new_policy.md @@ -65,7 +65,7 @@ Usually you need a policy when traditionally, and we've seen requests from organizations to explicitly spell out the behavior for all possible values and for when the policy is unset. - - See [description_guidelines.md](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/docs/enterprise/description_guidelines.md) + - See [description_guidelines.md](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/enterprise/description_guidelines.md) for additional guidelines when creating a description, including how various products should be referenced. 3. Create a preference and map the policy value to it. @@ -85,9 +85,9 @@ Usually you need a policy when 3. Test the mapping by adding policy to [policy_test_cases.json](https://cs.chromium.org/chromium/src/chrome/test/data/policy/policy_test_cases.json?q=policy_test_case). 4. iOS platform has its own - [configuration_policy_handler_list_factory.mm](https://source.chromium.org/chromium/chromium/src/+/master:ios/chrome/browser/policy/configuration_policy_handler_list_factory.mm) + [configuration_policy_handler_list_factory.mm](https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/browser/policy/configuration_policy_handler_list_factory.mm) and - [policy_test_cases.json](https://source.chromium.org/chromium/chromium/src/+/master:ios/chrome/test/data/policy/policy_test_cases.json) + [policy_test_cases.json](https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/data/policy/policy_test_cases.json) file. 4. Disable the user setting UI when the policy is applied. - If your feature can be controlled by GUI in `chrome://settings`, the diff --git a/docs/enterprise/extension_query_script.md b/docs/enterprise/extension_query_script.md index 36c9d06eebbede..2d573221eddee3 100644 --- a/docs/enterprise/extension_query_script.md +++ b/docs/enterprise/extension_query_script.md @@ -24,8 +24,8 @@ Before using CBCM Takeout API you will need to do some initial setup: ## Running the Script You can download the scripts -[here](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/docs/enterprise/extension_query.py) -or here [here](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/docs/enterprise/extension_query_py2.py) +[here](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/enterprise/extension_query.py) +or here [here](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/enterprise/extension_query_py2.py) for a python 2.7 compatible version. With the service account keys, you can now run the script which uses Google API @@ -40,4 +40,4 @@ You can run the script from the command-line: python extension_query.py argument names) Example Data output Here is an example of what that data will look like: -![Sample Results](https://chromium.googlesource.com/chromium/src/+/refs/heads/master/docs/enterprise/extension_query_sample.png) +![Sample Results](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/enterprise/extension_query_sample.png) diff --git a/docs/gpu/debugging_gpu_related_code.md b/docs/gpu/debugging_gpu_related_code.md index af232c38e98d15..eb824732811a78 100644 --- a/docs/gpu/debugging_gpu_related_code.md +++ b/docs/gpu/debugging_gpu_related_code.md @@ -76,7 +76,7 @@ Change that `#if 0` to `#if 1`, build a debug build, then run in a debugger. The debugger will break when any renderer code sees a GL error, and you should be able to examine the call stack to find the issue. -[gles2_implementation.h]: https://chromium.googlesource.com/chromium/src/+/master/gpu/command_buffer/client/gles2_implementation.h +[gles2_implementation.h]: https://chromium.googlesource.com/chromium/src/+/main/gpu/command_buffer/client/gles2_implementation.h ### Labeling your calls diff --git a/docs/gpu/gpu_testing.md b/docs/gpu/gpu_testing.md index 7b73a60394cf0a..67e4ce65f1a7a6 100644 --- a/docs/gpu/gpu_testing.md +++ b/docs/gpu/gpu_testing.md @@ -43,9 +43,9 @@ the previous configuration where new steps were added blindly, and could cause failures on the tryservers. For more details about the configuration of the bots, see the [GPU bot details]. -[recipe framework]: https://chromium.googlesource.com/external/github.com/luci/recipes-py/+/master/doc/user_guide.md -[recipes/chromium]: https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/slave/recipes/chromium.py -[recipes/chromium_trybot]: https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/slave/recipes/chromium_trybot.py +[recipe framework]: https://chromium.googlesource.com/external/github.com/luci/recipes-py/+/main/doc/user_guide.md +[recipes/chromium]: https://chromium.googlesource.com/chromium/tools/build/+/main/scripts/slave/recipes/chromium.py +[recipes/chromium_trybot]: https://chromium.googlesource.com/chromium/tools/build/+/main/scripts/slave/recipes/chromium_trybot.py [GPU bot details]: gpu_testing_bot_details.md The physical hardware for the GPU bots lives in the Swarming pool\*. The @@ -159,7 +159,7 @@ If you find it necessary to try patches against other sub-repositories than Chromium (`src/`) and ANGLE (`src/third_party/angle/`), please [file a bug](http://crbug.com/new) with component Internals\>GPU\>Testing. -[ANGLE project]: https://chromium.googlesource.com/angle/angle/+/master/README.md +[ANGLE project]: https://chromium.googlesource.com/angle/angle/+/main/README.md [tryserver.chromium.angle]: https://build.chromium.org/p/tryserver.chromium.angle/waterfall [file a bug]: http://crbug.com/new @@ -505,15 +505,15 @@ invoke it via: The tests that are run by the GPU bots are described by a couple of JSON files in the Chromium workspace: -* [`chromium.gpu.json`](https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/chromium.gpu.json) -* [`chromium.gpu.fyi.json`](https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/chromium.gpu.fyi.json) +* [`chromium.gpu.json`](https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/chromium.gpu.json) +* [`chromium.gpu.fyi.json`](https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/chromium.gpu.fyi.json) These files are autogenerated by the following script: -* [`generate_buildbot_json.py`](https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/generate_buildbot_json.py) +* [`generate_buildbot_json.py`](https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/generate_buildbot_json.py) This script is documented in -[`testing/buildbot/README.md`](https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/README.md). The +[`testing/buildbot/README.md`](https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/README.md). The JSON files are parsed by the chromium and chromium_trybot recipes, and describe two basic types of tests: diff --git a/docs/gpu/gpu_testing_bot_details.md b/docs/gpu/gpu_testing_bot_details.md index be83fbb5f03c41..850d860cffd6f5 100644 --- a/docs/gpu/gpu_testing_bot_details.md +++ b/docs/gpu/gpu_testing_bot_details.md @@ -66,7 +66,7 @@ differences in behavior between the tryservers and waterfall bots. Since the tryservers mirror waterfall bots, if the waterfall bot is working, the tryserver must almost inherently be working as well. -[chromium_trybot.py]: https://chromium.googlesource.com/chromium/tools/build/+/master/recipes/recipes/chromium_trybot.py +[chromium_trybot.py]: https://chromium.googlesource.com/chromium/tools/build/+/main/recipes/recipes/chromium_trybot.py There are some GPU configurations on the waterfall backed by only one machine, or a very small number of machines in the Swarming pool. A few examples are: @@ -102,11 +102,11 @@ background on [Isolates] and [Swarming]. your target. Find a similar target to yours in order to determine the `type`. The type is referenced in [`src/tools/mb/mb.py`][mb.py]. -[testing/test.gni]: https://chromium.googlesource.com/chromium/src/+/master/testing/test.gni -[gpu/BUILD.gn]: https://chromium.googlesource.com/chromium/src/+/master/gpu/BUILD.gn -[chrome/test/BUILD.gn]: https://chromium.googlesource.com/chromium/src/+/master/chrome/test/BUILD.gn -[gn_isolate_map.pyl]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/gn_isolate_map.pyl -[mb.py]: https://chromium.googlesource.com/chromium/src/+/master/tools/mb/mb.py +[testing/test.gni]: https://chromium.googlesource.com/chromium/src/+/main/testing/test.gni +[gpu/BUILD.gn]: https://chromium.googlesource.com/chromium/src/+/main/gpu/BUILD.gn +[chrome/test/BUILD.gn]: https://chromium.googlesource.com/chromium/src/+/main/chrome/test/BUILD.gn +[gn_isolate_map.pyl]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/gn_isolate_map.pyl +[mb.py]: https://chromium.googlesource.com/chromium/src/+/main/tools/mb/mb.py At this point you can build and upload your isolate to the isolate server. @@ -177,9 +177,9 @@ In the [`tools/build`][tools/build] workspace: specific hardware configuration. [tools/build]: https://chromium.googlesource.com/chromium/tools/build/ -[chromium_gpu.py]: https://chromium.googlesource.com/chromium/tools/build/+/master/recipes/recipe_modules/chromium_tests/builders/chromium_gpu.py -[chromium_gpu_fyi.py]: https://chromium.googlesource.com/chromium/tools/build/+/master/recipes/recipe_modules/chromium_tests/builders/chromium_gpu_fyi.py -[trybots.py]: https://chromium.googlesource.com/chromium/tools/build/+/master/recipes/recipe_modules/chromium_tests/trybots.py +[chromium_gpu.py]: https://chromium.googlesource.com/chromium/tools/build/+/main/recipes/recipe_modules/chromium_tests/builders/chromium_gpu.py +[chromium_gpu_fyi.py]: https://chromium.googlesource.com/chromium/tools/build/+/main/recipes/recipe_modules/chromium_tests/builders/chromium_gpu_fyi.py +[trybots.py]: https://chromium.googlesource.com/chromium/tools/build/+/main/recipes/recipe_modules/chromium_tests/trybots.py In the [`chromium/src`][chromium/src] workspace: @@ -213,21 +213,21 @@ In the [`chromium/src`][chromium/src] workspace: how builds are triggered, which VMs or machines are used for the builder itself, i.e. for compilation and scheduling swarmed tasks on GPU hardware. See - [README.md](https://chromium.googlesource.com/chromium/src/+/master/infra/config/README.md) + [README.md](https://chromium.googlesource.com/chromium/src/+/main/infra/config/README.md) in this directory for up to date information. [chromium/src]: https://chromium.googlesource.com/chromium/src/ -[src/testing/buildbot]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot -[src/infra/config]: https://chromium.googlesource.com/chromium/src/+/master/infra/config -[chromium.gpu.json]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/chromium.gpu.json -[chromium.gpu.fyi.json]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/chromium.gpu.fyi.json -[gn_isolate_map.pyl]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/gn_isolate_map.pyl -[mb_config.pyl]: https://chromium.googlesource.com/chromium/src/+/master/tools/mb/mb_config.pyl -[generate_buildbot_json.py]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/generate_buildbot_json.py -[mixins.pyl]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/mixins.pyl -[waterfalls.pyl]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/waterfalls.pyl -[test_suites.pyl]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/test_suites.pyl -[test_suite_exceptions.pyl]: https://chromium.googlesource.com/chromium/src/+/master/testing/buildbot/test_suite_exceptions.pyl +[src/testing/buildbot]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot +[src/infra/config]: https://chromium.googlesource.com/chromium/src/+/main/infra/config +[chromium.gpu.json]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/chromium.gpu.json +[chromium.gpu.fyi.json]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/chromium.gpu.fyi.json +[gn_isolate_map.pyl]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/gn_isolate_map.pyl +[mb_config.pyl]: https://chromium.googlesource.com/chromium/src/+/main/tools/mb/mb_config.pyl +[generate_buildbot_json.py]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/generate_buildbot_json.py +[mixins.pyl]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/mixins.pyl +[waterfalls.pyl]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/waterfalls.pyl +[test_suites.pyl]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/test_suites.pyl +[test_suite_exceptions.pyl]: https://chromium.googlesource.com/chromium/src/+/main/testing/buildbot/test_suite_exceptions.pyl [README for generate_buildbot_json.py]: ../../testing/buildbot/README.md In the [`infradata/config`][infradata/config] workspace (Google internal only, @@ -246,11 +246,11 @@ sorry): triggered trybots. [infradata/config]: https://chrome-internal.googlesource.com/infradata/config -[gpu.star]: https://chrome-internal.googlesource.com/infradata/config/+/master/configs/chromium-swarm/starlark/bots/chromium/gpu.star -[chromium.star]: https://chrome-internal.googlesource.com/infradata/config/+/master/configs/chromium-swarm/starlark/bots/chromium/chromium.star -[pools.cfg]: https://chrome-internal.googlesource.com/infradata/config/+/master/configs/chromium-swarm/pools.cfg -[main.star]: https://chrome-internal.googlesource.com/infradata/config/+/master/main.star -[vms.cfg]: https://chrome-internal.googlesource.com/infradata/config/+/master/configs/gce-provider/vms.cfg +[gpu.star]: https://chrome-internal.googlesource.com/infradata/config/+/main/configs/chromium-swarm/starlark/bots/chromium/gpu.star +[chromium.star]: https://chrome-internal.googlesource.com/infradata/config/+/main/configs/chromium-swarm/starlark/bots/chromium/chromium.star +[pools.cfg]: https://chrome-internal.googlesource.com/infradata/config/+/main/configs/chromium-swarm/pools.cfg +[main.star]: https://chrome-internal.googlesource.com/infradata/config/+/main/main.star +[vms.cfg]: https://chrome-internal.googlesource.com/infradata/config/+/main/configs/gce-provider/vms.cfg ## Walkthroughs of various maintenance scenarios @@ -261,7 +261,7 @@ maintaining the GPU bots, and how they'd be addressed. This is described in [Adding new tests to the GPU bots]. -[Adding new tests to the GPU bots]: https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/gpu_testing.md#Adding-New-Tests-to-the-GPU-Bots +[Adding new tests to the GPU bots]: https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/gpu_testing.md#Adding-New-Tests-to-the-GPU-Bots ### How to set up new virtual machine instances @@ -486,14 +486,14 @@ Attempting to set up the builder/tester pair without first landing the [`tools/build`][tools/build] CL for the new builder will result in things breaking as seen in [this bug][misconfigured builder bug]. -[How to add a new manually-triggered trybot]: https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/gpu_testing_bot_details.md#How-to-add-a-new-manually_triggered-trybot +[How to add a new manually-triggered trybot]: https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/gpu_testing_bot_details.md#How-to-add-a-new-manually_triggered-trybot -[ci.star]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/subprojects/ci.star -[chromium.gpu.star]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/consoles/chromium.gpu.star -[chromium.gpu.fyi.star]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/consoles/chromium.gpu.fyi.star -[cr-buildbucket.cfg]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/generated/cr-buildbucket.cfg -[luci-scheduler.cfg]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/generated/luci-scheduler.cfg -[luci-milo.cfg]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/generated/luci-milo.cfg +[ci.star]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/subprojects/ci.star +[chromium.gpu.star]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/consoles/chromium.gpu.star +[chromium.gpu.fyi.star]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/consoles/chromium.gpu.fyi.star +[cr-buildbucket.cfg]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/generated/cr-buildbucket.cfg +[luci-scheduler.cfg]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/generated/luci-scheduler.cfg +[luci-milo.cfg]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/generated/luci-milo.cfg [GPU FYI Win Builder]: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/GPU%20FYI%20Win%20Builder [misconfigured builder bug]: https://bugs.chromium.org/p/chromium/issues/detail?id=1163657 @@ -526,7 +526,7 @@ Even for GPU types that have CQ trybots, it is convenient to have manually-triggered trybots as well, since the CQ trybot often runs on more than one GPU type, or some test suites which run on CI bot can be disabled on CQ trybot (when the CQ bot mirrors a -[fake bot](https://chromium.googlesource.com/chromium/src/+/master/docs/gpu/gpu_testing_bot_details.md#how-to-add-a-new-try-bot-that-runs-a-subset-of-tests-or-extra-tests)). +[fake bot](https://chromium.googlesource.com/chromium/src/+/main/docs/gpu/gpu_testing_bot_details.md#how-to-add-a-new-try-bot-that-runs-a-subset-of-tests-or-extra-tests)). Thus, all CI bots in `chromium.gpu` and `chromium.gpu.fyi` have corresponding manually-triggered trybots, except a few which don't have enough hardware to support it. A manually-triggered trybot should be added at the same time @@ -592,9 +592,9 @@ should be possible to send a CL to it. mentioned at the bottom of the "Choose tryjobs" pop-up. Contact the chrome-infra team if this doesn't work as expected.) -[gpu.try.star]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/subprojects/gpu.try.star -[luci.chromium.try.star]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/consoles/luci.chromium.try.star -[tryserver.chromium.win.star]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/consoles/tryserver.chromium.win.star +[gpu.try.star]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/subprojects/gpu.try.star +[luci.chromium.try.star]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/consoles/luci.chromium.try.star +[tryserver.chromium.win.star]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/consoles/tryserver.chromium.win.star ### How to add a new try bot that runs a subset of tests or extra tests @@ -655,8 +655,8 @@ Win10 Release (CoolNewGPUType)". 1. After your CLs land you should be able to find and run `win-myproject-rel` on CLs using Choose Trybots in Gerrit. -[scheduler-noop-jobs.star]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/generators/scheduler-noop-jobs.star -[try.star]: https://chromium.googlesource.com/chromium/src/+/master/infra/config/subprojects/try.star +[scheduler-noop-jobs.star]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/generators/scheduler-noop-jobs.star +[try.star]: https://chromium.googlesource.com/chromium/src/+/main/infra/config/subprojects/try.star ### How to test and deploy a driver and/or OS update diff --git a/docs/gpu/pixel_wrangling.md b/docs/gpu/pixel_wrangling.md index befb4a61aa7712..f1ba7b54951d13 100644 --- a/docs/gpu/pixel_wrangling.md +++ b/docs/gpu/pixel_wrangling.md @@ -61,7 +61,7 @@ so on. The waterfalls we’re interested in are: [Chromium GPU FYI]: https://ci.chromium.org/p/chromium/g/chromium.gpu.fyi/console?reload=120 [Chromium SwANGLE]: https://ci.chromium.org/p/chromium/g/chromium.swangle/console?reload=120 [ANGLE tryservers]: https://build.chromium.org/p/tryserver.chromium.angle/waterfall -[ANGLE Wrangler]: https://chromium.googlesource.com/angle/angle/+/master/infra/ANGLEWrangling.md +[ANGLE Wrangler]: https://chromium.googlesource.com/angle/angle/+/main/infra/ANGLEWrangling.md ## Test Suites @@ -279,7 +279,7 @@ shift, and a calendar appointment. modifier][gtest-DISABLED] to suppress any failures if necessary. [Sheriff-O-Matic]: https://sheriff-o-matic.appspot.com/chromium.gpu -[trim culprit cls]: https://source.chromium.org/chromium/chromium/src/+/master:content/test/gpu/trim_culprit_cls.py +[trim culprit cls]: https://source.chromium.org/chromium/chromium/src/+/main:content/test/gpu/trim_culprit_cls.py [tree sheriffing page]: https://sites.google.com/a/chromium.org/dev/developers/tree-sheriffs [linux-rel]: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux-rel [luci.chromium.try]: https://ci.chromium.org/p/chromium/g/luci.chromium.try/builders @@ -293,10 +293,10 @@ https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win7-rel [Swarming Server Stats]: https://chromium-swarm.appspot.com/stats [gold less common failures]: gpu_pixel_testing_with_gold.md#Triaging-Less-Common-Failures [Chrome Internal GPU Pixel Wrangling Instructions]: https://sites.google.com/a/google.com/client3d/documents/chrome-internal-gpu-pixel-wrangling-instructions -[src/content/test/gpu/gpu_tests/test_expectations]: https://chromium.googlesource.com/chromium/src/+/master/content/test/gpu/gpu_tests/test_expectations -[webgl_conformance_expectations.txt]: https://chromium.googlesource.com/chromium/src/+/master/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt -[gpu_process_expectations.txt]: https://chromium.googlesource.com/chromium/src/+/master/content/test/gpu/gpu_tests/test_expectations/gpu_process_expectations.txt -[pixel_expectations.txt]: https://chromium.googlesource.com/chromium/src/+/master/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt +[src/content/test/gpu/gpu_tests/test_expectations]: https://chromium.googlesource.com/chromium/src/+/main/content/test/gpu/gpu_tests/test_expectations +[webgl_conformance_expectations.txt]: https://chromium.googlesource.com/chromium/src/+/main/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt +[gpu_process_expectations.txt]: https://chromium.googlesource.com/chromium/src/+/main/content/test/gpu/gpu_tests/test_expectations/gpu_process_expectations.txt +[pixel_expectations.txt]: https://chromium.googlesource.com/chromium/src/+/main/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt [stamping out flakiness]: gpu_testing.md#Stamping-out-Flakiness [gtest-DISABLED]: https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md#temporarily-disabling-tests [rendering_representative_perf_tests]: ../testing/rendering_representative_perf_tests.md#Updating-Expectations diff --git a/docs/gpu/swiftshader.md b/docs/gpu/swiftshader.md index 746f8e628e11fb..7d3472ab6f83d6 100644 --- a/docs/gpu/swiftshader.md +++ b/docs/gpu/swiftshader.md @@ -35,5 +35,5 @@ When running the **chrome** executable from the command line, SwiftShader can be > **\-\-use-gl=swiftshader** 4) As the WebGL fallback, legacy SwiftShader Open GL ES libraries >**\-\-use-gl=swiftshader-webgl** -5) As the Vulkan driver (requires the [enable_swiftshader_vulkan](https://source.chromium.org/chromium/chromium/src/+/master:gpu/vulkan/features.gni;l=16) feature) +5) As the Vulkan driver (requires the [enable_swiftshader_vulkan](https://source.chromium.org/chromium/chromium/src/+/main:gpu/vulkan/features.gni;l=16) feature) >**--use-vulkan=swiftshader** diff --git a/docs/gpu/vaapi.md b/docs/gpu/vaapi.md index a81787ac154a2b..10a6af1708e83a 100644 --- a/docs/gpu/vaapi.md +++ b/docs/gpu/vaapi.md @@ -14,9 +14,9 @@ ChromeOS is a downstream client via the [libva] package, with packaged backends for e.g. both [Intel] and [AMD]. [VaAPI GitHub repository]: https://github.com/intel/libva -[libva]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/x11-libs/libva/ -[Intel]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/x11-libs/libva-intel-driver/ -[AMD]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/media-libs/libva-amdgpu-driver/ +[libva]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/main/x11-libs/libva/ +[Intel]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/main/x11-libs/libva-intel-driver/ +[AMD]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/main/media-libs/libva-amdgpu-driver/ ## Tracing VaAPI video decoding @@ -141,7 +141,7 @@ As can be seen, `pkg` ~= `pp0` + `pp1` + 1W, this extra watt is the cost of all the associated silicon, e.g. bridges, bus controllers, caches, and the media processing engine. -[`dump_intel_rapl_consumption`]: https://chromium.googlesource.com/chromiumos/platform2/+/master/power_manager/tools/dump_intel_rapl_consumption.cc +[`dump_intel_rapl_consumption`]: https://chromium.googlesource.com/chromiumos/platform2/+/main/power_manager/tools/dump_intel_rapl_consumption.cc [video]: https://commons.wikimedia.org/wiki/File:Big_Buck_Bunny_4K.webm [go/power-consumption-meas-in-intel]: http://go/power-consumption-meas-in-intel @@ -160,7 +160,7 @@ and under Debian systems ([vainfo]). `vainfo` will try to load the appropriate backend driver for the system and/or GPUs and fail if it cannot find/load it. [libva-utils]: https://github.com/intel/libva-utils -[media-video/libva-utils]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/media-video/libva-utils +[media-video/libva-utils]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/main/media-video/libva-utils [vainfo]: https://packages.debian.org/sid/main/vainfo ### Verify the VaAPI supports and/or uses a given codec diff --git a/docs/graphical_debugging_aid_chromium_views.md b/docs/graphical_debugging_aid_chromium_views.md index 1988b7b0495d32..728dde8b119cd2 100644 --- a/docs/graphical_debugging_aid_chromium_views.md +++ b/docs/graphical_debugging_aid_chromium_views.md @@ -9,7 +9,7 @@ debugging. It consists of 4 components: `ui/views/debug_utils.h`), 1. a custom debugger command - For GDB, see - [gdbinit](https://chromium.googlesource.com/chromium/src/+/master/docs/gdbinit.md), + [gdbinit](https://chromium.googlesource.com/chromium/src/+/main/docs/gdbinit.md), - For LLDB, use `tools/lldb/lldb_viewg.py` - For other debuggers, it should be relatively easy to adapt the above scripts. @@ -24,7 +24,7 @@ To use the tool, 1. Make sure you have 'dot' installed (part of graphViz), 1. run gdb/lldb on your build and 1. For GDB see - [gdbinit](https://chromium.googlesource.com/chromium/src/+/master/docs/gdbinit.md), + [gdbinit](https://chromium.googlesource.com/chromium/src/+/main/docs/gdbinit.md), 1. For LLDB `command script import tools/lldb/lldb_viewg.py` (this can be done automatically in `.lldbinit`), 1. stop at any breakpoint inside class `View` (or any derived class), and diff --git a/docs/how_cc_works.md b/docs/how_cc_works.md index 981ca15ebd900e..5a9eab73f0e79d 100644 --- a/docs/how_cc_works.md +++ b/docs/how_cc_works.md @@ -362,7 +362,7 @@ A BSP tree is used to sort and intersect these against each other in the same 3d ## Glossary -See: [cc/README.md](https://chromium.googlesource.com/chromium/src/+/master/cc/README.md#glossaries) +See: [cc/README.md](https://chromium.googlesource.com/chromium/src/+/main/cc/README.md#glossaries) ## Other Resources diff --git a/docs/how_to_add_your_feature_flag.md b/docs/how_to_add_your_feature_flag.md index 686568ff2c75dd..22876832554a0b 100644 --- a/docs/how_to_add_your_feature_flag.md +++ b/docs/how_to_add_your_feature_flag.md @@ -12,7 +12,7 @@ For example, if you want to use the flag in src/content, you should add a base:: * [content/public/common/content_features.h](https://cs.chromium.org/chromium/src/content/public/common/content_features.h) If you want to use the flag in blink, you should also read -[Runtime Enable Features](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/renderer/platform/RuntimeEnabledFeatures.md). +[Runtime Enable Features](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/renderer/platform/RuntimeEnabledFeatures.md). You can refer to [this CL](https://chromium-review.googlesource.com/c/554510/) and [this document](initialize_blink_features.md) to see @@ -22,7 +22,7 @@ to see [[2](https://chromium-review.googlesource.com/c/554510/8/content/public/common/content_features.h)] 2. how to use it [[1](https://chromium-review.googlesource.com/c/554510/8/content/common/service_worker/service_worker_utils.cc#153)] -3. how to wire your new base::Feature to a blink runtime feature[[1](https://chromium.googlesource.com/chromium/src/+/master/docs/initialize_blink_features.md)] +3. how to wire your new base::Feature to a blink runtime feature[[1](https://chromium.googlesource.com/chromium/src/+/main/docs/initialize_blink_features.md)] 4. how to use it in blink [[1](https://chromium-review.googlesource.com/c/554510/8/third_party/blnk/renderere/core/workers/worker_thread.cc)] diff --git a/docs/images/DIR_METADATA b/docs/images/DIR_METADATA index 595fd00be1d207..2acb1265c14dcb 100644 --- a/docs/images/DIR_METADATA +++ b/docs/images/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Blink>Image" diff --git a/docs/infra/DIR_METADATA b/docs/infra/DIR_METADATA index 6cffdc204e49b9..35183ba459beac 100644 --- a/docs/infra/DIR_METADATA +++ b/docs/infra/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Infra>Client>Chrome" diff --git a/docs/inlined_stack_traces.md b/docs/inlined_stack_traces.md index 07e010121cf26d..758425c1bafe5b 100644 --- a/docs/inlined_stack_traces.md +++ b/docs/inlined_stack_traces.md @@ -1,6 +1,6 @@ # Dealing with stack traces that involve inlined code -[Rendered](https://chromium.googlesource.com/chromium/src/+/master/docs/inlined_stack_traces.md) +[Rendered](https://chromium.googlesource.com/chromium/src/+/main/docs/inlined_stack_traces.md) Sometimes we get crashes with stack traces that are hard to use. They may contain the file and line-number for the inlined method @@ -57,7 +57,7 @@ so the code we are interested in is at `0x17c3a78`. ## Dumping the compiled code -[This doc](https://chromium.googlesource.com/chromium/src/+/master/docs/disassemble_code.md) describes how to dump the assembler code for a method from a binary. +[This doc](https://chromium.googlesource.com/chromium/src/+/main/docs/disassemble_code.md) describes how to dump the assembler code for a method from a binary. In this example, it's a crash from an Android Chrome binary. Only Googlers have access to the unstripped binary files needed for this example but the steps are generic and work with any version of Chromium diff --git a/docs/ios/infra.md b/docs/ios/infra.md index c61dac56916bcb..7396eff4e86ed8 100644 --- a/docs/ios/infra.md +++ b/docs/ios/infra.md @@ -372,14 +372,14 @@ If `artifact` is a directory, you must specify `"compress": true`. [gitiles]: https://gerrit.googlesource.com/gitiles [GN]: ../../tools/gn [instructions]: ./build_instructions.md -[iOS recipes]: https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/slave/recipes/ios +[iOS recipes]: https://chromium.googlesource.com/chromium/tools/build/+/main/scripts/slave/recipes/ios [iOS simulator]: ../../testing/iossim -[recipe module]: https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/slave/recipe_modules/ios +[recipe module]: https://chromium.googlesource.com/chromium/tools/build/+/main/scripts/slave/recipe_modules/ios [recipes]: https://chromium.googlesource.com/infra/infra/+/HEAD/doc/users/recipes.md [simulator]: https://developer.apple.com/library/content/documentation/IDEs/Conceptual/iOS_Simulator_Guide/Introduction/Introduction.html [src/ios/build/bots]: ../../ios/build/bots [src/ios/build/bots/scripts]: ../../ios/build/bots/scripts -[swarming]: https://chromium.googlesource.com/infra/luci/luci-py/+/master/appengine/swarming/ +[swarming]: https://chromium.googlesource.com/infra/luci/luci-py/+/main/appengine/swarming/ [swarming server]: https://chromium-swarm.appspot.com [test runner]: ../../ios/build/bots/scripts/test_runner.py [tools/build]: https://chromium.googlesource.com/chromium/tools/build diff --git a/docs/ios/multiwindow_eg_tests.md b/docs/ios/multiwindow_eg_tests.md index e16fe46ecac79f..3916e59b7e833e 100644 --- a/docs/ios/multiwindow_eg_tests.md +++ b/docs/ios/multiwindow_eg_tests.md @@ -17,7 +17,7 @@ windows with the same number. You can use unlikely case it is needed. Depending on the needs of the test, you can decide on how to proceed, for example wanting to keep the left window as 0 and the right window as 1. See -[`[BrowserViewControllerTestCase testMultiWindowURLLoading]`](https://source.chromium.org/chromium/chromium/src/+/master:ios/chrome/browser/ui/browser_view/browser_view_controller_egtest.mm;l=209) +[`[BrowserViewControllerTestCase testMultiWindowURLLoading]`](https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/browser/ui/browser_view/browser_view_controller_egtest.mm;l=209) as an example of this. ## Helpers @@ -28,7 +28,7 @@ single window counterpart versions but with an extra `inWindowWithNumber` parameter. The helpers all live in -[ios/chrome/test/earl_grey/chrome_earl_grey.h](https://source.chromium.org/chromium/chromium/src/+/master:ios/chrome/test/earl_grey/chrome_earl_grey.h) +[ios/chrome/test/earl_grey/chrome_earl_grey.h](https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h) ### Window Management @@ -182,7 +182,7 @@ Thanks to the root matcher, a limited number of matchers, require the window number to be specified. `WindowWithNumber` is useful as a root matcher and `MatchInWindowWithNumber` if you want to match without using a root matcher: -[ios/chrome/test/earl_grey/chrome_matchers.h](https://source.chromium.org/chromium/chromium/src/+/master:ios/chrome/test/earl_grey/chrome_matchers.h) +[ios/chrome/test/earl_grey/chrome_matchers.h](https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_matchers.h) ``` // Matcher for a window with a given number. @@ -215,7 +215,7 @@ Drag and drop. But XCUI is good at that, so there are two new client-side-triggered actions that can be used, that work across multiple windows: -[ios/chrome/test/earl_grey/chrome_xcui_actions.h](https://source.chromium.org/chromium/chromium/src/+/master:ios/chrome/test/earl_grey/chrome_xcui_actions.h) +[ios/chrome/test/earl_grey/chrome_xcui_actions.h](https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h) ``` // Action (XCUI, hence local) to long press a cell item with diff --git a/docs/ios/testing.md b/docs/ios/testing.md index e761bd928f33c5..5563790d32049a 100644 --- a/docs/ios/testing.md +++ b/docs/ios/testing.md @@ -197,7 +197,7 @@ The invocation args are logged. You can find the latest arg format at the beginning of stdout from an infra test shard if the above doesn't work. -[config the bots]: https://chromium.googlesource.com/chromium/src/testing/+/refs/heads/master/buildbot/README.md#buildbot-testing-configuration-files +[config the bots]: https://chromium.googlesource.com/chromium/src/testing/+/refs/heads/main/buildbot/README.md#buildbot-testing-configuration-files [Defining Test Cases and Test Methods]: https://developer.apple.com/documentation/xctest/defining_test_cases_and_test_methods?language=objc [EarlGrey]: https://github.com/google/EarlGrey/tree/earlgrey2 [EarlGrey APIs]: https://github.com/google/EarlGrey/blob/master/docs/api.md @@ -206,5 +206,5 @@ beginning of stdout from an infra test shard if the above doesn't work. [Example CL adding App Interface]: https://chromium-review.googlesource.com/c/chromium/src/+/1919147 [instructions]: ./build_instructions.md [Running Tests and Viewing Results]: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/05-running_tests.html -[this AppLaunchManager API]: https://source.chromium.org/chromium/chromium/src/+/master:ios/testing/earl_grey/app_launch_manager.h;drc=d0889865de20c5b3bc59d58674eb2dcc02dd2269;l=47 +[this AppLaunchManager API]: https://source.chromium.org/chromium/chromium/src/+/main:ios/testing/earl_grey/app_launch_manager.h;drc=d0889865de20c5b3bc59d58674eb2dcc02dd2269;l=47 [XCUITest]: https://developer.apple.com/documentation/xctest diff --git a/docs/lacros.md b/docs/lacros.md index 8f5d446c6fd646..2468bf5e200e7f 100644 --- a/docs/lacros.md +++ b/docs/lacros.md @@ -29,26 +29,26 @@ lacros built from the M-101 branch might run on top of the ash version built from the M-100 branch. Lacros can be imagined as "Linux chrome with more Wayland support". Lacros uses -[ozone](https://chromium.googlesource.com/chromium/src.git/+/master/ui/ozone) +[ozone](https://chromium.googlesource.com/chromium/src.git/+/main/ui/ozone) as an abstraction layer for graphics and event handling. Ozone has a "backend" with client-side support for the Wayland compositor protocol. Chrome OS has a Wayland server implementation called -[exosphere](https://chromium.googlesource.com/chromium/src.git/+/master/components/exo). +[exosphere](https://chromium.googlesource.com/chromium/src.git/+/main/components/exo). It is used by ARC (to run Android apps) and Crostini (to run Linux apps). Lacros will use exo as the Wayland server for graphics and event handling. Where possible we use stable Wayland protocols. We also share Wayland protocol extensions with ARC and Crostini (e.g. -[zaura-shell](https://chromium.googlesource.com/chromium/src.git/+/master/components/exo/wayland/protocol/aura-shell.xml). +[zaura-shell](https://chromium.googlesource.com/chromium/src.git/+/main/components/exo/wayland/protocol/aura-shell.xml). Higher-level features (e.g. file picking) use Mojo IPC. We call the new Mojo API surface "crosapi". It's similar in concept to Win32 or Cocoa, but much smaller. It's also mostly asynchronous for performance reasons. The API lives in -[//chromeos/crosapi](https://chromium.googlesource.com/chromium/src.git/+/master/chromeos/crosapi). +[//chromeos/crosapi](https://chromium.googlesource.com/chromium/src.git/+/main/chromeos/crosapi). The ash-side implementation lives in -[//chrome/browser/ash/crosapi](https://chromium.googlesource.com/chromium/src.git/+/master/chrome/browser/ash/crosapi). +[//chrome/browser/ash/crosapi](https://chromium.googlesource.com/chromium/src.git/+/main/chrome/browser/ash/crosapi). Code can be conditionally compiled into lacros via BUILDFLAG(IS_CHROMEOS_LACROS). diff --git a/docs/linux/debugging.md b/docs/linux/debugging.md index 38e4d9603bea2a..8a3a4fbb4c0d5f 100644 --- a/docs/linux/debugging.md +++ b/docs/linux/debugging.md @@ -211,7 +211,7 @@ three) but you'll still need to use `--plugin-launcher` or another approach. ### Printing Chromium types gdb 7 lets us use Python to write pretty-printers for Chromium types. See -[gdbinit](https://chromium.googlesource.com/chromium/src/+/master/docs/gdbinit.md) +[gdbinit](https://chromium.googlesource.com/chromium/src/+/main/docs/gdbinit.md) to enable pretty-printing of Chromium types. This will import Blink pretty-printers as well. @@ -351,7 +351,7 @@ your "gn args". When `strip_absolute_paths_from_debug_symbols` is enabled (which is the default), gdb may not be able to find debug files, making source-level debugging impossible. See -[gdbinit](https://chromium.googlesource.com/chromium/src/+/master/docs/gdbinit.md) +[gdbinit](https://chromium.googlesource.com/chromium/src/+/main/docs/gdbinit.md) to configure gdb to be able to find debug files. ## Core files diff --git a/docs/linux/dependencies.md b/docs/linux/dependencies.md index fe011d7940bf3a..a3b76f2d71393c 100644 --- a/docs/linux/dependencies.md +++ b/docs/linux/dependencies.md @@ -57,7 +57,7 @@ that we need `libdbus-1-dev` and `libdbus-1-3`. Add these both to the `DEBIAN_PACKAGES` list in [`//build/linux/sysroot_scripts/sysroot-creator-sid.sh`](https://cs.chromium.org/chromium/src/build/linux/sysroot_scripts/sysroot-creator-sid.sh). Building and uploading the sysroot images is detailed in [Linux sysroot -images](https://chromium.googlesource.com/chromium/src.git/+/master/docs/sysroot.md). +images](https://chromium.googlesource.com/chromium/src.git/+/main/docs/sysroot.md). You may need to add additional dependent libraries for your new library. ## Whitelist the new dependencies @@ -194,5 +194,5 @@ Then add `:libdbus-1-3` to `//third_party/instrumented_libraries:locally_built`'s `deps`. See [Linux Instrumented -Libraries](https://chromium.googlesource.com/chromium/src.git/+/master/docs/instrumented_libraries.md) +Libraries](https://chromium.googlesource.com/chromium/src.git/+/main/docs/instrumented_libraries.md) for instructions on building and uploading the instrumented libraries. diff --git a/docs/linux/sandboxing.md b/docs/linux/sandboxing.md index 51603865d118b2..156add6e5a6f1d 100644 --- a/docs/linux/sandboxing.md +++ b/docs/linux/sandboxing.md @@ -148,4 +148,4 @@ Sandboxing can make developing harder, see: ## See also * [LinuxSandboxIPC](sandbox_ipc.md) -* [How Chromium's Linux sandbox affects Native Client](https://chromium.googlesource.com/native_client/src/native_client.git/+/master/docs/outer_sandbox.md) +* [How Chromium's Linux sandbox affects Native Client](https://chromium.googlesource.com/native_client/src/native_client.git/+/main/docs/outer_sandbox.md) diff --git a/docs/login/DIR_METADATA b/docs/login/DIR_METADATA index 3f7223101125c2..2322464e427e2a 100644 --- a/docs/login/DIR_METADATA +++ b/docs/login/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Services>SignIn" diff --git a/docs/mac_build_instructions.md b/docs/mac_build_instructions.md index 33f78ca0d61d0a..3c70ffc900e2d6 100644 --- a/docs/mac_build_instructions.md +++ b/docs/mac_build_instructions.md @@ -13,7 +13,7 @@ Are you a Google employee? See ## System requirements * A 64-bit Intel Mac running 10.15.4+. (Building on Arm Macs is - [not yet supported](https://chromium.googlesource.com/chromium/src.git/+/master/docs/mac_arm64.md).) + [not yet supported](https://chromium.googlesource.com/chromium/src.git/+/main/docs/mac_arm64.md).) * [Xcode](https://developer.apple.com/xcode/) 12.2+. This version of Xcode comes with ... * The macOS 11.0 SDK. Run diff --git a/docs/media/DIR_METADATA b/docs/media/DIR_METADATA index ab32c2e2866c77..7dbd9d2e324998 100644 --- a/docs/media/DIR_METADATA +++ b/docs/media/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Blink>Media" diff --git a/docs/media/gpu/video_decoder_perf_test_usage.md b/docs/media/gpu/video_decoder_perf_test_usage.md index f5d4c6690dd7b8..16889227e2cac7 100644 --- a/docs/media/gpu/video_decoder_perf_test_usage.md +++ b/docs/media/gpu/video_decoder_perf_test_usage.md @@ -21,7 +21,7 @@ Wildcards can be used to run specific sets of tests: `tast run $HOST video.DecodeAccelPerf*1080P60FPS` Check the -[tast video folder](https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/refs/heads/master/src/chromiumos/tast/local/bundles/cros/video/) +[tast video folder](https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/refs/heads/main/src/chromiumos/tast/local/bundles/cros/video/) for a list of all available tests. See the [Tast quickstart guide](https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/docs/quickstart.md) diff --git a/docs/media/gpu/video_decoder_test_usage.md b/docs/media/gpu/video_decoder_test_usage.md index 9d4e1bd9512e0d..c6f33a494760c3 100644 --- a/docs/media/gpu/video_decoder_test_usage.md +++ b/docs/media/gpu/video_decoder_test_usage.md @@ -24,7 +24,7 @@ Wildcards can be used to run specific sets of tests: * Run all VP9 profile 2 tests: `tast run $HOST video.DecodeAccelVP92*` Check the -[tast video folder](https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/refs/heads/master/src/chromiumos/tast/local/bundles/cros/video/) +[tast video folder](https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/refs/heads/main/src/chromiumos/tast/local/bundles/cros/video/) for a list of all available tests. See the [Tast quickstart guide](https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/docs/quickstart.md) diff --git a/docs/media/gpu/video_encoder_test_usage.md b/docs/media/gpu/video_encoder_test_usage.md index 6a743bb07e44b8..4b15318b65fcef 100644 --- a/docs/media/gpu/video_encoder_test_usage.md +++ b/docs/media/gpu/video_encoder_test_usage.md @@ -21,7 +21,7 @@ Wildcards can be used to run specific sets of tests: * Run all VP8 tests: `tast run $HOST video.EncodeAccel.vp8*` Check the -[tast video folder](https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/refs/heads/master/src/chromiumos/tast/local/bundles/cros/video/) +[tast video folder](https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/refs/heads/main/src/chromiumos/tast/local/bundles/cros/video/) for a list of all available tests. See the [Tast quickstart guide](https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/docs/quickstart.md) diff --git a/docs/memory-infra/DIR_METADATA b/docs/memory-infra/DIR_METADATA index 970fc89f715bce..a44cefddf26ee4 100644 --- a/docs/memory-infra/DIR_METADATA +++ b/docs/memory-infra/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Internals>Instrumentation>Memory" diff --git a/docs/memory-infra/README.md b/docs/memory-infra/README.md index acf73010d6d040..b4213d7641be01 100644 --- a/docs/memory-infra/README.md +++ b/docs/memory-infra/README.md @@ -161,7 +161,7 @@ or take a look at one of the existing examples such as [tracing@chromium.org][mailtracing] for questions and support. [dp-slides]: https://docs.google.com/presentation/d/1GI3HY3Mm5-Mvp6eZyVB0JiaJ-u3L1MMJeKHJg4lxjEI/present?slide=id.g995514d5c_1_45 -[malloc-dp]: https://chromium.googlesource.com/chromium/src.git/+/master/base/trace_event/malloc_dump_provider.cc +[malloc-dp]: https://chromium.googlesource.com/chromium/src.git/+/main/base/trace_event/malloc_dump_provider.cc [hotlist]: https://code.google.com/p/chromium/issues/list?q=label:Hotlist-MemoryInfra [mailtracing]: mailto:tracing@chromium.org diff --git a/docs/memory-infra/adding_memory_infra_tracing.md b/docs/memory-infra/adding_memory_infra_tracing.md index 7960e153dd1800..4d1c750c239b8f 100644 --- a/docs/memory-infra/adding_memory_infra_tracing.md +++ b/docs/memory-infra/adding_memory_infra_tracing.md @@ -29,8 +29,8 @@ two things: 2. Register and unregister you dump provider with the [`MemoryDumpManager`][mdm]. -[mdp]: https://chromium.googlesource.com/chromium/src/+/master/base/trace_event/memory_dump_provider.h -[mdm]: https://chromium.googlesource.com/chromium/src/+/master/base/trace_event/memory_dump_manager.h +[mdp]: https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/memory_dump_provider.h +[mdm]: https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/memory_dump_manager.h ## Creating a Memory Dump Provider @@ -68,9 +68,9 @@ For many components, this may be all that is needed. See [Handling Shared Memory Allocations](#Handling-Shared-Memory-Allocations) and [Suballocations](#Suballocations) for information on more complex use cases. -[resource-pool]: https://chromium.googlesource.com/chromium/src/+/master/cc/resources/resource_pool.h -[mem-alloc-dump]: https://chromium.googlesource.com/chromium/src/+/master/base/trace_event/memory_allocator_dump.h -[pmd]: https://chromium.googlesource.com/chromium/src/+/master/base/trace_event/process_memory_dump.h +[resource-pool]: https://chromium.googlesource.com/chromium/src/+/main/cc/resources/resource_pool.h +[mem-alloc-dump]: https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/memory_allocator_dump.h +[pmd]: https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/process_memory_dump.h ## Registering a Memory Dump Provider @@ -95,7 +95,7 @@ complex and may be a number of things: * If your component already uses a custom `base::SingleThreadTaskRunner` for executing tasks on a specific thread, you should likely use this runner. -[task-runner-handle]: https://chromium.googlesource.com/chromium/src/+/master/base/thread_task_runner_handle.h +[task-runner-handle]: https://chromium.googlesource.com/chromium/src/+/main/base/thread_task_runner_handle.h ## Unregistration @@ -175,4 +175,4 @@ which make up a texture. To create a suballocation, instead of calling [`ProcessMemoryDump::AddSubAllocation`][pmd], providing the ID of the parent allocation as the first parameter. -[texture-manager]: https://chromium.googlesource.com/chromium/src/+/master/gpu/command_buffer/service/texture_manager.cc +[texture-manager]: https://chromium.googlesource.com/chromium/src/+/main/gpu/command_buffer/service/texture_manager.cc diff --git a/docs/memory-infra/memory_benchmarks.md b/docs/memory-infra/memory_benchmarks.md index a61bc57c97aec6..4e8346bd55030c 100644 --- a/docs/memory-infra/memory_benchmarks.md +++ b/docs/memory-infra/memory_benchmarks.md @@ -38,7 +38,7 @@ These benchmarks are run continuously on the [chrome.perf][] waterfall, collecting and reporting results on the [Chrome Performance Dashboard][chromeperf]. -[system_health]: https://chromium.googlesource.com/chromium/src/+/master/tools/perf/page_sets/system_health/ +[system_health]: https://chromium.googlesource.com/chromium/src/+/main/tools/perf/page_sets/system_health/ [chrome.perf]: https://ci.chromium.org/p/chrome/g/chrome.perf/console [chromeperf]: https://chromeperf.appspot.com/report diff --git a/docs/memory/DIR_METADATA b/docs/memory/DIR_METADATA index 970fc89f715bce..a44cefddf26ee4 100644 --- a/docs/memory/DIR_METADATA +++ b/docs/memory/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Internals>Instrumentation>Memory" diff --git a/docs/memory/achievements.md b/docs/memory/achievements.md index 28fb31415f0a21..e65f4b0aaccdb7 100644 --- a/docs/memory/achievements.md +++ b/docs/memory/achievements.md @@ -23,6 +23,6 @@ Note, this is a community curated list. No one is sitting around trying to tabul * [Reduced 1.3 MB](https://codereview.chromium.org/1156003008) from browser private dirty by decoding images from ImageManager cache on demand * [Reduced 2-10MB](https://codereview.chromium.org/1377483003) from browser process by shrinking IPC buffers after large messages were passed * [Reduced < 2 MB](https://chromium-review.googlesource.com/c/chromium/src/+/945748) from background tabs of both Chrome and WebView on Android Go device. See further [information](https://bugs.chromium.org/p/chromium/issues/detail?id=833769) on the internal bots for Android. - * Developed [Memory-Infra](https://chromium.googlesource.com/chromium/src/+/master/components/tracing/docs/memory_infra.md), a timeline-based memory profiling system integrated into chrome:://tracing + * Developed [Memory-Infra](https://chromium.googlesource.com/chromium/src/+/main/components/tracing/docs/memory_infra.md), a timeline-based memory profiling system integrated into chrome:://tracing * Developed [System health benchmarks](https://docs.google.com/document/d/1BM_6lBrPzpMNMtcyi2NFKGIzmzIQ1oH3OlNG27kDGNU/edit?ts=57e92782), a set of benchmarks that give us consistent metrics for our reduction efforts * [Visualized Chrome's memory consumption in real-world website](https://docs.google.com/document/d/1JfnW6RpRDuuZITQ3xuFUIRBfC_KOG5xXUuW8U_UePJU/edit)s diff --git a/docs/memory/tools.md b/docs/memory/tools.md index d7894f8c0f396a..602f99cf910c5a 100644 --- a/docs/memory/tools.md +++ b/docs/memory/tools.md @@ -116,7 +116,7 @@ TODO(awong): Write about options to script and the flame graph. ### Instructions 1. Get 2 or more [symbolized heap dump](#heap-dumps) - 3. Run resulting traces through [`diff_heap_profiler.py`](https://chromium.googlesource.com/catapult/+/master/experimental/tracing/bin/diff_heap_profiler.py) to show a list of new allocations. + 3. Run resulting traces through [`diff_heap_profiler.py`](https://chromium.googlesource.com/catapult/+/main/experimental/tracing/bin/diff_heap_profiler.py) to show a list of new allocations. ----------- ## Heap Dumps diff --git a/docs/navigation.md b/docs/navigation.md index 1e1bcd7fb8ceef..b202a8b9b23a5d 100644 --- a/docs/navigation.md +++ b/docs/navigation.md @@ -161,4 +161,4 @@ They are typically registered in `ContentBrowserClient::CreateThrottlesForNavigation`. -[WebContentsObserver]: https://source.chromium.org/chromium/chromium/src/+/master:content/public/browser/web_contents_observer.h +[WebContentsObserver]: https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/web_contents_observer.h diff --git a/docs/new_port_policy.md b/docs/new_port_policy.md index 83aee96f3a2fac..1ac6281abaaf37 100644 --- a/docs/new_port_policy.md +++ b/docs/new_port_policy.md @@ -9,4 +9,4 @@ Since every new port for Chromium has a maintenance cost, here are some guidelin * Chromium engineers are not expected to maintain them. * As much as possible, try to use existing branches/ifdefs. * While changes in src/base are unavoidable, higher level directories shouldn't have to change. i.e. existing porting APIs should be used. We would not accept new rendering pipelines as an example. -* Send an email to [src/OWNERS](https://chromium.googlesource.com/chromium/src/+/master/ENG_REVIEW_OWNERS) for approval. +* Send an email to [src/OWNERS](https://chromium.googlesource.com/chromium/src/+/main/ENG_REVIEW_OWNERS) for approval. diff --git a/docs/parsing_test_results.md b/docs/parsing_test_results.md index 7431ac6502f0d3..02befe5a260aae 100644 --- a/docs/parsing_test_results.md +++ b/docs/parsing_test_results.md @@ -41,7 +41,7 @@ effectively a Python script. Each recipe is divided into *steps*. Each *step* represents a well-defined action, such as updating the repository to point to tip of tree, or compiling the necessary build artifacts. -[recipe]: https://chromium.googlesource.com/external/github.com/luci/recipes-py/+/master/doc/user_guide.md +[recipe]: https://chromium.googlesource.com/external/github.com/luci/recipes-py/+/main/doc/user_guide.md ![Example 1 Build Results UI](images/parsing_test_results_build_results_1.png) diff --git a/docs/privacy/DIR_METADATA b/docs/privacy/DIR_METADATA index 10d12ab8b35355..d7c9114697ffcc 100644 --- a/docs/privacy/DIR_METADATA +++ b/docs/privacy/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Privacy" diff --git a/docs/privacy_budget/DIR_METADATA b/docs/privacy_budget/DIR_METADATA index 4b9931a79329a6..ddd78885aa5add 100644 --- a/docs/privacy_budget/DIR_METADATA +++ b/docs/privacy_budget/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Privacy>Fingerprinting" diff --git a/docs/process/merge_request.md b/docs/process/merge_request.md index bd87773d579d87..88867a53db38eb 100644 --- a/docs/process/merge_request.md +++ b/docs/process/merge_request.md @@ -28,10 +28,10 @@ possible that changes may miss branch date and require a merge post branch. **Merge**: any change that is cherry picked from trunk to a release branch. Please read overview of [Chrome Release -Cycle](https://chromium.googlesource.com/chromium/src.git/+/master/docs/process/release_cycle.md) +Cycle](https://chromium.googlesource.com/chromium/src.git/+/main/docs/process/release_cycle.md) to understand in detail how the Chrome release cycle works and understand key release concepts and terminology. Please read [Defining Release -Blockers](https://chromium.googlesource.com/chromium/src.git/+/master/docs/process/release_blockers.md) +Blockers](https://chromium.googlesource.com/chromium/src.git/+/main/docs/process/release_blockers.md) to understand how issues/bugs are categorized as release blocking. List of schedule and release owners can be found at [Chrome Calendar](https://chromepmo.appspot.com/calendar) (Googlers only, opening to all in the near future). diff --git a/docs/qtcreator.md b/docs/qtcreator.md index 91f64bd7eee476..ad7a376be03454 100644 --- a/docs/qtcreator.md +++ b/docs/qtcreator.md @@ -137,7 +137,7 @@ Ensure you are using GDB on Linux, not LLDB. Linux : See -https://chromium.googlesource.com/chromium/src/+/master/docs/linux/debugging.md +https://chromium.googlesource.com/chromium/src/+/main/docs/linux/debugging.md macOS : https://chromium.googlesource.com/chromium/src/+/main/docs/mac/debugging.md diff --git a/docs/security/DIR_METADATA b/docs/security/DIR_METADATA index 907d38f0b47c17..acfecf02c28882 100644 --- a/docs/security/DIR_METADATA +++ b/docs/security/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Security" diff --git a/docs/security/lookalikes/lookalike-domains.md b/docs/security/lookalikes/lookalike-domains.md index 569fa18c7f44e2..6e1c28feebee89 100644 --- a/docs/security/lookalikes/lookalike-domains.md +++ b/docs/security/lookalikes/lookalike-domains.md @@ -29,7 +29,7 @@ example "lookalike" patterns include: * Domains that embed other domain names within their own hostname, such as `google.com.example.com`. * Domains that use IDN - [homographs](https://chromium.googlesource.com/chromium/src/+/master/docs/idn.md), + [homographs](https://chromium.googlesource.com/chromium/src/+/main/docs/idn.md), such as `goögle.com`. This list is not exhaustive, and developers are encouraged to avoid using diff --git a/docs/security/permissions-for-powerful-web-platform-features.md b/docs/security/permissions-for-powerful-web-platform-features.md index 8a3babee906b44..250959dc905a70 100644 --- a/docs/security/permissions-for-powerful-web-platform-features.md +++ b/docs/security/permissions-for-powerful-web-platform-features.md @@ -142,7 +142,7 @@ which may include: These mechanisms must clearly disclose the origin of the request, and follow Chromium's -[guidelines on displaying URLs](https://chromium.googlesource.com/chromium/src/+/master/docs/security/url_display_guidelines/url_display_guidelines.md). +[guidelines on displaying URLs](https://chromium.googlesource.com/chromium/src/+/main/docs/security/url_display_guidelines/url_display_guidelines.md). Implementations may be tested using tools such as [Trickuri](https://github.com/chromium/trickuri). diff --git a/docs/security/post-spectre-webdev.md b/docs/security/post-spectre-webdev.md index 2594978902718b..a36305ca7aa43c 100644 --- a/docs/security/post-spectre-webdev.md +++ b/docs/security/post-spectre-webdev.md @@ -41,7 +41,7 @@ provide concrete recommendations for web developers responsible for protecting users' data. [spectre]: https://spectreattack.com/ -[post-spectre-rethink]: https://chromium.googlesource.com/chromium/src/+/master/docs/security/side-channel-threat-model.md +[post-spectre-rethink]: https://chromium.googlesource.com/chromium/src/+/main/docs/security/side-channel-threat-model.md [site-isolation]: https://www.chromium.org/Home/chromium-security/site-isolation [project-fission]: https://wiki.mozilla.org/Project_Fission @@ -126,7 +126,7 @@ This model is spelled out in more detail in both Chromium's [fetch-metadata]: https://web.dev/fetch-metadata/ [corp]: https://resourcepolicy.fyi/ [coop]: https://docs.google.com/document/d/1Ey3MXcLzwR1T7aarkpBXEwP7jKdd2NvQdgYvF8_8scI/edit -[corb]: https://chromium.googlesource.com/chromium/src/+/master/services/network/cross_origin_read_blocking_explainer.md +[corb]: https://chromium.googlesource.com/chromium/src/+/main/services/network/cross_origin_read_blocking_explainer.md [orb]: https://github.com/annevk/orb diff --git a/docs/security/side-channel-threat-model.md b/docs/security/side-channel-threat-model.md index 71c692c880dbfa..0d267f010c19ff 100644 --- a/docs/security/side-channel-threat-model.md +++ b/docs/security/side-channel-threat-model.md @@ -134,7 +134,7 @@ timeframe.) ##### Incompleteness of CORB Site Isolation depends on [cross-origin read -blocking](https://chromium.googlesource.com/chromium/src/+/master/content/browser/loader/cross_origin_read_blocking_explainer.md) +blocking](https://chromium.googlesource.com/chromium/src/+/main/content/browser/loader/cross_origin_read_blocking_explainer.md) (CORB; formerly known as cross-site document blocking or XSDB) to prevent a malicious website from pulling in sensitive cross-origin data. Otherwise, an attacker could use markup like `` to diff --git a/docs/shutdown.md b/docs/shutdown.md index 398060274747de..31ec9e0396d1b2 100644 --- a/docs/shutdown.md +++ b/docs/shutdown.md @@ -13,7 +13,7 @@ See below for how the process differs on ChromeOS. Shutdown starts when nothing keeps Chrome alive. Typically, this happens when all browser windows are closed, but other things can [keep Chrome -alive](https://source.chromium.org/chromium/chromium/src/+/master:components/keep_alive_registry/keep_alive_types.h). +alive](https://source.chromium.org/chromium/chromium/src/+/main:components/keep_alive_registry/keep_alive_types.h). When nothing keeps Chrome alive, `BrowserProcessImpl::Unpin` asks the main thread's message loop to quit as soon as it no longer has tasks ready to run diff --git a/docs/speed/DIR_METADATA b/docs/speed/DIR_METADATA index 6930cc4c5f1947..e52532b9d5a76c 100644 --- a/docs/speed/DIR_METADATA +++ b/docs/speed/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Speed" diff --git a/docs/speed/addressing_performance_regressions.md b/docs/speed/addressing_performance_regressions.md index 3c3fdcee30569e..4e095bb226aa4d 100644 --- a/docs/speed/addressing_performance_regressions.md +++ b/docs/speed/addressing_performance_regressions.md @@ -125,13 +125,13 @@ to learn how to use traces to debug performance issues. ### Are there debugging tips specific to certain benchmarks? -* [Memory](https://chromium.googlesource.com/chromium/src/+/master/docs/memory-infra/memory_benchmarks.md) +* [Memory](https://chromium.googlesource.com/chromium/src/+/main/docs/memory-infra/memory_benchmarks.md) * [Android binary size](apk_size_regressions.md) * [Micro-benchmarks](microbenchmark_regressions.md) ### How do I profile? -Here is the [documentation on CPU Profiling Chrome](https://chromium.googlesource.com/chromium/src/+/master/docs/profiling.md) +Here is the [documentation on CPU Profiling Chrome](https://chromium.googlesource.com/chromium/src/+/main/docs/profiling.md) ## If you don't believe your CL could be the cause diff --git a/docs/speed/apk_size_regressions.md b/docs/speed/apk_size_regressions.md index f41bc4a1d2bdee..93558415a353e8 100644 --- a/docs/speed/apk_size_regressions.md +++ b/docs/speed/apk_size_regressions.md @@ -67,7 +67,7 @@ Otherwise, file a bug (TODO: [Make this template automatic](https://github.com/c > [https://ci.chromium.org/p/chromium/builders/luci.chromium.try/android-binary-size/**$TRYJOB_NUMBER**](https://ci.chromium.org/p/chromium/builders/luci.chromium.try/android-binary-size/11111) > > Debugging size regressions is documented at: -> https://chromium.googlesource.com/chromium/src/+/master/docs/speed/apk_size_regressions.md#Debugging-Apk-Size-Increase +> https://chromium.googlesource.com/chromium/src/+/main/docs/speed/apk_size_regressions.md#Debugging-Apk-Size-Increase > > Based on the trybot result: **20kb of native code, 8kb of pngs. *(or some other explanation as to what caused the growth).*** > diff --git a/docs/speed/benchmark/DIR_METADATA b/docs/speed/benchmark/DIR_METADATA index a761f765271367..148729f28cb67c 100644 --- a/docs/speed/benchmark/DIR_METADATA +++ b/docs/speed/benchmark/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Test>Telemetry" diff --git a/docs/speed/benchmark/benchmark_short_list.md b/docs/speed/benchmark/benchmark_short_list.md index e2bd88099655e9..aee9c408af7302 100644 --- a/docs/speed/benchmark/benchmark_short_list.md +++ b/docs/speed/benchmark/benchmark_short_list.md @@ -25,5 +25,5 @@ Both desktop & mobile: Instructions for how to run these benchmarks: -* [Running them locally](https://chromium.googlesource.com/catapult/+/master/telemetry/docs/run_benchmarks_locally.md) -* [Running on perf trybot](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/perf_trybots.md) +* [Running them locally](https://chromium.googlesource.com/catapult/+/main/telemetry/docs/run_benchmarks_locally.md) +* [Running on perf trybot](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/perf_trybots.md) diff --git a/docs/speed/benchmark/harnesses/blink_perf.md b/docs/speed/benchmark/harnesses/blink_perf.md index 39da9e7ab1ddac..a88265519f46dd 100644 --- a/docs/speed/benchmark/harnesses/blink_perf.md +++ b/docs/speed/benchmark/harnesses/blink_perf.md @@ -10,9 +10,9 @@ but for performance coverage. ## Writing Tests Each test entry point is a HTML file written using -[runner.js](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/resources/runner.js) +[runner.js](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/resources/runner.js) testing framework. The test file is placed inside a sub folder of -[blink/perf_tests/](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/) +[blink/perf_tests/](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/) and is started by importing `runner.js` script into the document: ``` @@ -83,9 +83,9 @@ also compute the total CPU times for trace events 'A' & 'B' per `foo()` run: Example tracing synchronous tests: -* [append-child-measure-time.html](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/test_data/append-child-measure-time.html) +* [append-child-measure-time.html](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/test_data/append-child-measure-time.html) -* [simple-html-measure-page-load-time.html](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/test_data/simple-html-measure-page-load-time.html) +* [simple-html-measure-page-load-time.html](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/test_data/simple-html-measure-page-load-time.html) ### Asynchronous Perf Tests @@ -143,9 +143,9 @@ example of synchronous tracing test above. Example of tracing asynchronous tests: -[color-changes-measure-frame-time.html](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/test_data/color-changes-measure-frame-time.html) +[color-changes-measure-frame-time.html](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/test_data/color-changes-measure-frame-time.html) -[simple-blob-measure-async.html](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/test_data/simple-blob-measure-async.html) +[simple-blob-measure-async.html](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/test_data/simple-blob-measure-async.html) ### Service Worker Perf Tests @@ -153,7 +153,7 @@ You can also run perf tests in service workers. You need to trigger the test with `PerfTestRunner.startMeasureValuesInWorker()` in a page. Within the `run` method provided to this function, you can initialize a worker and ask the worker to run the workload by using `measureRunsPerSecond()` defined in -[worker-test-helper.js](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/resources/worker-test-helper.js). +[worker-test-helper.js](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/resources/worker-test-helper.js). `measureRunsPerSecond()` returns a promise which resolves to the test result. The worker should send the result back to the page, and the page records the @@ -162,9 +162,9 @@ recorded, the test finishes. Here is an example for testing Cache Storage API of service workers: -[cache-open-add-delete-10K-service-worker.html](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/service_worker/cache-open-add-delete-10K-service-worker.html) +[cache-open-add-delete-10K-service-worker.html](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/service_worker/cache-open-add-delete-10K-service-worker.html) -[cache-open-add-delete-10K-service-worker.js](https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/perf_tests/service_worker/resources/cache-open-add-delete-10K-service-worker.js) +[cache-open-add-delete-10K-service-worker.js](https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/perf_tests/service_worker/resources/cache-open-add-delete-10K-service-worker.js) ## Running Tests diff --git a/docs/speed/benchmark/harnesses/loading.md b/docs/speed/benchmark/harnesses/loading.md index 5ff31926e578bb..7134d4fcae0458 100644 --- a/docs/speed/benchmark/harnesses/loading.md +++ b/docs/speed/benchmark/harnesses/loading.md @@ -26,7 +26,7 @@ Cluster Telemetry service. You can specify a Gerrit patch for them and compare the results with and without the patch applied. ### Using Perf Try Bots -[Perf Try Bots](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/perf_trybots.md) +[Perf Try Bots](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/perf_trybots.md) lets you run only single story of `loading.desktop` or `loading.mobile`, because an entire loading benchmark is too large to run as a perf try job. You should only set the `Story` field, and leave the `Story Tags` field blank. Invalid @@ -47,7 +47,7 @@ Googler only). For more in-depth analysis and shorter cycle times, it can be helpful to run the tests locally. First, [prepare your test device for -Telemetry](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/benchmark/telemetry_device_setup.md). +Telemetry](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/benchmark/telemetry_device_setup.md). Once you've done this, you can start the Telemetry benchmark with: @@ -62,9 +62,9 @@ where `benchmark_name` can be `loading.desktop` or `loading.mobile`. The loading test cases are divided into groups based on their network traffic settings and cache conditions. -All available traffic settings can be found in [traffic_setting.py](https://chromium.googlesource.com/catapult/+/master/telemetry/telemetry/page/traffic_setting.py) +All available traffic settings can be found in [traffic_setting.py](https://chromium.googlesource.com/catapult/+/main/telemetry/telemetry/page/traffic_setting.py) -All available caching conditions can be found in [cache_temperature.py](https://chromium.googlesource.com/catapult/+/master/telemetry/telemetry/page/cache_temperature.py) +All available caching conditions can be found in [cache_temperature.py](https://chromium.googlesource.com/catapult/+/main/telemetry/telemetry/page/cache_temperature.py) Test cases of `loading.desktop` and `loading.mobile` are named with their corresponding settings. For example, `DevOpera_cold_3g` test case loads @@ -90,8 +90,8 @@ or chrome-speed-metrics@google.com (Googlers only). ## Adding new loading test cases New test cases can be added by modifying -[loading_desktop.py](https://chromium.googlesource.com/chromium/src/+/master/tools/perf/page_sets/loading_desktop.py) -or [loading_mobile.py](https://chromium.googlesource.com/chromium/src/+/master/tools/perf/page_sets/loading_mobile.py) page sets. +[loading_desktop.py](https://chromium.googlesource.com/chromium/src/+/main/tools/perf/page_sets/loading_desktop.py) +or [loading_mobile.py](https://chromium.googlesource.com/chromium/src/+/main/tools/perf/page_sets/loading_mobile.py) page sets. For example, to add a new case of loading `https://en.wikipedia.org/wiki/Cats_and_the_Internet` on 2G and 3G networks with diff --git a/docs/speed/benchmark/harnesses/rendering.md b/docs/speed/benchmark/harnesses/rendering.md index 47e757853cf74f..bf0f3407ca5896 100644 --- a/docs/speed/benchmark/harnesses/rendering.md +++ b/docs/speed/benchmark/harnesses/rendering.md @@ -36,7 +36,7 @@ Rendering metrics are [written in Javascript](https://cs.chromium.org/chromium/s ## How to run rendering benchmarks on local devices -First, set up your device by following the instructions [here](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/benchmark/telemetry_device_setup.md). You can then run telemetry benchmarks locally using: +First, set up your device by following the instructions [here](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/benchmark/telemetry_device_setup.md). You can then run telemetry benchmarks locally using: `./tools/perf/run_benchmark --browser=` @@ -56,16 +56,16 @@ Other useful options for the command are: ## How to run rendering benchmarks on try bots -For more consistent results and to identify whether your change has resulted in a rendering regression, you can run the rendering benchmarks using a [perf try job](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/perf_trybots.md). In order to do this, you need to first upload a CL, which allows results to be generated with and without your patch. +For more consistent results and to identify whether your change has resulted in a rendering regression, you can run the rendering benchmarks using a [perf try job](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/perf_trybots.md). In order to do this, you need to first upload a CL, which allows results to be generated with and without your patch. ## How to handle regressions -If your changes have resulted in a regression in a metric that is monitored by [perf alerts](https://chromeperf.appspot.com/alerts?sortby=end_revision&sortdirection=down), you will be assigned to a bug. This will contain information about the specific metric and how much it was regressed, as well as a Pinpoint link that will help you investigate further. For instance, you will be able to obtain traces from the try bot runs. This [link](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/addressing_performance_regressions.md) contains detailed steps on how to deal with regressions. Rendering metrics use trace events logged under the benchmark and toplevel trace categories. +If your changes have resulted in a regression in a metric that is monitored by [perf alerts](https://chromeperf.appspot.com/alerts?sortby=end_revision&sortdirection=down), you will be assigned to a bug. This will contain information about the specific metric and how much it was regressed, as well as a Pinpoint link that will help you investigate further. For instance, you will be able to obtain traces from the try bot runs. This [link](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/addressing_performance_regressions.md) contains detailed steps on how to deal with regressions. Rendering metrics use trace events logged under the benchmark and toplevel trace categories. If you already have a trace and want to debug the metric computation part, you can just run the metric: `tracing/bin/run_metric renderingMetric` -If you are specifically investigating a regression related to janks, [this document](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/debug-janks.md) may be useful. +If you are specifically investigating a regression related to janks, [this document](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/debug-janks.md) may be useful. ## How to add more pages diff --git a/docs/speed/benchmark/telemetry_device_setup.md b/docs/speed/benchmark/telemetry_device_setup.md index 7479ccbc73d32c..bd1d326d763a4e 100644 --- a/docs/speed/benchmark/telemetry_device_setup.md +++ b/docs/speed/benchmark/telemetry_device_setup.md @@ -13,7 +13,7 @@ $ tools/perf/run_benchmark --browser=system dummy_benchmark.noisy_benchmark_1 ``` Otherwise have a look at the required catapult dependencies listed in the -[.vpython](https://chromium.googlesource.com/chromium/src/+/master/.vpython) +[.vpython](https://chromium.googlesource.com/chromium/src/+/main/.vpython) spec file. ## Desktop benchmarks @@ -29,7 +29,7 @@ possible (e.g: AntiVirus,..) before running the benchmarks. ### ChromeOS Virtual Machine: see -[cros_vm.md doc](https://chromium.googlesource.com/chromiumos/docs/+/master/cros_vm.md) +[cros_vm.md doc](https://chromium.googlesource.com/chromiumos/docs/+/main/cros_vm.md) Actual CrOS machine: please contact achuith@, cywang@ from CrOS teams for advice. diff --git a/docs/speed/binary_size/DIR_METADATA b/docs/speed/binary_size/DIR_METADATA index 22e8befaaca696..0b9540aa7c0c54 100644 --- a/docs/speed/binary_size/DIR_METADATA +++ b/docs/speed/binary_size/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Speed>Release" diff --git a/docs/speed/binary_size/android_binary_size_trybot.md b/docs/speed/binary_size/android_binary_size_trybot.md index 444462f41d9ed4..9b3426ab5094aa 100644 --- a/docs/speed/binary_size/android_binary_size_trybot.md +++ b/docs/speed/binary_size/android_binary_size_trybot.md @@ -205,8 +205,8 @@ For more information on when to use `const char *` vs `const char[]`, see ## Code Locations -- [Trybot recipe](https://source.chromium.org/chromium/chromium/tools/build/+/master:recipes/recipes/binary_size_trybot.py), -[CI recipe](https://source.chromium.org/chromium/chromium/tools/build/+/master:recipes/recipes/binary_size_generator_tot.py), -[recipe module](https://source.chromium.org/chromium/chromium/tools/build/+/master:recipes/recipe_modules/binary_size/api.py) +- [Trybot recipe](https://source.chromium.org/chromium/chromium/tools/build/+/main:recipes/recipes/binary_size_trybot.py), +[CI recipe](https://source.chromium.org/chromium/chromium/tools/build/+/main:recipes/recipes/binary_size_generator_tot.py), +[recipe module](https://source.chromium.org/chromium/chromium/tools/build/+/main:recipes/recipe_modules/binary_size/api.py) - [Link to src-side checks](/tools/binary_size/trybot_commit_size_checker.py) - [Link to Gerrit Plugin](https://chromium.googlesource.com/infra/gerrit-plugins/chromium-binary-size/) diff --git a/docs/speed/bot_health_sheriffing/how_to_handle_a_new_problem.md b/docs/speed/bot_health_sheriffing/how_to_handle_a_new_problem.md index 058a2fdaaa8762..5931cf30323e2a 100644 --- a/docs/speed/bot_health_sheriffing/how_to_handle_a_new_problem.md +++ b/docs/speed/bot_health_sheriffing/how_to_handle_a_new_problem.md @@ -26,7 +26,7 @@ Note that this list is not at all comprehensive. If you encounter an alert that ![Story failures in Sheriff-o-matic](images/som_story_failures.png) -Sheriff-o-matic may occasionally fail to recognize a benchmark failure is due to story failures: because of this, it's worth double-checking [the test logs](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md#getting-a-list-of-stories-that-failed) for a general benchmark failure to verify that it's not due to a story failure. +Sheriff-o-matic may occasionally fail to recognize a benchmark failure is due to story failures: because of this, it's worth double-checking [the test logs](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md#getting-a-list-of-stories-that-failed) for a general benchmark failure to verify that it's not due to a story failure. **What action to take: **File a P1 bug, CCing the benchmark owner(s) (found [here](https://docs.google.com/spreadsheets/d/1xaAo0_SU3iDfGdqDJZX_jRV0QtkufwHUKH3kQKF3YQs/edit#gid=0)). @@ -34,11 +34,11 @@ Add to the bug: * A link to the failing test's log -* [Any relevant failure stack trace](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md#identifying-why-a-story-failed) +* [Any relevant failure stack trace](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md#identifying-why-a-story-failed) -* The revision range at which the story started failing (most easily found [through the flakiness dashboard](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/what_test_is_failing.md)) +* The revision range at which the story started failing (most easily found [through the flakiness dashboard](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/what_test_is_failing.md)) -Once the bug is filed, [disable the failing story](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_disable_a_story.md) and [launch a bisect over the revision range of the breakage](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_launch_a_functional_bisect.md), and snooze the alert for 24h to give the bisect time to finish. Once the story is disabled, lower its priority to P2 and assign the bug to the benchmark owner. +Once the bug is filed, [disable the failing story](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_disable_a_story.md) and [launch a bisect over the revision range of the breakage](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_launch_a_functional_bisect.md), and snooze the alert for 24h to give the bisect time to finish. Once the story is disabled, lower its priority to P2 and assign the bug to the benchmark owner. **[Canonical example](https://bugs.cromium.org/p/chromium/issues/detail?id=809063)** @@ -56,7 +56,7 @@ Add to the bug: * A clear request to Infra > Labs (e.g. "Labs team, could you please take a look at this bot to see why tests aren't running?") -Once the bug is filed, [snooze the alert](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_snooze_an_alert.md) for 24 hours. +Once the bug is filed, [snooze the alert](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_snooze_an_alert.md) for 24 hours. Sometimes, Infra>Labs may request additional help in debugging the problem. For example, they may notice that this bot repeatedly goes down and may ask for your help in figuring out why. If this happens and you're unsure what next step to take, reach out for help [on chat](https://hangouts.google.com/group/80kY8Glh1AqcbQP92). @@ -72,7 +72,7 @@ Sometimes, Infra>Labs may request additional help in debugging the problem. For ### Benchmark harness failure -**How to recognize: **Sheriff-o-matic will indicate that an entire benchmark is failing (i.e. no story failures will be listed). [The logs](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md) will contain a failure that's not attributable to any particular story. For example: +**How to recognize: **Sheriff-o-matic will indicate that an entire benchmark is failing (i.e. no story failures will be listed). [The logs](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md) will contain a failure that's not attributable to any particular story. For example: ![A general benchmark failure in Sheriff-o-matic](images/som_benchmark_failure.png) @@ -82,7 +82,7 @@ Add to the bug: * A link to the failing test's log -* [Any relevant failure stack trace](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md#identifying-why-a-story-failed) +* [Any relevant failure stack trace](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md#identifying-why-a-story-failed) * The revision range at which the story started failing. Because entire benchmark failures don't appear in the flakiness dashboard, you'll have to manually skim recent test run logs to identify when the failure started. diff --git a/docs/speed/bot_health_sheriffing/main.md b/docs/speed/bot_health_sheriffing/main.md index cb5dbb16a90fb5..d9e8c98f49d340 100644 --- a/docs/speed/bot_health_sheriffing/main.md +++ b/docs/speed/bot_health_sheriffing/main.md @@ -13,21 +13,21 @@ The goal of the perf bot health sheriff rotation is to ensure that the benchmark ## Quick links -* [How to determine what story is failing](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/what_test_is_failing.md) -* [How to disable a story](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_disable_a_story.md) -* [How to launch a functional bisect](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_launch_a_functional_bisect.md) -* [How to snooze an alert](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_snooze_an_alert.md) -* [How to access test logs](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md) -* [How to handle a new problem](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_handle_a_new_problem.md) -* [How to follow up on an alert](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_follow_up_on_an_alert.md) -* [How to address duplicate alerts](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_address_duplicate_alerts.md) -* [Glossary](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/glossary.md) +* [How to determine what story is failing](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/what_test_is_failing.md) +* [How to disable a story](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_disable_a_story.md) +* [How to launch a functional bisect](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_launch_a_functional_bisect.md) +* [How to snooze an alert](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_snooze_an_alert.md) +* [How to access test logs](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_access_test_logs.md) +* [How to handle a new problem](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_handle_a_new_problem.md) +* [How to follow up on an alert](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_follow_up_on_an_alert.md) +* [How to address duplicate alerts](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_address_duplicate_alerts.md) +* [Glossary](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/glossary.md) [TOC] ## Vocabulary -Definitions of various bot health related vocabulary can be found in our [glossary](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/glossary.md). +Definitions of various bot health related vocabulary can be found in our [glossary](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/glossary.md). ## High-level responsibilities @@ -73,7 +73,7 @@ This category of alert should have a bug already linked with it. This link can b ![A link to a bug from a Sheriff-o-matic alert](images/som_alert_bug.png) -Instructions can be found [here](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_follow_up_on_an_alert.md) on how to follow up with an existing alert. +Instructions can be found [here](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_follow_up_on_an_alert.md) on how to follow up with an existing alert. ### Is this a new alert caused by the same root cause as an already-triaged alert? @@ -89,13 +89,13 @@ are both in the list of current of alerts but represent the same failure. It can sometimes be tricky to differentiate between these alerts and ones caused by completely new problems, but sheriffs can always treat an alert as new and merge it with another later. -Instructions can be found [here](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_address_duplicate_alerts.md) on how to handle a duplicate alert. +Instructions can be found [here](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_address_duplicate_alerts.md) on how to handle a duplicate alert. ### Is this a new alert caused by a new problem? This category of alert doesn't yet have a bug associated with it. It's the most common category and requires the most expertise to handle. -Instructions can be found [here](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/bot_health_sheriffing/how_to_handle_a_new_problem.md) on how to handle an alert for a new problem. +Instructions can be found [here](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/bot_health_sheriffing/how_to_handle_a_new_problem.md) on how to handle an alert for a new problem. ## After your shift is over diff --git a/docs/speed/help_improve_performance.md b/docs/speed/help_improve_performance.md index 6335128049e586..e98403d807632a 100644 --- a/docs/speed/help_improve_performance.md +++ b/docs/speed/help_improve_performance.md @@ -12,7 +12,7 @@ [Source code](https://github.com/catapult-project/catapult/tree/master/experimental/trace_on_tap) ## Investigating janky scroll/animation -See [this detailed guide](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/debug-janks.md). +See [this detailed guide](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/debug-janks.md). diff --git a/docs/speed/images/DIR_METADATA b/docs/speed/images/DIR_METADATA index b2607fdfee8191..628bfe71b35734 100644 --- a/docs/speed/images/DIR_METADATA +++ b/docs/speed/images/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Speed>Benchmarks" diff --git a/docs/speed/metrics_changelog/2020_11_fcp.md b/docs/speed/metrics_changelog/2020_11_fcp.md index 5a0bd24e1cb238..059374baf0a6da 100644 --- a/docs/speed/metrics_changelog/2020_11_fcp.md +++ b/docs/speed/metrics_changelog/2020_11_fcp.md @@ -3,7 +3,7 @@ ## Changes in Chrome 89 In Chrome 89, an improvement was made to the code that reports First Contentful -Paint to [URL-Keyed Metrics](https://chromium.googlesource.com/chromium/src/+/master/services/metrics/ukm_api.md). +Paint to [URL-Keyed Metrics](https://chromium.googlesource.com/chromium/src/+/main/services/metrics/ukm_api.md). This change increases the number of reports of First Contentful Paint that Chrome receives right before the user closes a tab. [Source code for this change](https://chromium-review.googlesource.com/c/chromium/src/+/2552628). diff --git a/docs/speed/perf_waterfall.md b/docs/speed/perf_waterfall.md index 1c643d092ac87b..3a7e5e53fc81d2 100644 --- a/docs/speed/perf_waterfall.md +++ b/docs/speed/perf_waterfall.md @@ -53,7 +53,7 @@ For some jobs, this work is executed by the tester instead. * [Perf Sheriff Rotation](perf_regression_sheriffing.md) * [Perfbot Health Sheriffing Rotation](bot_health_sheriffing/main.md) - * [How to SSH to Bots in Lab](https://chrome-internal.googlesource.com/infra/infra_internal/+/master/doc/ssh.md) + * [How to SSH to Bots in Lab](https://chrome-internal.googlesource.com/infra/infra_internal/+/main/doc/ssh.md) (googlers only!) * TODO: Page on how to repro failures locally * TODO: Page on how to hack on buildbot/recipe code diff --git a/docs/speed/speed_domains.md b/docs/speed/speed_domains.md index a85dcdc9eaeba3..1aaf7b1981837e 100644 --- a/docs/speed/speed_domains.md +++ b/docs/speed/speed_domains.md @@ -16,7 +16,7 @@ memory for idle and backgrounded tabs. * [Mailing List](https://groups.google.com/a/chromium.org/forum/#!forum/memory-dev) * Performance-Memory [Bug Queue](https://bugs.chromium.org/p/chromium/issues/list?can=2&q=Performance%3DMemory) - * [Docs](https://chromium.googlesource.com/chromium/src/+/master/docs/memory) + * [Docs](https://chromium.googlesource.com/chromium/src/+/main/docs/memory) ## Power diff --git a/docs/speed_metrics/DIR_METADATA b/docs/speed_metrics/DIR_METADATA index 35bab6d4e6018c..b3d33a605ced26 100644 --- a/docs/speed_metrics/DIR_METADATA +++ b/docs/speed_metrics/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Blink>PerformanceAPIs" diff --git a/docs/speed_metrics/README.md b/docs/speed_metrics/README.md index 2b02a89ae8dba6..c926ff677673df 100644 --- a/docs/speed_metrics/README.md +++ b/docs/speed_metrics/README.md @@ -22,7 +22,7 @@ incentives they need to improve it. We aim to: Chrome needs a small, consistent set of high quality user experience metrics. Chrome Speed Metrics is responsible for authoring reference implementations of these metrics implemented using Trace Based Metrics v2 (TBMv2) in -[tracing/metrics](https://source.chromium.org/chromium/chromium/src/+/master:third_party/catapult/tracing/tracing/metrics/). +[tracing/metrics](https://source.chromium.org/chromium/chromium/src/+/main:third_party/catapult/tracing/tracing/metrics/). These reference implementations will often require adding C++ instrumentation. Some metrics work will also be driven by more focused metrics teams, such as the work on Frame Throughput. Chrome Speed Metrics also owns UMA/UKM metrics, and @@ -51,7 +51,7 @@ improve Chrome’s UX. ### Own Core Metrics The Chrome Speed Metrics team will gradually gain ownership of -[tracing/metrics](https://source.chromium.org/chromium/chromium/src/+/master:third_party/catapult/tracing/tracing/metrics/), +[tracing/metrics](https://source.chromium.org/chromium/chromium/src/+/main:third_party/catapult/tracing/tracing/metrics/), and will be responsible for the long term code health of this directory. We’re also ramping up ownership in the Web Perf API space. diff --git a/docs/speed_metrics/webperf_okrs.md b/docs/speed_metrics/webperf_okrs.md index 5a6360d8f55c97..3452d3df87256c 100644 --- a/docs/speed_metrics/webperf_okrs.md +++ b/docs/speed_metrics/webperf_okrs.md @@ -90,7 +90,7 @@ * **Largest Contentful Paint**: include removed nodes ([bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1045640)) and ignored images occupying the full viewport ([bug](https://bugs.chromium.org/p/chromium/issues/detail?id=1133883)). * **Cumulative Layout Shift**: implemented various fixes, see - [changelog](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/metrics_changelog/README.md). + [changelog](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/metrics_changelog/README.md). ## 2020 Q4 Objectives @@ -156,7 +156,7 @@ * [LargestContentfulPaint](#lcp-20203): * Did analysis on how LCP would change when removed content is included. * Ignored paints occurring with opacity 0. - * CumulativeLayoutShift [fixes](https://chromium.googlesource.com/chromium/src/+/master/docs/speed/metrics_changelog/cls.md): + * CumulativeLayoutShift [fixes](https://chromium.googlesource.com/chromium/src/+/main/docs/speed/metrics_changelog/cls.md): * Ignored shifts from video thumb sliders. * Fixed computations for ink overflow and transforms. * Updated computations when child moves alongside their parent element. diff --git a/docs/sync/DIR_METADATA b/docs/sync/DIR_METADATA index 17ae8c6169066f..6ae00c05b884aa 100644 --- a/docs/sync/DIR_METADATA +++ b/docs/sync/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Services>Sync" diff --git a/docs/testing/DIR_METADATA b/docs/testing/DIR_METADATA index 5bd66c6c14b648..3974bbe38f836c 100644 --- a/docs/testing/DIR_METADATA +++ b/docs/testing/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Test" diff --git a/docs/testing/batching_instrumentation_tests.md b/docs/testing/batching_instrumentation_tests.md index 1c9ea9e34207d7..4de60d59394cbc 100644 --- a/docs/testing/batching_instrumentation_tests.md +++ b/docs/testing/batching_instrumentation_tests.md @@ -30,12 +30,12 @@ test, and ensure each test resets to that state. If a few tests within a larger batched suite cannot be batched (eg. it tests process initialization), you may add the -[@RequiresRestart](https://source.chromium.org/chromium/chromium/src/+/master:base/test/android/javatests/src/org/chromium/base/test/util/RequiresRestart.java;bpv=1;bpt=1;l=19?q=RequiresRestart&ss=chromium%2Fchromium%2Fsrc&originalUrl=https:%2F%2Fcs.chromium.org%2F&gsn=RequiresRestart&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Djava%3Fpath%3Dorg.chromium.base.test.util.RequiresRestart%23b5e85d5c8071e18f350b7f2c5014310bd2cabd0e0d3d176949c991ea18403f55) +[@RequiresRestart](https://source.chromium.org/chromium/chromium/src/+/main:base/test/android/javatests/src/org/chromium/base/test/util/RequiresRestart.java;bpv=1;bpt=1;l=19?q=RequiresRestart&ss=chromium%2Fchromium%2Fsrc&originalUrl=https:%2F%2Fcs.chromium.org%2F&gsn=RequiresRestart&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Djava%3Fpath%3Dorg.chromium.base.test.util.RequiresRestart%23b5e85d5c8071e18f350b7f2c5014310bd2cabd0e0d3d176949c991ea18403f55) annotation, which will exclude that test from the batch. ## Types of Batched tests -### [UNIT_TESTS](https://source.chromium.org/chromium/chromium/src/+/master:base/test/android/javatests/src/org/chromium/base/test/util/Batch.java;bpv=1;bpt=1;l=51?q=Batch.java&ss=chromium%2Fchromium%2Fsrc&originalUrl=https:%2F%2Fcs.chromium.org%2F&gsn=UNIT_TESTS&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Djava%3Fpath%3Dorg.chromium.base.test.util.Batch%2319ebd2758adfaed0bda0e97542f70ca5b1564e7c1fa0f8c2bcb9e8170b75684d) +### [UNIT_TESTS](https://source.chromium.org/chromium/chromium/src/+/main:base/test/android/javatests/src/org/chromium/base/test/util/Batch.java;bpv=1;bpt=1;l=51?q=Batch.java&ss=chromium%2Fchromium%2Fsrc&originalUrl=https:%2F%2Fcs.chromium.org%2F&gsn=UNIT_TESTS&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Djava%3Fpath%3Dorg.chromium.base.test.util.Batch%2319ebd2758adfaed0bda0e97542f70ca5b1564e7c1fa0f8c2bcb9e8170b75684d) Tests that belong in this category are tests that are effectively unit tests. They may be written as instrumentation tests rather than junit tests for a @@ -54,7 +54,7 @@ to take advantage of feature annotations in your test you will have to use Features#JUnitProcessor instead of Features#InstrumentationProcessor. -### [PER_CLASS](https://source.chromium.org/chromium/chromium/src/+/master:base/test/android/javatests/src/org/chromium/base/test/util/Batch.java;bpv=1;bpt=1;l=39?q=Batch.java&ss=chromium%2Fchromium%2Fsrc&originalUrl=https:%2F%2Fcs.chromium.org%2F&gsn=PER_CLASS&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Djava%3Fpath%3Dorg.chromium.base.test.util.Batch%23780b702db42a1901f05647fd29f75d443bc4efd2db588848b4aedf826ddf9e21) +### [PER_CLASS](https://source.chromium.org/chromium/chromium/src/+/main:base/test/android/javatests/src/org/chromium/base/test/util/Batch.java;bpv=1;bpt=1;l=39?q=Batch.java&ss=chromium%2Fchromium%2Fsrc&originalUrl=https:%2F%2Fcs.chromium.org%2F&gsn=PER_CLASS&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Djava%3Fpath%3Dorg.chromium.base.test.util.Batch%23780b702db42a1901f05647fd29f75d443bc4efd2db588848b4aedf826ddf9e21) This batching type is typically for larger and more complex test suites, and will run the suite in its own batch. This will reduce the complexity of managing @@ -74,7 +74,7 @@ batch instead of once per test suite. To put multiple test suites into the same batch, you will have to use a shared custom batch name ([example](https://chromium-review.googlesource.com/c/chromium/src/+/2307650)). When batching across suites you’ll want to use something like -[BlankCTATabInitialStateRule](https://source.chromium.org/chromium/chromium/src/+/master:chrome/test/android/javatests/src/org/chromium/chrome/test/batch/BlankCTATabInitialStateRule.java?q=BlankCTATabInitialStateRule&ss=chromium&originalUrl=https:%2F%2Fcs.chromium.org%2F) +[BlankCTATabInitialStateRule](https://source.chromium.org/chromium/chromium/src/+/main:chrome/test/android/javatests/src/org/chromium/chrome/test/batch/BlankCTATabInitialStateRule.java?q=BlankCTATabInitialStateRule&ss=chromium&originalUrl=https:%2F%2Fcs.chromium.org%2F) to persist static state (like the Activity) between test suites and perform any necessary state cleanup between tests. @@ -99,7 +99,7 @@ that. Other common state like SharedPreferences any heavy work in them (and will run twice for parameterized tests). See [issue 1090043](https://crbug.com/1090043). * Sometimes it can be very difficult to figure out which test in a batch is -causing another test to fail. A good first step is to minimize [_TEST_BATCH_MAX_GROUP_SIZE](https://source.chromium.org/chromium/chromium/src/+/master:build/android/pylib/local/device/local_device_instrumentation_test_run.py;drc=3ab9a142091516aa57f10feebc46dee649ae4589;l=109) +causing another test to fail. A good first step is to minimize [_TEST_BATCH_MAX_GROUP_SIZE](https://source.chromium.org/chromium/chromium/src/+/main:build/android/pylib/local/device/local_device_instrumentation_test_run.py;drc=3ab9a142091516aa57f10feebc46dee649ae4589;l=109) to minimize the number of tests within the batch while still reproducing the failure. Then, you can use multiple gtest filter patterns to control which tests run together. Ex: diff --git a/docs/testing/code_coverage.md b/docs/testing/code_coverage.md index fa43821968be4b..307e55b2e357ec 100644 --- a/docs/testing/code_coverage.md +++ b/docs/testing/code_coverage.md @@ -305,12 +305,12 @@ reported usually grows after that. ### How can I improve [coverage dashboard]? The code for the service and dashboard currently lives along with findit at -[this location](https://chromium.googlesource.com/infra/infra/+/master/appengine/findit/) +[this location](https://chromium.googlesource.com/infra/infra/+/main/appengine/findit/) because of significant shared logic. The code used by the bots that generate the coverage data lives (among other places) in the -[code coverage recipe module](https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/slave/recipe_modules/code_coverage/). +[code coverage recipe module](https://chromium.googlesource.com/chromium/tools/build/+/main/scripts/slave/recipe_modules/code_coverage/). ### Why is coverage for X not reported or unreasonably low, even though there is a test for X? diff --git a/docs/testing/code_coverage_in_gerrit.md b/docs/testing/code_coverage_in_gerrit.md index 97d77adab14d9c..1dbd8a68a68e8c 100644 --- a/docs/testing/code_coverage_in_gerrit.md +++ b/docs/testing/code_coverage_in_gerrit.md @@ -67,7 +67,7 @@ in Gerrit. [file a bug]: https://bugs.chromium.org/p/chromium/issues/entry?components=Infra%3ETest%3ECodeCoverage [code-coverage group]: https://groups.google.com/a/chromium.org/forum/#!forum/code-coverage [code_coverage.md]: code_coverage.md -[clang_code_coverage_wrapper]: https://chromium.googlesource.com/chromium/src/+/master/docs/clang_code_coverage_wrapper.md +[clang_code_coverage_wrapper]: https://chromium.googlesource.com/chromium/src/+/main/docs/clang_code_coverage_wrapper.md [chromium-coverage Gerrit plugin]: https://chromium.googlesource.com/infra/gerrit-plugins/code-coverage/ -[Chromium on Chromium OS]: https://chromium.googlesource.com/chromium/src/+/master/docs/chromeos_build_instructions.md -[Chromium on Linux]: https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md +[Chromium on Chromium OS]: https://chromium.googlesource.com/chromium/src/+/main/docs/chromeos_build_instructions.md +[Chromium on Linux]: https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md diff --git a/docs/testing/test_descriptions.md b/docs/testing/test_descriptions.md index 82e5f92dc0a677..b8c07f5abca8da 100644 --- a/docs/testing/test_descriptions.md +++ b/docs/testing/test_descriptions.md @@ -56,4 +56,4 @@ See [Testing and infrastructure](https://sites.google.com/a/chromium.org/dev/dev |views\_unittests | | |wav\_ola\_test | | |webkit\_unit\_tests | | -|webui tests | Special type of browser\_tests used for [WebUI features](https://chromium.googlesource.com/chromium/src/+/master/docs/webui_explainer.md), see [here](https://docs.google.com/document/d/1Z18WTNv28z5FW3smNEm_GtsfVD2IL-CmmAikwjw3ryo/edit#) for more information on known issues with WebUI test infrastructure. | +|webui tests | Special type of browser\_tests used for [WebUI features](https://chromium.googlesource.com/chromium/src/+/main/docs/webui_explainer.md), see [here](https://docs.google.com/document/d/1Z18WTNv28z5FW3smNEm_GtsfVD2IL-CmmAikwjw3ryo/edit#) for more information on known issues with WebUI test infrastructure. | diff --git a/docs/testing/test_executable_api.md b/docs/testing/test_executable_api.md index 7b3147095cc8e5..9404cbfc9da309 100644 --- a/docs/testing/test_executable_api.md +++ b/docs/testing/test_executable_api.md @@ -441,7 +441,7 @@ but pointed it at the wrong document by accident. bit.ly URLs can't easily be updated :(. [1]: https://bit.ly/chromium-test-runner-api -[2]: https://chromium.googlesource.com/infra/infra/+/master/doc/users/services/about_luci.md +[2]: https://chromium.googlesource.com/infra/infra/+/main/doc/users/services/about_luci.md [3]: https://docs.google.com/document/d/1MwnIx8kavuLSpZo3JmL9T7nkjTz1rpaJA4Vdj_9cRYw/edit?usp=sharing [4]: ../../testing/buildbot/test_suites.pyl [5]: ../../testing/buildbot/gn_isolate_map.pyl diff --git a/docs/testing/testing_in_chromium.md b/docs/testing/testing_in_chromium.md index 33e2868710b9a9..3b4b55a8a31def 100644 --- a/docs/testing/testing_in_chromium.md +++ b/docs/testing/testing_in_chromium.md @@ -162,17 +162,17 @@ test]" has instructions on how to disable a flaky test. [gtest]: https://github.com/google/googletest [Simple gtests]: https://github.com/google/googletest/blob/master/docs/primer.md#simple-tests [Junit]: https://developer.android.com/training/testing/junit-rules -[Instrumentation Tests]: https://chromium.googlesource.com/chromium/src/+/master/testing/android/docs/instrumentation.md +[Instrumentation Tests]: https://chromium.googlesource.com/chromium/src/+/main/testing/android/docs/instrumentation.md [EarlGrey]: https://github.com/google/EarlGrey [Telemetry]: https://chromium.googlesource.com/catapult/+/HEAD/telemetry/README.md -[Fuzzer Tests]: https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/README.md +[Fuzzer Tests]: https://chromium.googlesource.com/chromium/src/+/main/testing/libfuzzer/README.md [Tast]: https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/README.md [Web Tests]: ./web_tests.md [crbug/611756]: https://bugs.chromium.org/p/chromium/issues/detail?id=611756 [Flake Portal]: https://analysis.chromium.org/p/chromium/flake-portal -[Write Fuzz Target]: https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/getting_started.md#write-fuzz-target +[Write Fuzz Target]: https://chromium.googlesource.com/chromium/src/+/main/testing/libfuzzer/getting_started.md#write-fuzz-target [Telemetry: Run benchmarks locally]: https://chromium.googlesource.com/catapult/+/HEAD/telemetry/docs/run_benchmarks_locally.md -[Run fuzz target locally]: https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/getting_started.md#build-and-run-fuzz-target-locally +[Run fuzz target locally]: https://chromium.googlesource.com/chromium/src/+/main/testing/libfuzzer/getting_started.md#build-and-run-fuzz-target-locally [Android Debugging Instructions]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/android_debugging_instructions.md [Chrome OS Debugging Tips]: ./chromeos_debugging_tips.md [Debugging Web Tests]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/web_tests.md#Debugging-Web-Tests diff --git a/docs/testing/web_platform_tests.md b/docs/testing/web_platform_tests.md index 1a60abd56e89f9..31301e4dafe652 100644 --- a/docs/testing/web_platform_tests.md +++ b/docs/testing/web_platform_tests.md @@ -321,7 +321,7 @@ resolve the conflict. To allow the importer to land CLs without human intervention, it utilizes the [Rubber-Stamper -bot](https://chromium.googlesource.com/infra/infra/+/refs/heads/master/go/src/infra/appengine/rubber-stamper/README.md) +bot](https://chromium.googlesource.com/infra/infra/+/refs/heads/main/go/src/infra/appengine/rubber-stamper/README.md) to approve import CLs. Adding the Rubber-Stamper as a reviewer is one of the last steps the importer diff --git a/docs/testing/web_platform_tests_wptrunner.md b/docs/testing/web_platform_tests_wptrunner.md index 2150f759f784e4..f13353f2d9e9c5 100644 --- a/docs/testing/web_platform_tests_wptrunner.md +++ b/docs/testing/web_platform_tests_wptrunner.md @@ -32,7 +32,7 @@ instructions may be out of date. *** The runner script is -[`testing/scripts/run_wpt_tests.py`](https://source.chromium.org/chromium/chromium/src/+/master:testing/scripts/run_wpt_tests.py). +[`testing/scripts/run_wpt_tests.py`](https://source.chromium.org/chromium/chromium/src/+/main:testing/scripts/run_wpt_tests.py). Before running the script, you must have built the necessary ninja targets: ``` @@ -90,7 +90,7 @@ codifies what the output result should be. By default `wptrunner` will inherit expected statuses from `TestExpecations`. This can currently be overridden by adding an entry to the -[`WPTOverrideExpectations`](https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/WPTOverrideExpectations) +[`WPTOverrideExpectations`](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/WPTOverrideExpectations) file when `wptrunner` has a different result than `run_web_tests.py`. `WPTOverrideExpectations` is however [deprecated](https://crbug.com/1035911), and the preferred method for specifying expected results for `wptrunner` is to diff --git a/docs/testing/web_tests_linux.md b/docs/testing/web_tests_linux.md index b9b94b1d673626..3aea3661e5b90c 100644 --- a/docs/testing/web_tests_linux.md +++ b/docs/testing/web_tests_linux.md @@ -1,6 +1,6 @@ # Running web tests on Linux -1. Build `blink_tests` (see [Linux-specific build instructions](https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md)) +1. Build `blink_tests` (see [Linux-specific build instructions](https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md)) 1. Checkout the web tests * If you have an entry in your `.gclient` file that includes "web_tests", you may need to comment it out and sync. diff --git a/docs/trusted_types_on_webui.md b/docs/trusted_types_on_webui.md index df48190afe545e..33e0eb543a0caa 100644 --- a/docs/trusted_types_on_webui.md +++ b/docs/trusted_types_on_webui.md @@ -207,7 +207,7 @@ source->DisableTrustedTypesCSP(); ## How to add a test for Trusted Types on a WebUI page? You can add your WebUI page to [this list] -(https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc;l=194;drc=de8ade0753244ff6d1ef20cb2a38fe292fe9ba0a) and it will check for +(https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/webui/chrome_url_data_manager_browsertest.cc;l=194;drc=de8ade0753244ff6d1ef20cb2a38fe292fe9ba0a) and it will check for Trusted Types violations on your WebUI page. ## Sample CLs diff --git a/docs/ui/DIR_METADATA b/docs/ui/DIR_METADATA index 2769d07edc7d3c..94ceb96c12a37d 100644 --- a/docs/ui/DIR_METADATA +++ b/docs/ui/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "UI" diff --git a/docs/ui/android/browser_controls.md b/docs/ui/android/browser_controls.md index becbdd7dcc24f9..5b9a1a4c19f15e 100644 --- a/docs/ui/android/browser_controls.md +++ b/docs/ui/android/browser_controls.md @@ -15,16 +15,16 @@ The browser controls need to be in sync with the web contents when scrolling. An ### How does it work? There are several classes that are used to draw composited textures: -- [ViewResourceFrameLayout](https://source.chromium.org/chromium/chromium/src/+/master:components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/ViewResourceFrameLayout.java): A view group that can easily be transformed into a texture used by the compositor system. -- [SceneLayer (native)](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/layouts/scene_layer.h): A wrapper that provides a [cc::Layer](https://source.chromium.org/chromium/chromium/src/+/master:cc/layers/layer.h) and dictates how that layout is supposed to interact with the layout system. -- [SceneLayer](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/layouts/java/src/org/chromium/chrome/browser/layouts/scene_layer/SceneLayer.java): The Java representation of SceneLayer. -- [SceneOverlay](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/layouts/java/src/org/chromium/chrome/browser/layouts/SceneOverlay.java): An interface that allows for other texture-like things to be drawn on a layout without being a layout itself. -- [SceneOverlayLayer](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/layouts/java/src/org/chromium/chrome/browser/layouts/scene_layer/SceneOverlayLayer.java): Extends SceneLayer for SceneOverlay. -- [LayoutManager](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/layouts/java/src/org/chromium/chrome/browser/layouts/LayoutManager.java): The class that manages the Layouts. In the browser controls context, this is the manager that adds the SceneOverlay to the Layout to be drawn. +- [ViewResourceFrameLayout](https://source.chromium.org/chromium/chromium/src/+/main:components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/ViewResourceFrameLayout.java): A view group that can easily be transformed into a texture used by the compositor system. +- [SceneLayer (native)](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/layouts/scene_layer.h): A wrapper that provides a [cc::Layer](https://source.chromium.org/chromium/chromium/src/+/main:cc/layers/layer.h) and dictates how that layout is supposed to interact with the layout system. +- [SceneLayer](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/layouts/java/src/org/chromium/chrome/browser/layouts/scene_layer/SceneLayer.java): The Java representation of SceneLayer. +- [SceneOverlay](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/layouts/java/src/org/chromium/chrome/browser/layouts/SceneOverlay.java): An interface that allows for other texture-like things to be drawn on a layout without being a layout itself. +- [SceneOverlayLayer](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/layouts/java/src/org/chromium/chrome/browser/layouts/scene_layer/SceneOverlayLayer.java): Extends SceneLayer for SceneOverlay. +- [LayoutManager](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/layouts/java/src/org/chromium/chrome/browser/layouts/LayoutManager.java): The class that manages the Layouts. In the browser controls context, this is the manager that adds the SceneOverlay to the Layout to be drawn. -The Android view is wrapped in a `ViewResourceFrameLayout`. If we look at [bottom_control_container.xml](https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/java/res/layout/bottom_control_container.xml), the xml layout for the bottom controls, the views are wrapped in [ScrollingBottomViewResourceFrameLayout](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewResourceFrameLayout.java). +The Android view is wrapped in a `ViewResourceFrameLayout`. If we look at [bottom_control_container.xml](https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/java/res/layout/bottom_control_container.xml), the xml layout for the bottom controls, the views are wrapped in [ScrollingBottomViewResourceFrameLayout](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewResourceFrameLayout.java). -A scene layer ([ScrollingBottomViewSceneLayer](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewSceneLayer.java) and its native counterpart [scrolling_bottom_view_scene_layer.cc](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/android/compositor/scene_layer/scrolling_bottom_view_scene_layer.cc) in this example) is responsible for creating a compositor layer using the view resource. [LayoutManager](https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManager.java) adds the scene layer to the global layout. +A scene layer ([ScrollingBottomViewSceneLayer](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewSceneLayer.java) and its native counterpart [scrolling_bottom_view_scene_layer.cc](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/android/compositor/scene_layer/scrolling_bottom_view_scene_layer.cc) in this example) is responsible for creating a compositor layer using the view resource. [LayoutManager](https://source.chromium.org/chromium/chromium/src/+/main:chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManager.java) adds the scene layer to the global layout. See these example CLs [adding a scene layer](https://chromium-review.googlesource.com/c/chromium/src/+/1769631) and [adding the Android view to use as a resource](https://chromium-review.googlesource.com/c/chromium/src/+/1809813). @@ -44,25 +44,25 @@ Browser controls state/positioning information: ### Browser controls in the browser process -[BrowserControlsManager](https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java) is the class that manages the browser controls properties and responds to the browser controls related information that comes from the renderer process. It provides an interface, [BrowserControlsStateProvider](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsStateProvider.java), that can be used to get/set browser controls properties. BrowserControlsStateProvider in addition provides an Observer interface for observing changes in browser controls properties and offsets. +[BrowserControlsManager](https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java) is the class that manages the browser controls properties and responds to the browser controls related information that comes from the renderer process. It provides an interface, [BrowserControlsStateProvider](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/browser_controls/android/java/src/org/chromium/chrome/browser/browser_controls/BrowserControlsStateProvider.java), that can be used to get/set browser controls properties. BrowserControlsStateProvider in addition provides an Observer interface for observing changes in browser controls properties and offsets. ### Browser controls in the renderer: cc and Blink -There are 2 classes that are responsible for calculating the browser controls offsets in the renderer: [cc::BrowserControlsOffsetManager](https://source.chromium.org/chromium/chromium/src/+/master:cc/input/browser_controls_offset_manager.cc) and [blink::BrowserControls](https://source.chromium.org/chromium/chromium/src/+/master:cc/input/browser_controls_offset_manager.cc). These two classes are almost identical in behavior except for some small differences: +There are 2 classes that are responsible for calculating the browser controls offsets in the renderer: [cc::BrowserControlsOffsetManager](https://source.chromium.org/chromium/chromium/src/+/master:cc/input/browser_controls_offset_manager.cc) and [blink::BrowserControls](https://source.chromium.org/chromium/chromium/src/+/main:cc/input/browser_controls_offset_manager.cc). These two classes are almost identical in behavior except for some small differences: -- Both classes calculate browser controls offsets during scroll events. Both classes have functions ScrollBegin(), ScrollBy(), and ScrollEnd() that notify the class of the changes in scrolling state. The biggest difference here is that cc::BrowserControlsOffsetManager calculates the offsets when the scroll happens on the cc thread (or impl thread, more on that in [this doc](https://source.chromium.org/chromium/chromium/src/+/master:docs/how_cc_works.md)) while blink::BrowserControls calculates the offsets for main thread scrolling. Today, most of the scrolling happens on the impl thread and the main thread scrolling is used only as a fallback. +- Both classes calculate browser controls offsets during scroll events. Both classes have functions ScrollBegin(), ScrollBy(), and ScrollEnd() that notify the class of the changes in scrolling state. The biggest difference here is that cc::BrowserControlsOffsetManager calculates the offsets when the scroll happens on the cc thread (or impl thread, more on that in [this doc](https://source.chromium.org/chromium/chromium/src/+/main:docs/how_cc_works.md)) while blink::BrowserControls calculates the offsets for main thread scrolling. Today, most of the scrolling happens on the impl thread and the main thread scrolling is used only as a fallback. - Animations are only handled by `cc::BrowserControlsOffsetManager`. Animation in this context means changing the browser controls offsets gradually without user action. There are two types of animations that are handled by this class: - - Show/hide animations: All these animations do is to completely hide or show the browser controls smoothly, e.g. when a scroll event leaves the controls half shown or the browser controls state changes. Examples of state change include setting the controls state to shown when navigating to a site and setting it to hidden when a fullscreen video is playing. The browser controls states are defined in [browser_controls_state.h](https://source.chromium.org/chromium/chromium/src/+/master:cc/input/browser_controls_state.h;drc=23f61cb65a94208dc2c4728e895e87d47f64a8b6;l=10). - - Height-change animations: These animations make a change in browser controls height smooth. They use the same logic/path as the show/hide animations. However, height-change animations are set up in the [BrowserControlsOffsetManager::OnBrowserControlsParamsChanged](https://source.chromium.org/chromium/chromium/src/+/master:cc/input/browser_controls_state.h;drc=23f61cb65a94208dc2c4728e895e87d47f64a8b6;l=10) function using the old and new params and the current state of the controls. + - Show/hide animations: All these animations do is to completely hide or show the browser controls smoothly, e.g. when a scroll event leaves the controls half shown or the browser controls state changes. Examples of state change include setting the controls state to shown when navigating to a site and setting it to hidden when a fullscreen video is playing. The browser controls states are defined in [browser_controls_state.h](https://source.chromium.org/chromium/chromium/src/+/main:cc/input/browser_controls_state.h;drc=23f61cb65a94208dc2c4728e895e87d47f64a8b6;l=10). + - Height-change animations: These animations make a change in browser controls height smooth. They use the same logic/path as the show/hide animations. However, height-change animations are set up in the [BrowserControlsOffsetManager::OnBrowserControlsParamsChanged](https://source.chromium.org/chromium/chromium/src/+/main:cc/input/browser_controls_state.h;drc=23f61cb65a94208dc2c4728e895e87d47f64a8b6;l=10) function using the old and new params and the current state of the controls. -Any discrepancy between the values from the cc and the blink versions of the browser controls classes are resolved using [SyncedProperty](https://source.chromium.org/chromium/chromium/src/+/master:cc/base/synced_property.h). +Any discrepancy between the values from the cc and the blink versions of the browser controls classes are resolved using [SyncedProperty](https://source.chromium.org/chromium/chromium/src/+/main:cc/base/synced_property.h). #### Scrolling, ratios, offsets `cc::BrowserControlsOffsetManager` has 3 functions responsible for handling the scroll gestures: `::ScrollBegin(), ::ScrollBy(), and ::ScrollEnd()`. `::ScrollBy()` is called with the pending scroll delta during the scroll and calculates how much of the browser controls should be visible after this scroll event. This class uses "shown ratio" instead of offsets (though it should probably be raw pixel offsets). In normal operation, the shown ratio is in the range [0, 1], 0 being completely hidden and 1 being completely visible. The only time it will be outside of this range is when computing height-change animations. Also, if the min-height is set to a value larger than 0, the lower end of this range will be updated accordingly. This is called ‘MinShownRatio’ in code and is equal to `MinHeight / ControlsHeight`. -A shown ratio is calculated for the top and bottom controls separately. Even though the top and bottom controls are currently connected, they don't have to share the same shown ratio (especially true with min height animations). The shown ratios that are calculated in the renderer process are sent to the browser process in a [RenderFrameMetadata](https://source.chromium.org/chromium/chromium/src/+/master:cc/trees/render_frame_metadata.h) struct, alongside the controls heights and min-height offsets. +A shown ratio is calculated for the top and bottom controls separately. Even though the top and bottom controls are currently connected, they don't have to share the same shown ratio (especially true with min height animations). The shown ratios that are calculated in the renderer process are sent to the browser process in a [RenderFrameMetadata](https://source.chromium.org/chromium/chromium/src/+/main:cc/trees/render_frame_metadata.h) struct, alongside the controls heights and min-height offsets. These ratios are used to calculate the visible height and the controls offsets in the browser process so that the composited texture for the browser controls is displayed in the right place. @@ -121,7 +121,7 @@ Path for the top controls shown ratio (other ratios, heights and offsets follow ## Browser controls when there is no web contents -When there is no web contents the browser controls can/should interact with, the browser controls will always be fully shown. This is currently the case for native pages such as NTP and other surfaces such as the tab switcher. However, the browser controls heights can still change, even without web contents. In this case, the transition animations are run by `BrowserControlsManager` in the browser process. See [BrowserControlsManager.java](https://source.chromium.org/chromium/chromium/src/+/master:chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java;drc=5b029d1b98e2b7b35fff59b50a54af5d47689de9;l=725). `BrowserControlsManager` animates the height changes by updating the controls offsets and the content offset over time. For every frame, `BrowserControlsStateProvider#Observer`s are notified through `#onControlsOffsetChanged()`. +When there is no web contents the browser controls can/should interact with, the browser controls will always be fully shown. This is currently the case for native pages such as NTP and other surfaces such as the tab switcher. However, the browser controls heights can still change, even without web contents. In this case, the transition animations are run by `BrowserControlsManager` in the browser process. See [BrowserControlsManager.java](https://source.chromium.org/chromium/chromium/src/+/main:chrome/android/java/src/org/chromium/chrome/browser/fullscreen/BrowserControlsManager.java;drc=5b029d1b98e2b7b35fff59b50a54af5d47689de9;l=725). `BrowserControlsManager` animates the height changes by updating the controls offsets and the content offset over time. For every frame, `BrowserControlsStateProvider#Observer`s are notified through `#onControlsOffsetChanged()`. ## Making sure your surface works in harmony with the browser controls diff --git a/docs/ui/android/bytecode_rewriting.md b/docs/ui/android/bytecode_rewriting.md index ac23001e94cd82..6c2fb6c8c24b76 100644 --- a/docs/ui/android/bytecode_rewriting.md +++ b/docs/ui/android/bytecode_rewriting.md @@ -47,10 +47,10 @@ trivially removed as of late 2020. ## How does it work? The bytecode rewriting happens at build time by -[FragmentActivityReplacer](https://source.chromium.org/chromium/chromium/src/+/master:build/android/bytecode/java/org/chromium/bytecode/FragmentActivityReplacer.java), +[FragmentActivityReplacer](https://source.chromium.org/chromium/chromium/src/+/main:build/android/bytecode/java/org/chromium/bytecode/FragmentActivityReplacer.java), which is specified as a bytecode rewriter via the `bytecode_rewriter_target` rule. Compilation errors related to this should get detected by -[compile_java.py](https://source.chromium.org/chromium/chromium/src/+/master:build/android/gyp/compile_java.py), +[compile_java.py](https://source.chromium.org/chromium/chromium/src/+/main:build/android/gyp/compile_java.py), and print a message pointing users here, which is likely why you're reading this :) If you need to apply FragmentActivityReplacer to a given target then add … diff --git a/docs/ui/create/examples/login_dialog.md b/docs/ui/create/examples/login_dialog.md index a46d20dccd0059..e8d63f76806d0c 100644 --- a/docs/ui/create/examples/login_dialog.md +++ b/docs/ui/create/examples/login_dialog.md @@ -81,7 +81,7 @@ window close button. These UI elements are provided by default by the ## Creating the layout -To populate the login dialog, we first create a [`LayoutManager`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/layout_manager.h) in the +To populate the login dialog, we first create a [`LayoutManager`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/layout_manager.h) in the dialog’s constructor. @@ -113,11 +113,11 @@ LoginBubbleDialogView::LoginBubbleDialogView( ``` -This creates a 2x2 [`GridLayout`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/grid_layout.h) +This creates a 2x2 [`GridLayout`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/grid_layout.h) with horizontal padding specified by the layout constant `DISTANCE_RELATED_LABEL_HORIZONTAL`. The first column will hold the form’s -[`Label`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/label.h)s and the second will hold the -[`Textfield`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/textfield/textfield.h)s for user input. +[`Label`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/label.h)s and the second will hold the +[`Textfield`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/textfield/textfield.h)s for user input. To help with adding rows to the `GridLayout`, add the following scoped helper and relevant headers. @@ -154,11 +154,11 @@ views::Textfield* AddFormRow(views::GridLayout* layout, ... ``` -This creates a new [`GridLayout`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/grid_layout.h) +This creates a new [`GridLayout`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/grid_layout.h) row for a given field in our form. The call to -[`SetAssociatedLabel()`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/textfield/textfield.h;l=250;drc=291180454e079aa5c3677dc3f3eaf619a1cf1d42) +[`SetAssociatedLabel()`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/textfield/textfield.h;l=250;drc=291180454e079aa5c3677dc3f3eaf619a1cf1d42) sets the accessible label relationship between the -[`Label`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/label.h) and the [`Textfield`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/textfield/textfield.h) +[`Label`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/label.h) and the [`Textfield`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/textfield/textfield.h) and copies the `Label`’s accessible name to the `Textfield`. @@ -302,8 +302,8 @@ Next we want to disable the bubble dialog’s login button until both the username and password fields have been populated. We achieve this by having the `LoginBubbleDialogView` inherit from -[`TextfieldController`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/textfield/textfield_controller.h), -and on each [`Textfield`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/textfield/textfield.h) +[`TextfieldController`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/textfield/textfield_controller.h), +and on each [`Textfield`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/textfield/textfield.h) update it checks to make sure that both fields are populated before enabling the login button. @@ -546,7 +546,7 @@ The generated UI would be: The example code can be run inside Views example app. You can find the code inside the Views example at -[`ui/views/examples/login_bubble_dialog_example.cc`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/examples/login_bubble_dialog_example.cc). +[`ui/views/examples/login_bubble_dialog_example.cc`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/examples/login_bubble_dialog_example.cc). You can try out this example by running the following command: ``` shell diff --git a/docs/ui/create/examples/theme_aware.md b/docs/ui/create/examples/theme_aware.md index dcad66b6456aa9..b6e3a2f890c1ee 100644 --- a/docs/ui/create/examples/theme_aware.md +++ b/docs/ui/create/examples/theme_aware.md @@ -38,7 +38,7 @@ such as how to lay out UI elements and how to customize them. ## Run the example The example code is in the file -[`ui/views/examples/colored_dialog_example.cc`](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/examples/colored_dialog_example.cc) +[`ui/views/examples/colored_dialog_example.cc`](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/examples/colored_dialog_example.cc) and its corresponding header file. You can run it on Windows or Linux via the `views_examples` application. Change the path accordingly based on your platform and building environment: diff --git a/docs/ui/frontline_triage.md b/docs/ui/frontline_triage.md index 1f88d193f07399..c1884644017a53 100644 --- a/docs/ui/frontline_triage.md +++ b/docs/ui/frontline_triage.md @@ -4,7 +4,7 @@ ### Steps -0. Read and follow the [Chromium Code of Conduct](https://chromium.googlesource.com/chromium/src/+/master/CODE_OF_CONDUCT.md). +0. Read and follow the [Chromium Code of Conduct](https://chromium.googlesource.com/chromium/src/+/main/CODE_OF_CONDUCT.md). 1. File your issue on http://crbug.com/. * Required: Repro Steps * Preferred: Screenshots diff --git a/docs/ui/input_event/index.md b/docs/ui/input_event/index.md index 88554ee4424104..00254ee7e9c81d 100644 --- a/docs/ui/input_event/index.md +++ b/docs/ui/input_event/index.md @@ -67,7 +67,7 @@ types of events. - For mouse move events, it may synthesize and dispatch a ET_MOUSE_EXITED event to notify that mouse exits from previous UI control. - For key events, it - [forwards](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/window_event_dispatcher.cc;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=1053) + [forwards](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/window_event_dispatcher.cc;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=1053) the key to ui::InputMethod::DispatchKeyEvent() and the event will be handled there. Depending on IME involvement, later phases of WindowEventDispatcher may be **SKIPPED**. Details are explained later. @@ -110,7 +110,7 @@ event is then handled in views and is explained in a later section. Content aura::Window instead asks RenderWidgetHostViewAura::OnEvent() to handle the event. The event will be sent to Blink and then to BrowserCommandController if not consumed by the webpage. Some important shortcuts, e.g. Ctrl+T, are -[preserved](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/browser_command_controller.cc;drc=02f28360f2f6588ca2428ef93c8129e0a8cc231c;l=210) +[preserved](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/browser_command_controller.cc;drc=02f28360f2f6588ca2428ef93c8129e0a8cc231c;l=210) and will not be sent to the web page. **Phase 4** - EventTarget post-target @@ -120,29 +120,29 @@ This phase is not effective in window abstraction. **Phase 5** - EventProcessor post-dispatch For touch events, WindowEventDispatcher may -[recognize](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/window_event_dispatcher.cc;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=574) +[recognize](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/window_event_dispatcher.cc;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=574) the event as a gesture event and dispatch it. **Key event handling and IME interoperability** We mentioned in phase 1 pre-dispatch that a key event may be consumed in _this_ phase and no later phases. This is because we need to interact with IME through -[InputMethod::DispatchKeyEvent()](https://source.chromium.org/chromium/chromium/src/+/master:ui/base/ime/input_method.h;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=101) +[InputMethod::DispatchKeyEvent()](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ime/input_method.h;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=101) in pre-dispatch. If the IME accepts this key event, Chrome will stop any further event handling because IMEs have their own interpretation to the event. Instead, Chrome -[exits](https://source.chromium.org/chromium/chromium/src/+/master:ui/base/ime/linux/input_method_auralinux.cc;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=109) +[exits](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ime/linux/input_method_auralinux.cc;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=109) phase 1 with a fake VKEY_PROCESSKEY event indicating the event has been processed by IME, and waits for new events emitted by IME and handles them accordingly. For example, Chrome on Linux -[listens](https://source.chromium.org/chromium/chromium/src/+/master:ui/gtk/input_method_context_impl_gtk.cc;drc=340909edba6daccd34d5875de93599551b218902;l=74) +[listens](https://source.chromium.org/chromium/chromium/src/+/main:ui/gtk/input_method_context_impl_gtk.cc;drc=340909edba6daccd34d5875de93599551b218902;l=74) for the GTK `preedit-changed` event that indicates a change in the composition text. If the IME does not accept this key event, WindowEventDispatcher will re-enter phase 1 but with -[IME explicitly skipped](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/window_tree_host.cc;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=277), +[IME explicitly skipped](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/window_tree_host.cc;drc=d9fa208c0b5d3d454df1ff1cbc724b5fd708cf7a;l=277), so that the event can be passed to phase 2 where accelerators are handled. ### MacViews @@ -154,7 +154,7 @@ Mac. Mac does not use Aura and is significantly different from Aura in that it hosts native NSWindow in -[RemoteCocoa](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/) +[RemoteCocoa](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/) that talks to views through a mojo interface. This design allows RemoteCocoa to either live within the browser process or in a separate process for PWA mode. This design is largely due to the requirement of PWAs on Mac. @@ -191,31 +191,31 @@ Summary: belongs to. - Once the NSWindow has been identified the Window Server will place the mouse down event in Chrome’s - [BrowserCrApplication ](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/chrome_browser_application_mac.h)(NSApplication) + [BrowserCrApplication ](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/chrome_browser_application_mac.h)(NSApplication) event queue. - BrowserCrApplication’s main run loop reads from the event queue. - BrowserCrApplication delivers the event to the - [NativeWidgetMacNSWindow ](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/app_shim/native_widget_mac_nswindow.h)(NSWindow) + [NativeWidgetMacNSWindow ](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/native_widget_mac_nswindow.h)(NSWindow) which delivers the mouseDown event to its root NSView [contentView](https://developer.apple.com/documentation/appkit/nswindow/1419160-contentview). -- [BridgedContentView](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/app_shim/bridged_content_view.h) +- [BridgedContentView](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/bridged_content_view.h) aggregates all mouse related - [NSResponder messages](https://source.chromium.org/chromium/chromium/src/+/master:ui/base/cocoa/base_view.mm;l=114;drc=3930cf3f0e2404a517b4580b21e598a3fc648ff0) + [NSResponder messages](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/cocoa/base_view.mm;l=114;drc=3930cf3f0e2404a517b4580b21e598a3fc648ff0) (rightMouseDown, mouseMoved, leftMouseUp etc) into the mouseEvent: method. - The - [mouseEvent method](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/app_shim/bridged_content_view.mm;l=580;drc=dd5a8d8907f60050eeaaac0299be624fe36cad8a) + [mouseEvent method](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/bridged_content_view.mm;l=580;drc=dd5a8d8907f60050eeaaac0299be624fe36cad8a) performs NSEvent conversion into ui::Event and sends the event to the - [NativeWidgetMacNSWindowHost](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/cocoa/native_widget_mac_ns_window_host.h)’s - [OnMouseEvent()](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/cocoa/native_widget_mac_ns_window_host.mm;l=790;drc=d18ea8bb2c8089e74838b8f781ba5f08420b8516) + [NativeWidgetMacNSWindowHost](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/cocoa/native_widget_mac_ns_window_host.h)’s + [OnMouseEvent()](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/cocoa/native_widget_mac_ns_window_host.mm;l=790;drc=d18ea8bb2c8089e74838b8f781ba5f08420b8516) method. - BridgedContentView communicates to the NativeWidgetMacNSWindowHost via a bridge. - NativeWidgetMacNSWindowHost implements a Mojo remote - [remote_cocoa::mojom::NativeWidgetNSWindowHost](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=41;drc=e6d7cbba3a95a52176a5d5ca37572296f9b9aaa8) + [remote_cocoa::mojom::NativeWidgetNSWindowHost](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/common/native_widget_ns_window_host.mojom;l=41;drc=e6d7cbba3a95a52176a5d5ca37572296f9b9aaa8) such that the BridgedContentView and the NativeWidgetMacNSWindowHost can communicate via message passing (needed in the case these exist across process boundaries). -- [NativeWidgetMac](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/native_widget_mac.mm;l=118;drc=1748fd17d0e2b542b0051955a9cccb2153ff6ea7) +- [NativeWidgetMac](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/native_widget_mac.mm;l=118;drc=1748fd17d0e2b542b0051955a9cccb2153ff6ea7) owns a NativeWidgetMacNSWindowHost instance. #### Key Down event (entering text into the browser’s omnibox) @@ -227,15 +227,15 @@ browser’s omnibox. Summary: - The Window Server will deliver key events to the - [CrBrowserApplication’s ](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/chrome_browser_application_mac.h)(NSApplication) + [CrBrowserApplication’s ](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/chrome_browser_application_mac.h)(NSApplication) event queue. - Provided the keyDown event is not a key equivalent or keyboard interface control, the BrowserCrApplication sends the event to - [NativeWidgetMacNSWindow ](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/app_shim/native_widget_mac_nswindow.h)(NSWindow) + [NativeWidgetMacNSWindow ](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/native_widget_mac_nswindow.h)(NSWindow) that is associated with the first responder. - The window dispatches the event as a keyDown event to it’s first responder (in this case the - [BridgedContentView ](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/app_shim/bridged_content_view.h)which + [BridgedContentView ](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/bridged_content_view.h)which serves as the NSWindow’s [contentView](https://developer.apple.com/documentation/appkit/nswindow/1419160-contentview)). - BridgedContentView inherits from NSTextInputClient which is required for @@ -251,16 +251,16 @@ Summary: - If no command matches it sends an insertText: message back to the BridgedContentView. - BridgedContentView - [converts the NSString to UFT16 and sends it through to it’s TextInputHost](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/app_shim/bridged_content_view.mm;l=504;drc=dd5a8d8907f60050eeaaac0299be624fe36cad8a). - - [TextInputHost ](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/cocoa/text_input_host.h)implements + [converts the NSString to UFT16 and sends it through to it’s TextInputHost](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/bridged_content_view.mm;l=504;drc=dd5a8d8907f60050eeaaac0299be624fe36cad8a). + - [TextInputHost ](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/cocoa/text_input_host.h)implements the remote Mojo interface - [remote_cocoa::mojom::TextInputHost](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/common/text_input_host.mojom;l=13;drc=4692fed3d7ff9afec997e3cd5fc5cc7050022cc7) + [remote_cocoa::mojom::TextInputHost](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/common/text_input_host.mojom;l=13;drc=4692fed3d7ff9afec997e3cd5fc5cc7050022cc7) and BridgedContextView communicates with the TextInputHost via Mojo message passing. - The TextInputHost calls - [InsertText()](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/cocoa/text_input_host.mm;l=254;drc=7d9087d7348118b8ea5b12df100f4267dc56cadf) + [InsertText()](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/cocoa/text_input_host.mm;l=254;drc=7d9087d7348118b8ea5b12df100f4267dc56cadf) on it’s - [ui::TextInputClient](https://source.chromium.org/chromium/chromium/src/+/master:ui/base/ime/text_input_client.h). + [ui::TextInputClient](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ime/text_input_client.h). - This should be the TextInputClient of the currently focused view. ## Views @@ -268,19 +268,19 @@ Summary: The Window Abstraction layer will pass the input event to Views. Views is Chrome’s (mostly) platform-independent UI framework that orchestrates UI elements in a tree structure. Every node in the views tree is a -[View](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h;bpv=1;bpt=1), +[View](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h;bpv=1;bpt=1), which is a UI element similar to an HTML DOM element. ![A simplified diagram of a views tree](images/views-tree.png) A -[Widget](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/widget.h;l=93;bpv=1;bpt=1?q=Widget&sq=&ss=chromium%2Fchromium%2Fsrc) +[Widget](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/widget.h;l=93;bpv=1;bpt=1?q=Widget&sq=&ss=chromium%2Fchromium%2Fsrc) hosts the views tree and is a window-like surface that draws its content onto a canvas provided by the underlying window abstraction. Every widget can have at most one focused view which is tracked by a FocusManager owned by the widget. The root of Views tree is a -[RootView](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/root_view.h;drc=62bf27aca5418212ceadd8daf9188d2aa437bfcc;l=52), +[RootView](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/root_view.h;drc=62bf27aca5418212ceadd8daf9188d2aa437bfcc;l=52), which is a special subclass of View that helps bridging between children views and the wrapping Widget. @@ -299,24 +299,24 @@ will ask FocusManger for the focused view and the event will be directly delivered to it. There is no tree traversal. The details can be broken down into: -1. [Widget::OnKeyEvent()](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/widget.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=1250): +1. [Widget::OnKeyEvent()](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/widget.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=1250): The key event will be passed from platform-dependent NativeWidget to Widget. \ - The event is then processed by [EventRewriter](https://source.chromium.org/chromium/chromium/src/+/master:ui/events/event_source.cc;drc=17cd6070f4da0bb1c0396778afba06910f98fd7b;l=139)(s) + The event is then processed by [EventRewriter](https://source.chromium.org/chromium/chromium/src/+/main:ui/events/event_source.cc;drc=17cd6070f4da0bb1c0396778afba06910f98fd7b;l=139)(s) attached to the Widget. Rewriters are used **only** on ChromeOS. -2. [EventProcessor::OnEventFromSource()](https://source.chromium.org/chromium/chromium/src/+/master:ui/events/event_processor.cc;drc=0cd9a52effdb8f2a02b99e8044d680001ba8090f;l=16): +2. [EventProcessor::OnEventFromSource()](https://source.chromium.org/chromium/chromium/src/+/main:ui/events/event_processor.cc;drc=0cd9a52effdb8f2a02b99e8044d680001ba8090f;l=16): The key event is then passed to the root view of the widget. Note that a RootView _is an_ EventProcessor. \ An EventProcessor is a _multicaster_. It tries to deliver the event to multiple - targets [until the event is marked as handled](https://source.chromium.org/chromium/chromium/src/+/master:ui/events/event_processor.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=48): + targets [until the event is marked as handled](https://source.chromium.org/chromium/chromium/src/+/main:ui/events/event_processor.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=48): It delegates the target enumeration task to an EventTargeter. \ In the case of RootView, the EventTargeter is a **ViewTargeter**. A ViewTargeter will return the currently focused view as the target for the key event. -3. [EventHandler::OnEvent()](https://source.chromium.org/chromium/chromium/src/+/master:ui/events/event_handler.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=29): +3. [EventHandler::OnEvent()](https://source.chromium.org/chromium/chromium/src/+/main:ui/events/event_handler.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=29): OmniboxViewViews receives the event. Every view is an EventHandler and OmniboxViewViews is no exception. -4. [OmniboxViewViews::HandleKeyEvent()](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/omnibox/omnibox_view_views.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=2171): +4. [OmniboxViewViews::HandleKeyEvent()](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/omnibox/omnibox_view_views.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=2171): Eventually where the event is consumed and the text in the omnibox gets updated. @@ -324,9 +324,9 @@ On Mac, the event will be funneled directly from the Window Abstraction layer to the focused view, i.e. Widget and RootView are not involved in event routing. This is achieved by having NativeWidgetMacNSWindowHost save a pointer to the focused view in a -[TextInputHost](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/cocoa/text_input_host.mm;drc=7d9087d7348118b8ea5b12df100f4267dc56cadf;l=268). +[TextInputHost](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/cocoa/text_input_host.mm;drc=7d9087d7348118b8ea5b12df100f4267dc56cadf;l=268). NativeWidgetMac -[registers](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/native_widget_mac.mm;drc=1748fd17d0e2b542b0051955a9cccb2153ff6ea7;l=895) +[registers](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/native_widget_mac.mm;drc=1748fd17d0e2b542b0051955a9cccb2153ff6ea7;l=895) itself as an observer of focus change in FocusManager and updates NativeWidgetMacNSWindowHost’s TextInputHost on focus change. @@ -336,19 +336,19 @@ In the case when the keystroke is an accelerator, for example, a Ctrl+T to open a new tab, the focused view is not the expected view to handle it. On Aura, when the focus is not on the web content, accelerators are handled by a -**[pre-handler](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/focus_manager_event_handler.cc;drc=df872ce8fcce25af51aa6b0f9fe8b1135b687524;l=17)** +**[pre-handler](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/focus_manager_event_handler.cc;drc=df872ce8fcce25af51aa6b0f9fe8b1135b687524;l=17)** that happens before the handler for character keys. This pre-handlers is hooked on aura::Window in the Window Abstraction layer. If a key event is consumed as accelerators, the character key handler path will be skipped. In the accelerator path, the **FocusManager** -[relays](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/focus_manager_event_handler.cc;drc=df872ce8fcce25af51aa6b0f9fe8b1135b687524;l=26) +[relays](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/focus_manager_event_handler.cc;drc=df872ce8fcce25af51aa6b0f9fe8b1135b687524;l=26) the event from Window Abstraction to views::AcceleratorManager, and finally to chrome::BrowserCommandController. Not all accelerators are handled by views::AcceleratorManager. A notable exception is the Tab key which is used to switch the focused view and will be -[handled](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/focus/focus_manager.cc;drc=df872ce8fcce25af51aa6b0f9fe8b1135b687524;l=70) +[handled](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/focus/focus_manager.cc;drc=df872ce8fcce25af51aa6b0f9fe8b1135b687524;l=70) directly by the FocusManager. If the focus is on the web content, the event will be handled by @@ -358,7 +358,7 @@ receive most keys except for important navigation accelerators. Mac interprets accelerators early in the event pipeline. [Key Equivalents](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/HandlingKeyEvents.html#//apple_ref/doc/uid/10000060i-CH7-SW11) like Cmd+T will be -[handled](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm;drc=6bf8746951f47dda5ce87be9a6218a1abfa064d0;l=291) +[handled](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm;drc=6bf8746951f47dda5ce87be9a6218a1abfa064d0;l=291) early in the Window Abstraction layer and the event never goes into Views. ### Mouse Click Event @@ -367,15 +367,15 @@ Views like textfield will grab focus on a click event. After the Widget has received the event from the window abstraction, the RootView -[traverses](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/root_view.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=387) +[traverses](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/root_view.cc;drc=5b8933e94139a0ab5be46141666fdfcce0f624f6;l=387) the views tree from leaf to root and looks for the first view that accepts the click event. Here, the leaf view is the lowest descendant view that contains the cursor location of the event. The task of searching for this view is delegated to -[ViewTargeter](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view_targeter_delegate.cc;drc=df872ce8fcce25af51aa6b0f9fe8b1135b687524;l=33). +[ViewTargeter](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view_targeter_delegate.cc;drc=df872ce8fcce25af51aa6b0f9fe8b1135b687524;l=33). When the click event is dispatched to a Textfield, it will -[notify](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/textfield/textfield.cc;drc=281086aeca412de952c180411560c7ca68a5b97b;l=2172) +[notify](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/textfield/textfield.cc;drc=281086aeca412de952c180411560c7ca68a5b97b;l=2172) the FocusManager to update the focused view. ## Focus Management @@ -383,7 +383,7 @@ the FocusManager to update the focused view. A focused control receives keyboard events. Focus change can be triggered by mouse click or pressing Tab key to switch to the next focusable view. Chrome usually draws a -[FocusRing](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/focus_ring.h;bpv=1;bpt=1;l=30?q=FocusRing&ss=chromium&gsn=FocusRing&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Dc%252B%252B%3Fpath%3Dsrc%2Fui%2Fviews%2Fcontrols%2Ffocus_ring.h%23FocusRing%253Aviews%2523c%2523oPBiT3XRtlN&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Dc%252B%252B%3Fpath%3Dsrc%2Fui%2Fviews%2Fcontrols%2Ffocus_ring.h%23FocusRing%253Aviews%2523c%2523ljYID0QylaH) +[FocusRing](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/focus_ring.h;bpv=1;bpt=1;l=30?q=FocusRing&ss=chromium&gsn=FocusRing&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Dc%252B%252B%3Fpath%3Dsrc%2Fui%2Fviews%2Fcontrols%2Ffocus_ring.h%23FocusRing%253Aviews%2523c%2523oPBiT3XRtlN&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Dc%252B%252B%3Fpath%3Dsrc%2Fui%2Fviews%2Fcontrols%2Ffocus_ring.h%23FocusRing%253Aviews%2523c%2523ljYID0QylaH) around the focused view. Focus rings are drawn separate from its view drawing. ### Focusable Controls @@ -395,10 +395,10 @@ in system settings needs to be enabled to have navigation of all controls on the screen. To comply with Mac’s behavior, Chrome sets -[kDefaultFocusBehavior](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/style/platform_style.h?q=kDefaultFocusBehavior) in +[kDefaultFocusBehavior](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/style/platform_style.h?q=kDefaultFocusBehavior) in the platform style to ACCESSIBLE_ONLY on Mac as opposed to ALWAYS on other platforms. Controls that are -[marked](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/toolbar/toolbar_button.cc;drc=93819857a690b79b1524052513747846c068ca90;l=104) +[marked](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/toolbar/toolbar_button.cc;drc=93819857a690b79b1524052513747846c068ca90;l=104) as ACCESSIBLE_ONLY will be skipped in search of the next view to focus if the Full keyboard access is off. @@ -412,7 +412,7 @@ is only triggered between top-level windows. **Windows** Chrome observes WM_ACTIVATE messages to monitor the active window change -[[ref](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/win/hwnd_message_handler.cc?q=WM_ACTIVATE)]. +[[ref](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/win/hwnd_message_handler.cc?q=WM_ACTIVATE)]. The event is then routed up through the NativeWidget (DesktopNativeWidgetAura) and eventually to Widget. Chrome then uses its own focus management to further @@ -423,7 +423,7 @@ keyboard focus. Chrome on Linux observes the platform native focus change events FocusIn and FocusOut -[[ref](https://source.chromium.org/chromium/chromium/src/+/master:ui/base/x/x11_window.cc?q=x11::Input::CrossingEvent::FocusIn)] +[[ref](https://source.chromium.org/chromium/chromium/src/+/main:ui/base/x/x11_window.cc?q=x11::Input::CrossingEvent::FocusIn)] to respond to focus change events. Nevertheless, eventually just like on Windows, the events will be interpreted as active window change. @@ -431,9 +431,9 @@ Windows, the events will be interpreted as active window change. On Mac, the ‘key window’ is the window that receives keyboard events. Chrome observes the key status change by implementing -[windowDidBecomeKey](https://source.chromium.org/chromium/chromium/src/+/master:components/remote_cocoa/app_shim/views_nswindow_delegate.mm;drc=e6d7cbba3a95a52176a5d5ca37572296f9b9aaa8;l=115) +[windowDidBecomeKey](https://source.chromium.org/chromium/chromium/src/+/main:components/remote_cocoa/app_shim/views_nswindow_delegate.mm;drc=e6d7cbba3a95a52176a5d5ca37572296f9b9aaa8;l=115) on an NSWindow and handles according -[[ref](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/native_widget_mac.mm?q=NativeWidgetMac::OnWindowKeyStatusChanged)], +[[ref](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/native_widget_mac.mm?q=NativeWidgetMac::OnWindowKeyStatusChanged)], which is similar to Windows’ active window change. ### Focus Handling in Views diff --git a/docs/ui/learn/bestpractices/colors.md b/docs/ui/learn/bestpractices/colors.md index be7935d5531bce..b61ff770794c6c 100644 --- a/docs/ui/learn/bestpractices/colors.md +++ b/docs/ui/learn/bestpractices/colors.md @@ -51,7 +51,7 @@ Old code in `tooltip_icon.cc` used hardcoded colors: **Best practice** -The [current version](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/bubble/tooltip_icon.cc;l=78;drc=756282c5ac4947c7329bc8b68711c3898334018f) +The [current version](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/bubble/tooltip_icon.cc;l=78;drc=756282c5ac4947c7329bc8b68711c3898334018f) uses color IDs, allowing the icon colors to potentially be tied to other icon colors: @@ -119,7 +119,7 @@ constructor since it seemed reasonable to do: **Best practice** -The [current version](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/file_system_access/file_system_access_usage_bubble_view.cc;l=196;drc=532834e1da3874a57dde3ed76511f53b8eb8ecdf) +The [current version](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/file_system_access/file_system_access_usage_bubble_view.cc;l=196;drc=532834e1da3874a57dde3ed76511f53b8eb8ecdf) moves this to `OnThemeChanged()` and thus handles theme changes correctly: |||---||| @@ -212,7 +212,7 @@ its child: **Best practice** -[Current version](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/location_bar/custom_tab_bar_view.cc;l=157;drc=ab2ca22fb75c61f7167e9b20ac88cc7a85c3be6b) +[Current version](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/location_bar/custom_tab_bar_view.cc;l=157;drc=ab2ca22fb75c61f7167e9b20ac88cc7a85c3be6b) queries a color API that is guaranteed to have an up-to-date value: |||---||| @@ -268,7 +268,7 @@ stored in the menu model: ##### -[Current version](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/recovery/recovery_install_global_error.cc;l=70;drc=b25251f1d6bc5359794d98cda8068a94e76ad317) +[Current version](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/recovery/recovery_install_global_error.cc;l=70;drc=b25251f1d6bc5359794d98cda8068a94e76ad317) uses an `ImageModel` to convey just the logical color, allowing consumers to apply physical colors: @@ -317,9 +317,9 @@ For new UI, **add new, specific color identifiers**. If a mock for a new `FooBarMenu` background, don't reuse `kFooBarMenuBackgroundColor` when implementing the new menu, as the name will no longer be accurate. Add a `kFrobberMenuBackgroundColor` identifier and use that instead. `ui/` code should -add identifiers to the [`NATIVE_THEME_COLOR_IDS`](https://source.chromium.org/chromium/chromium/src/+/master:ui/native_theme/native_theme_color_id.h;l=10;drc=21c19ce054e99a4361dff61877a4197831b80e6b) +add identifiers to the [`NATIVE_THEME_COLOR_IDS`](https://source.chromium.org/chromium/chromium/src/+/main:ui/native_theme/native_theme_color_id.h;l=10;drc=21c19ce054e99a4361dff61877a4197831b80e6b) macro; `chrome/` code should typically add to the -[`NotOverwritableByUserThemeProperty`](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/themes/theme_properties.h;l=91;drc=cfa76e5827628eb2104df0e0b55d5d89f4a93eaf) +[`NotOverwritableByUserThemeProperty`](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/themes/theme_properties.h;l=91;drc=cfa76e5827628eb2104df0e0b55d5d89f4a93eaf) enum. |||---||| @@ -335,7 +335,7 @@ constant to paint the drop indicator, since they have the same physical color: **Best practice** -[Current version](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/menu/submenu_view.cc;l=229;drc=7910ceae672184033abc44a287e309f14e664b5e) +[Current version](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/menu/submenu_view.cc;l=229;drc=7910ceae672184033abc44a287e309f14e664b5e) defines these as distinct logical colors with the same default physical color, better accommodating platforms where menu text and menu icons may differ: @@ -414,7 +414,7 @@ menu or background color). Even in more one-off cases, colors can still be relational; black text on a white background is not simply black in the abstract, but black because it contrasts with the background. UI colors can usually similarly be defined as contrasting or blending against other colors, -using the functions in [`color_utils.h`](https://source.chromium.org/chromium/chromium/src/+/master:ui/gfx/color_utils.h;drc=2e98db0e52f3f55056783031ab9f7377d4a12ad5). +using the functions in [`color_utils.h`](https://source.chromium.org/chromium/chromium/src/+/main:ui/gfx/color_utils.h;drc=2e98db0e52f3f55056783031ab9f7377d4a12ad5). In most cases, a correct relational definition for a color will work well in both light and dark mode, and custom themes as well. @@ -430,7 +430,7 @@ Old code in `common_theme.cc` defines a disabled button color absolutely: **Best practice** -[Current version](https://source.chromium.org/chromium/chromium/src/+/master:ui/native_theme/common_theme.cc;l=264;drc=21c19ce054e99a4361dff61877a4197831b80e6b) +[Current version](https://source.chromium.org/chromium/chromium/src/+/main:ui/native_theme/common_theme.cc;l=264;drc=21c19ce054e99a4361dff61877a4197831b80e6b) makes it clear that the disabled color is related to the normal color: |||---||| @@ -486,7 +486,7 @@ SkColor GetAuraColor( ## Keep image resources theme neutral **Use image resources that are theme-neutral**. Most vector images should not -encode color information at all; in some cases, [badging](https://source.chromium.org/chromium/chromium/src/+/master:ui/gfx/paint_vector_icon.h;l=70;drc=7a9b1b437ae847e90ef3ac10f73991796dfe5591) +encode color information at all; in some cases, [badging](https://source.chromium.org/chromium/chromium/src/+/main:ui/gfx/paint_vector_icon.h;l=70;drc=7a9b1b437ae847e90ef3ac10f73991796dfe5591) can be used to break a vector into a common core and a set of recolorable overlays. Full-color raster images that work on any background color can be used, but images that assume a particular background color, or that are broken @@ -496,7 +496,7 @@ light/dark theme colors or Material Design palettes). These cases are tricky to address and generally require cooperation between the visual designer, the toolkit team, and the UI engineer. -[Current code](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_dialog_views.cc;l=100;drc=53d4f4170d068ef7e9b6e19995b0eac0cb3cfd43) +[Current code](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_dialog_views.cc;l=100;drc=53d4f4170d068ef7e9b6e19995b0eac0cb3cfd43) uses two full color raster images, one that assumes a light background and the other that assumes a dark background: @@ -538,7 +538,7 @@ Old code in `tab_strip_ui_handler.cc` uses global theming objects: **Best practice** -[Current version](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/webui/tab_strip/tab_strip_ui_handler.cc;l=524;drc=cfa76e5827628eb2104df0e0b55d5d89f4a93eaf) +[Current version](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/webui/tab_strip/tab_strip_ui_handler.cc;l=524;drc=cfa76e5827628eb2104df0e0b55d5d89f4a93eaf) gets colors from its embedding `View`; this will still require the caller to guarantee the `View`'s colors are up to date, monitor for potential changes in those colors, etc.: diff --git a/docs/ui/learn/bestpractices/layout.md b/docs/ui/learn/bestpractices/layout.md index 013aa0093add0c..fed019ac487a92 100644 --- a/docs/ui/learn/bestpractices/layout.md +++ b/docs/ui/learn/bestpractices/layout.md @@ -31,7 +31,7 @@ Note: the concept in this section is general, but the linked specs are [Material Refresh]: https://docs.google.com/presentation/d/1EO7TOpIMJ7QHjaTVw9St-q6naKwtXX2TwzMirG5EsKY/edit#slide=id.g3232c09376_6_794 [Harmony]: https://folio.googleplex.com/chrome-ux-specs-and-sources/Chrome%20browser%20%28MD%29/Secondary%20UI%20Previews%20and%20specs%20%28exports%29/Spec -[`DISTANCE_UNRELATED_CONTROL_HORIZONTAL`]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/chrome_layout_provider.h;l=56;drc=ec62c9ac3ef71a7014e27c5d2cf98917a89e3524 +[`DISTANCE_UNRELATED_CONTROL_HORIZONTAL`]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/chrome_layout_provider.h;l=56;drc=ec62c9ac3ef71a7014e27c5d2cf98917a89e3524 [dictionary]: http://go/DesktopDictionary ## Obtain layout values from provider objects @@ -52,22 +52,22 @@ usually accessed via [global helper functions][], can provide appropriate directly, but use `Label` and other such controls, providing the appropriate [context][] and [style][]. -[`LayoutProvider`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/layout_provider.h;l=129;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 -[`ChromeLayoutProvider`]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/chrome_layout_provider.h;drc=ec62c9ac3ef71a7014e27c5d2cf98917a89e3524;l=76 -[`Get()`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=135 -[distances]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=148 -[insets]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=144 -[corner radii]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=168 -[shadow elevations]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=172 -[`Label`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/controls/label.h;l=30;drc=59135b4042aa469752899e8e4bf2a0a81d3d320c -[`TypographyProvider`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/style/typography_provider.h;l=22;drc=b5e29e075e814ed41e6727c281b69f797d8a1e10 -[`ChromeTypographyProvider`]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/chrome_typography_provider.h;l=13;drc=a7ee000c95842e2dce6397ca36926924f4cb322b -[global helper functions]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/style/typography.h;l=109;drc=8f7db479018a99e5906876954de93ae6d23bee58 -[fonts]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/style/typography_provider.h;l=28;drc=b5e29e075e814ed41e6727c281b69f797d8a1e10 -[colors]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/style/typography_provider.h;l=32;drc=b5e29e075e814ed41e6727c281b69f797d8a1e10 -[line heights]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/style/typography_provider.h;l=37;drc=b5e29e075e814ed41e6727c281b69f797d8a1e10 -[context]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/style/typography.h;l=23;drc=8f7db479018a99e5906876954de93ae6d23bee58 -[style]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/style/typography.h;l=67;drc=8f7db479018a99e5906876954de93ae6d23bee58 +[`LayoutProvider`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/layout_provider.h;l=129;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 +[`ChromeLayoutProvider`]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/chrome_layout_provider.h;drc=ec62c9ac3ef71a7014e27c5d2cf98917a89e3524;l=76 +[`Get()`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=135 +[distances]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=148 +[insets]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=144 +[corner radii]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=168 +[shadow elevations]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/layout_provider.h;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38;l=172 +[`Label`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/controls/label.h;l=30;drc=59135b4042aa469752899e8e4bf2a0a81d3d320c +[`TypographyProvider`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/style/typography_provider.h;l=22;drc=b5e29e075e814ed41e6727c281b69f797d8a1e10 +[`ChromeTypographyProvider`]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/chrome_typography_provider.h;l=13;drc=a7ee000c95842e2dce6397ca36926924f4cb322b +[global helper functions]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/style/typography.h;l=109;drc=8f7db479018a99e5906876954de93ae6d23bee58 +[fonts]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/style/typography_provider.h;l=28;drc=b5e29e075e814ed41e6727c281b69f797d8a1e10 +[colors]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/style/typography_provider.h;l=32;drc=b5e29e075e814ed41e6727c281b69f797d8a1e10 +[line heights]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/style/typography_provider.h;l=37;drc=b5e29e075e814ed41e6727c281b69f797d8a1e10 +[context]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/style/typography.h;l=23;drc=8f7db479018a99e5906876954de93ae6d23bee58 +[style]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/style/typography.h;l=67;drc=8f7db479018a99e5906876954de93ae6d23bee58 |||---||| @@ -78,7 +78,7 @@ directly, but use `Label` and other such controls, providing the appropriate [Current code][1] uses file scoped hard-coded padding values for its layout constants. -[1]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/subtle_notification_view.cc;l=142;drc=787d0aacc071674dc83f6059072d15f8cfffbf84 +[1]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/subtle_notification_view.cc;l=142;drc=787d0aacc071674dc83f6059072d15f8cfffbf84 ##### @@ -172,9 +172,9 @@ layout, and do so in a declarative rather than imperative fashion. The resulting code is often simpler and easier to understand. Writing a [bespoke `LayoutManager`][] is also possible, but less common. -[`Layout()`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h;l=730;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 -[`LayoutManager`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/layout_manager.h;l=33;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 -[bespoke `LayoutManager`]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/try_chrome_dialog_win/button_layout.h;l=30;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 +[`Layout()`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h;l=730;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 +[`LayoutManager`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/layout_manager.h;l=33;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 +[bespoke `LayoutManager`]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/try_chrome_dialog_win/button_layout.h;l=30;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 |||---||| @@ -190,8 +190,8 @@ The following old code used Layout() to have its label text fill the dialog. [Current code][2] uses a [FillLayout][] to achieve the same result. -[2]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/relaunch_notification/relaunch_required_dialog_view.cc;l=91;drc=1ec33e7c19e2d63b3f918df115c12f77f419645b -[FillLayout]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/fill_layout.h +[2]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/relaunch_notification/relaunch_required_dialog_view.cc;l=91;drc=1ec33e7c19e2d63b3f918df115c12f77f419645b +[FillLayout]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/fill_layout.h |||---||| @@ -244,11 +244,11 @@ Such manual computation is prone to bugs if someone changes a size, padding value, or child order in one place without also updating related computations elsewhere. -[`ClassProperty`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/base/class_property.h;l=55;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 -[margins]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view_class_properties.h;l=30;drc=1449b8c60358c4cdea1722e4c1e8079bd1b5f306 -[margin collapsing]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/flex_layout.h;l=87;drc=62bf27aca5418212ceadd8daf9188d2aa437bfcc -[internal padding]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view_class_properties.h;l=40;drc=1449b8c60358c4cdea1722e4c1e8079bd1b5f306 -[different padding amounts between different children]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/toolbar/toolbar_view.cc;l=974;drc=34a8c4215229379ced3586125399c7ad3c65b87f +[`ClassProperty`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/base/class_property.h;l=55;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 +[margins]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view_class_properties.h;l=30;drc=1449b8c60358c4cdea1722e4c1e8079bd1b5f306 +[margin collapsing]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/flex_layout.h;l=87;drc=62bf27aca5418212ceadd8daf9188d2aa437bfcc +[internal padding]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view_class_properties.h;l=40;drc=1449b8c60358c4cdea1722e4c1e8079bd1b5f306 +[different padding amounts between different children]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/toolbar/toolbar_view.cc;l=974;drc=34a8c4215229379ced3586125399c7ad3c65b87f |||---||| @@ -266,7 +266,7 @@ involving the control insets. [Current code][3] uses a combination of margin and padding on the ColorPickerView to ensure proper alignment. -[3]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc;l=89;drc=542c4c6ac89bc665807351d3fb4aca5ebddc82f8 +[3]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc;l=89;drc=542c4c6ac89bc665807351d3fb4aca5ebddc82f8 |||---||| @@ -476,9 +476,9 @@ horizontal and vertical alignment.** For simple layouts, [`BoxLayout`][] and sections or groups hierarchically may result in simpler inner layouts that can be nested within an overall layout. -[`GridLayout`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/grid_layout.h;l=79;drc=8cab3382ac9b70b7ecfe29ae03b1b7ee8f4e01fa -[`BoxLayout`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/box_layout.h;l=28;drc=5b9e43d976aca377588875fc59c5348ede02a8b5 -[`FlexLayout`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/layout/flex_layout.h;l=73;drc=62bf27aca5418212ceadd8daf9188d2aa437bfcc +[`GridLayout`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/grid_layout.h;l=79;drc=8cab3382ac9b70b7ecfe29ae03b1b7ee8f4e01fa +[`BoxLayout`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/box_layout.h;l=28;drc=5b9e43d976aca377588875fc59c5348ede02a8b5 +[`FlexLayout`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/layout/flex_layout.h;l=73;drc=62bf27aca5418212ceadd8daf9188d2aa437bfcc |||---||| @@ -496,7 +496,7 @@ a stacked title and subtitle flanked on by views on both sides. [Current code][4] uses [`FlexLayout`][] to achieve the desired result, resulting in clearer code. -[4]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/hover_button.cc;l=106;drc=888af74006ea1c4ee9907d18c8df2a7ca424eab9 +[4]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/hover_button.cc;l=106;drc=888af74006ea1c4ee9907d18c8df2a7ca424eab9 |||---||| @@ -674,9 +674,9 @@ fonts will be in a certain size, or that a given fixed area is sufficient to display all necessary information, can cause hard-to-find localization and accessibility bugs for users with verbose languages or unusually large fonts. -[`DISTANCE_BUBBLE_PREFERRED_WIDTH`]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/chrome_layout_provider.h;l=68;drc=ec62c9ac3ef71a7014e27c5d2cf98917a89e3524 -[`BubbleFrameView::GetFrameWidthForClientWidth()`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/bubble/bubble_frame_view.cc;l=688;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 -[conformed to spec]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/bubble/bubble_frame_view.cc;l=698;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 +[`DISTANCE_BUBBLE_PREFERRED_WIDTH`]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/chrome_layout_provider.h;l=68;drc=ec62c9ac3ef71a7014e27c5d2cf98917a89e3524 +[`BubbleFrameView::GetFrameWidthForClientWidth()`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/bubble/bubble_frame_view.cc;l=688;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 +[conformed to spec]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/bubble/bubble_frame_view.cc;l=698;drc=f5df5da5753795298349b2dd6325e2c5e6e13e38 |||---||| @@ -733,8 +733,8 @@ the child out and update its properties. Modify the invisible `View`s to intercept events. Toggle child visibility directly in response to external events rather than calculating it inside `Layout()`. -[`OnBoundsChanged()`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h;l=1377;drc=34a8c4215229379ced3586125399c7ad3c65b87f -[hit-testing and event-handling functions]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h;l=919;drc=34a8c4215229379ced3586125399c7ad3c65b87f +[`OnBoundsChanged()`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h;l=1377;drc=34a8c4215229379ced3586125399c7ad3c65b87f +[hit-testing and event-handling functions]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h;l=919;drc=34a8c4215229379ced3586125399c7ad3c65b87f |||---||| @@ -994,14 +994,14 @@ accordingly, changing existing code from synchronous to asynchronous layout may require adding `LayoutRootViewIfNecessary()` calls to (possibly many) tests, and this is not a sign that the change is wrong. -[the preferred size changing]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.cc;l=1673;drc=bc9a6d40468646be476c61b6637b51729bec7b6d -[a child needing layout]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.cc;l=777;drc=bc9a6d40468646be476c61b6637b51729bec7b6d -[`InvalidateLayout()`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h;l=735;drc=c06f6b339b47ce2388624aa9a89334ace38a71e4 -[`ChildPreferredSizeChanged()`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h;l=1381;drc=c06f6b339b47ce2388624aa9a89334ace38a71e4 -[`ViewObserver`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view_observer.h;l=17;drc=eb20fd77330dc4a89eecf17459263e5895e7f177 -[requests a LayerTreeHost update]: https://source.chromium.org/chromium/chromium/src/+/master:cc/trees/layer_tree_host.cc;l=304;drc=c06f6b339b47ce2388624aa9a89334ace38a71e4 -[`Widget::LayoutRootViewIfNecessary()`]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/widget.h;l=946;drc=b1dcb398c454a576092d38d0d67db3709b2b2a9b -[call LayoutRootViewIfNecessary() manually]: https://source.chromium.org/chromium/chromium/src/+/master:ui/views/widget/widget_unittest.cc;l=3110;drc=c06f6b339b47ce2388624aa9a89334ace38a71e4 +[the preferred size changing]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.cc;l=1673;drc=bc9a6d40468646be476c61b6637b51729bec7b6d +[a child needing layout]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.cc;l=777;drc=bc9a6d40468646be476c61b6637b51729bec7b6d +[`InvalidateLayout()`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h;l=735;drc=c06f6b339b47ce2388624aa9a89334ace38a71e4 +[`ChildPreferredSizeChanged()`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h;l=1381;drc=c06f6b339b47ce2388624aa9a89334ace38a71e4 +[`ViewObserver`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view_observer.h;l=17;drc=eb20fd77330dc4a89eecf17459263e5895e7f177 +[requests a LayerTreeHost update]: https://source.chromium.org/chromium/chromium/src/+/main:cc/trees/layer_tree_host.cc;l=304;drc=c06f6b339b47ce2388624aa9a89334ace38a71e4 +[`Widget::LayoutRootViewIfNecessary()`]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/widget.h;l=946;drc=b1dcb398c454a576092d38d0d67db3709b2b2a9b +[call LayoutRootViewIfNecessary() manually]: https://source.chromium.org/chromium/chromium/src/+/main:ui/views/widget/widget_unittest.cc;l=3110;drc=c06f6b339b47ce2388624aa9a89334ace38a71e4 |||---||| @@ -1011,7 +1011,7 @@ and this is not a sign that the change is wrong. [Current code][5] makes a direct and unnecessary call to Layout() -[5]: https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/media_router/cast_dialog_view.cc;l=349;drc=18ca2de542bfa53802639dc5c85762b5e7b5bef6 +[5]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/media_router/cast_dialog_view.cc;l=349;drc=18ca2de542bfa53802639dc5c85762b5e7b5bef6 ##### @@ -1093,7 +1093,7 @@ and children vary over time, and often more performant as well. [Current code][6] holds both horizontal and vertical time views and replaces the children and LayoutManager on orientation change. -[6]: https://source.chromium.org/chromium/chromium/src/+/master:ash/system/time/time_view.h;l=35;drc=7d8bc7f807a433e6a127806e991fe780aa27ce77;bpv=1;bpt=0?originalUrl=https:%2F%2Fcs.chromium.org%2F +[6]: https://source.chromium.org/chromium/chromium/src/+/main:ash/system/time/time_view.h;l=35;drc=7d8bc7f807a433e6a127806e991fe780aa27ce77;bpv=1;bpt=0?originalUrl=https:%2F%2Fcs.chromium.org%2F ##### diff --git a/docs/ui/learn/ui_debugging.md b/docs/ui/learn/ui_debugging.md index a36787b5b5657d..40be02a68b3d74 100644 --- a/docs/ui/learn/ui_debugging.md +++ b/docs/ui/learn/ui_debugging.md @@ -28,7 +28,7 @@ Once being enabled, UI DevTools can be launched through a button on `chrome://inspect#native-ui` page. Thus, UI developers are able to examine the UI structure, individual view's layout and properties etc. -Detailed usage information and feature tutorials can be found in this [doc](https://chromium.googlesource.com/chromium/src/+/master/docs/ui/ui_devtools/index.md). +Detailed usage information and feature tutorials can be found in this [doc](https://chromium.googlesource.com/chromium/src/+/main/docs/ui/ui_devtools/index.md). @@ -45,8 +45,8 @@ information. | Windbg | [README][] | [Source][] | | LLDB | TBA | TBA | -[README]: https://chromium.googlesource.com/chromium/src/+/master/tools/win/chromeexts/README.md -[Source]: https://source.chromium.org/chromium/chromium/src/+/master:tools/win/chromeexts/ +[README]: https://chromium.googlesource.com/chromium/src/+/main/tools/win/chromeexts/README.md +[Source]: https://source.chromium.org/chromium/chromium/src/+/main:tools/win/chromeexts/ ## Views examples @@ -65,7 +65,7 @@ $ out/Default/views_examples [--enable-examples=] ``` The list of all available examples can be found in -[README](https://chromium.googlesource.com/chromium/src/+/master/ui/views/examples/README.md). +[README](https://chromium.googlesource.com/chromium/src/+/main/ui/views/examples/README.md). ## Note @@ -75,8 +75,8 @@ The list of all available examples can be found in To be able to inspect the properties of a view through those tools, the corresponding view needs to have metadata and properties built in it. This requires adding some standard macros. A simple example can be found from this -[comment](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h?q=%22Property%20metadata%22&ss=chromium%2Fchromium%2Fsrc). +[comment](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h?q=%22Property%20metadata%22&ss=chromium%2Fchromium%2Fsrc). More advanced usages of the macros and special property handlings are elaborated -in this [doc](https://chromium.googlesource.com/chromium/src/+/master/docs/ui/views/metadata_properties.md). +in this [doc](https://chromium.googlesource.com/chromium/src/+/main/docs/ui/views/metadata_properties.md). diff --git a/docs/ui/views/DIR_METADATA b/docs/ui/views/DIR_METADATA index 1aa4f31fa42bc9..25704efb3e3b2c 100644 --- a/docs/ui/views/DIR_METADATA +++ b/docs/ui/views/DIR_METADATA @@ -1,10 +1,10 @@ # Metadata information for this directory. # # For more information on DIR_METADATA files, see: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/README.md +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/README.md # # For the schema of this file, see Metadata message: -# https://source.chromium.org/chromium/infra/infra/+/master:go/src/infra/tools/dirmd/proto/dir_metadata.proto +# https://source.chromium.org/chromium/infra/infra/+/main:go/src/infra/tools/dirmd/proto/dir_metadata.proto monorail { component: "Internals>Views" diff --git a/docs/ui/views/metadata_properties.md b/docs/ui/views/metadata_properties.md index 4bf24ae4f09a34..4093668f02c4e5 100644 --- a/docs/ui/views/metadata_properties.md +++ b/docs/ui/views/metadata_properties.md @@ -1,7 +1,7 @@ # Advanced Metadata Definitions and Usages The core documentation for Views Metadata and properties usage can be found -[here](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h?q=%22Properties%20-%22). For most instances, this is sufficient to add metadata to any +[here](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h?q=%22Properties%20-%22). For most instances, this is sufficient to add metadata to any given view descendant class. There are, however, some cases where extra care is needed to properly add @@ -70,7 +70,7 @@ While this may seem strange that a property would be read-only, it’s a good debugging tool by allowing the ui-devtools to peer into the object instance for more insight about it’s internal state. In those cases, you may want to define such a property in the metadata. A read-only property only has a “getter” (see -the [core documentation](https://source.chromium.org/chromium/chromium/src/+/master:ui/views/view.h?q=%22Properties%20-%22) about how to define a “getter”). It is as simple +the [core documentation](https://source.chromium.org/chromium/chromium/src/+/main:ui/views/view.h?q=%22Properties%20-%22) about how to define a “getter”). It is as simple as using a different macro when defining the class’ metadata. diff --git a/docs/updater/cup.md b/docs/updater/cup.md index 986f3ce328242d..ffe1394f6e4c99 100644 --- a/docs/updater/cup.md +++ b/docs/updater/cup.md @@ -130,5 +130,5 @@ Previous documents describing CUP can be found at: * [ECDSA Extension](https://github.com/google/omaha/blob/master/doc/ClientUpdateProtocolEcdsa.md) Chromium's implementation of CUP can be found in -[components/client\_update\_protocol](https://source.chromium.org/chromium/chromium/src/+/master:components/client_update_protocol/). +[components/client\_update\_protocol](https://source.chromium.org/chromium/chromium/src/+/main:components/client_update_protocol/). diff --git a/docs/updating_clang_format_binaries.md b/docs/updating_clang_format_binaries.md index d4e526adb1ed6c..ec6c8dfb071d02 100644 --- a/docs/updating_clang_format_binaries.md +++ b/docs/updating_clang_format_binaries.md @@ -112,7 +112,7 @@ Platform specific notes: Copy the binaries into your chromium checkout (under `src/buildtools/(win|linux64|mac)/clang-format(.exe?)`). For each binary, you'll need to run `upload_to_google_storage.py` according to the instructions in -[README.txt](https://chromium.googlesource.com/chromium/src/+/master/buildtools/clang_format/README.txt). +[README.txt](https://chromium.googlesource.com/chromium/src/+/main/buildtools/clang_format/README.txt). This will upload the binary into a publicly accessible google storage bucket, and update `.sha1` file in your Chrome checkout. You'll check in the `.sha1` file (but NOT the clang-format binary) into source control. In order to be able @@ -131,7 +131,7 @@ The `README.chromium` file ought to be updated with version and date info. Update clang-format binaries and scripts for all platforms. I followed these instructions: - https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang_format_binaries.md + https://chromium.googlesource.com/chromium/src/+/main/docs/updating_clang_format_binaries.md The binaries were built at clang revision ####### on ####DATETIME####. diff --git a/docs/vscode.md b/docs/vscode.md index 0d73bf552792ff..6c7be97505d147 100644 --- a/docs/vscode.md +++ b/docs/vscode.md @@ -43,7 +43,7 @@ Here's what works well: Please keep this doc up-to-date. VS Code is still in active development and subject to changes. This doc is checked into the Chromium git repo, so if you make changes, read the [documentation -guidelines](https://chromium.googlesource.com/chromium/src/+/master/docs/documentation_guidelines.md) +guidelines](https://chromium.googlesource.com/chromium/src/+/main/docs/documentation_guidelines.md) and [submit a change list](https://www.chromium.org/developers/contributing-code). All file paths and commands have been tested on Linux. Windows and Mac might diff --git a/docs/webui_in_chrome.md b/docs/webui_in_chrome.md index 39e3483733def0..71ca1881a6623d 100644 --- a/docs/webui_in_chrome.md +++ b/docs/webui_in_chrome.md @@ -17,7 +17,7 @@ This guide is based on [Creating WebUI Interfaces in components](webui_in_compon WebUI pages live in `chrome/browser/resources`. You should create a folder for your project `chrome/browser/resources/hello_world`. -When creating WebUI resources, follow the [Web Development Style Guide](https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md). For a sample WebUI page you could start with the following files: +When creating WebUI resources, follow the [Web Development Style Guide](https://chromium.googlesource.com/chromium/src/+/main/styleguide/web/web.md). For a sample WebUI page you could start with the following files: `chrome/browser/resources/hello_world/hello_world.html` ```html diff --git a/docs/webui_in_components.md b/docs/webui_in_components.md index dd84e4792fd3ee..a39f191940ca06 100644 --- a/docs/webui_in_components.md +++ b/docs/webui_in_components.md @@ -19,7 +19,7 @@ To create a WebUI interface in `components/` you need to follow different steps ## Creating the WebUI page -WebUI resources in `components/` will be added in your specific project folder. Create a project folder `src/components/hello_world/`. When creating WebUI resources, follow the [Web Development Style Guide](https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md). For a sample WebUI page you could start with the following files: +WebUI resources in `components/` will be added in your specific project folder. Create a project folder `src/components/hello_world/`. When creating WebUI resources, follow the [Web Development Style Guide](https://chromium.googlesource.com/chromium/src/+/main/styleguide/web/web.md). For a sample WebUI page you could start with the following files: `src/components/hello_world/hello_world.html:` ```html @@ -304,11 +304,11 @@ You'll notice that the call is asynchronous. We must wait for the C++ side to ca ## Creating a WebUI Dialog -Some pages have many messages or share code that sends messages. To make possible message handling and/or to create a WebUI dialogue `c++->js` and `js->c++`, follow the guide in [WebUI Explainer](https://chromium.googlesource.com/chromium/src/+/master/docs/webui_explainer.md). +Some pages have many messages or share code that sends messages. To make possible message handling and/or to create a WebUI dialogue `c++->js` and `js->c++`, follow the guide in [WebUI Explainer](https://chromium.googlesource.com/chromium/src/+/main/docs/webui_explainer.md). ## DevUI Pages -DevUI pages are WebUI pages intended for developers, and unlikely used by most users. An example is `chrome://bluetooth-internals`. On Android Chrome, these pages are moved to a separate [Dynamic Feature Module (DFM)](https://chromium.googlesource.com/chromium/src/+/master/docs/android_dynamic_feature_modules.md) to reduce binary size. Most WebUI pages are DevUI. This is why in this doc uses `dev_ui_components_resources.{grd, h}` in its examples. +DevUI pages are WebUI pages intended for developers, and unlikely used by most users. An example is `chrome://bluetooth-internals`. On Android Chrome, these pages are moved to a separate [Dynamic Feature Module (DFM)](https://chromium.googlesource.com/chromium/src/+/main/docs/android_dynamic_feature_modules.md) to reduce binary size. Most WebUI pages are DevUI. This is why in this doc uses `dev_ui_components_resources.{grd, h}` in its examples. `components/` resources that are intended for end users are associated with `components_resources.{grd, h}` and `components_scaled_resorces.{grd, h}`. Use these in place of or inadditional to `dev_ui_components_resources.{grd, h}` if needed. diff --git a/docs/windows_native_window_occlusion_tracking.md b/docs/windows_native_window_occlusion_tracking.md index 23cff9e1ee49b9..2c38a3c67c87eb 100644 --- a/docs/windows_native_window_occlusion_tracking.md +++ b/docs/windows_native_window_occlusion_tracking.md @@ -3,7 +3,7 @@ ## Background Ui::aura has an -[API](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/window_occlusion_tracker.h) +[API](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/window_occlusion_tracker.h) to track which aura windows are occluded, i.e., covered by one or more other windows. If a window is occluded, Chromium treats foreground tabs as if they were background tabs; rendering stops, and js is throttled. On @@ -11,7 +11,7 @@ ChromeOS, since all windows are aura windows, this is sufficient to determine if a Chromium window is covered by other windows. On Windows, we need to consider native app windows when determining if a Chromium window is occluded. This is implemented in -[native_window_occlusion_tracker_win.cc](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/native_window_occlusion_tracker_win.cc). +[native_window_occlusion_tracker_win.cc](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/native_window_occlusion_tracker_win.cc). ## Implementation When the core WindowOcclusionTracker decides to track a WindowTreeHost, it @@ -29,7 +29,7 @@ The main work of occlusion calculation is done by a helper class, WindowOcclusionCalculator, which runs on a separate COM task runner, in order to not block the UI thread. If the WindowOcclusionCalculator is tracking any windows, it -[registers](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/native_window_occlusion_tracker_win.cc?q=WindowOcclusionCalculator::RegisterEventHooks) +[registers](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/native_window_occlusion_tracker_win.cc?q=WindowOcclusionCalculator::RegisterEventHooks) a set of [event](https://docs.microsoft.com/en-us/windows/win32/winauto/event-constants) hooks with Windows, in order to know when @@ -41,7 +41,7 @@ occlude Chromium windows, (i.e., fully visible windows on the current virtual desktop), we register for EVENT_OBJECT_LOCATIONCHANGE events for the window's process. pids_for_location_change_hook_ keeps track of which pids are hooked, and is -[used to remove the hook](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/native_window_occlusion_tracker_win.cc;drc=eeee643ae963e1d78c7457184f8af93f48bba9d3;l=443) +[used to remove the hook](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/native_window_occlusion_tracker_win.cc;drc=eeee643ae963e1d78c7457184f8af93f48bba9d3;l=443) if the process no longer has any windows open. When the event handler gets notified of an event, it usually kicks off new @@ -71,7 +71,7 @@ it is occluded, otherwise, not. Once the occlusion state of all root Chromium windows has been determined, the WindowOcclusionTracker posts a task to the ui thread to run a callback on the NativeWindowOcclusionTrackerWin object. That callback is -[NativeWindowOcclusionTrackerWin::UpdateOcclusionState](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/native_window_occlusion_tracker_win.cc;l=226?q=NativeWindowOcclusionTrackerWin::UpdateOcclusionState) +[NativeWindowOcclusionTrackerWin::UpdateOcclusionState](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/native_window_occlusion_tracker_win.cc;l=226?q=NativeWindowOcclusionTrackerWin::UpdateOcclusionState) , and is passed root_window_hwnds_occlusion_state_, which is a map between root window HWNDs and their calculated occlusion state. diff --git a/docs/windows_pwa_integration.md b/docs/windows_pwa_integration.md index 23502cf39e7393..2d1b9dcba5d86b 100644 --- a/docs/windows_pwa_integration.md +++ b/docs/windows_pwa_integration.md @@ -7,7 +7,7 @@ Chrome binary chrome_proxy.exe with the app id of the PWA, and the Chrome profile the PWA is installed in. When chrome_proxy.exe runs, it launches Chrome with the same command line options. The shortcut links to chrome_proxy.exe instead of chrome.exe because of - [a bug in Windows 10 start menu pinning](https://source.chromium.org/chromium/chromium/src/+/master:chrome/chrome_proxy/chrome_proxy_main_win.cc;l=23). + [a bug in Windows 10 start menu pinning](https://source.chromium.org/chromium/chromium/src/+/main:chrome/chrome_proxy/chrome_proxy_main_win.cc;l=23). ## File handling support In order to make Progressive Web Apps (PWA's) more like traditional apps, PWA's @@ -20,7 +20,7 @@ applications that can open the file. The user can also set the PWA as the default handler for the file extension. Because of a limitation of the Windows shell, Chrome registers a per-PWA install -[launcher app](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/web_applications/chrome_pwa_launcher/README.md;l=1) +[launcher app](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/chrome_pwa_launcher/README.md;l=1) as a handler for the file extension. Chrome ships with a canonical launcher app called chrome_pwa_launcher.exe, which lives in the version sub-directory of the Chrome install dir. When a PWA is installed, we create a hard link from the @@ -37,7 +37,7 @@ Registration starts in [web_app::RegisterFileHandlersWithOS](https://source.chro `.` We use the hash due to 32-character limit for ProgID's. The registry work is done in -[ShellUtil::AddFileAssociations](https://source.chromium.org/chromium/chromium/src/+/master:chrome/installer/util/shell_util.cc?q=%20ShellUtil::AddFileAssociations): +[ShellUtil::AddFileAssociations](https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/util/shell_util.cc?q=%20ShellUtil::AddFileAssociations): * Register the ProgID by adding key `HKCU\Software\Classes\` to the registry. * Set the application name and icon for the PWA with these two keys: diff --git a/docs/windows_shortcut_and_taskbar_handling.md b/docs/windows_shortcut_and_taskbar_handling.md index 655d6ab82263e7..4ced93f9b01562 100644 --- a/docs/windows_shortcut_and_taskbar_handling.md +++ b/docs/windows_shortcut_and_taskbar_handling.md @@ -18,7 +18,7 @@ and puts the .lnk file in that directory. For example, 3ffff1b1b170b31e. App windows on Windows have an [App User Model ID (AUMI)](https://docs.microsoft.com/en-us/windows/win32/shell/appids) property. For Chrome windows, this is set in -[BrowserWindowPropertyManager::UpdateWindowProperties](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/frame/browser_window_property_manager_win.cc?q=BrowserWindowPropertyManager::UpdateWindowProperties), +[BrowserWindowPropertyManager::UpdateWindowProperties](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/frame/browser_window_property_manager_win.cc?q=BrowserWindowPropertyManager::UpdateWindowProperties), when a window is opened. Windows desktop shortcuts have an app model property, and this should match the open window's AUMI. Windows groups open windows with the same AUMI to a taskbar icon. @@ -27,15 +27,15 @@ There are two kinds of Chrome windows with AUMI's: browser windows, and app windows, which include web apps, and extensions, i.e., windows opened via --app-id or --app. -[GetAppUserModelIdForBrowser](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/shell_integration_win.cc?q=GetAppUserModelIdForBrowser) +[GetAppUserModelIdForBrowser](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/shell_integration_win.cc?q=GetAppUserModelIdForBrowser) constructs an AUMI for a browser window and -[GetAppUserModelIdForApp](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/shell_integration_win.cc?q=GetAppUserModelIdForApp) +[GetAppUserModelIdForApp](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/shell_integration_win.cc?q=GetAppUserModelIdForApp) constructs an AUMI for an app window. Each calls -[ShellUtil::BuildAppUserModelId](https://source.chromium.org/chromium/chromium/src/+/master:chrome/installer/util/shell_util.cc;q=ShellUtil::BuildAppUserModelId) +[ShellUtil::BuildAppUserModelId](https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/util/shell_util.cc;q=ShellUtil::BuildAppUserModelId) to construct the AUMI out of component strings. All AUMI's start with the base app id, -[install_static::GetBaseAppId](https://source.chromium.org/chromium/chromium/src/+/master:chrome/install_static/install_util.cc?q=install_static::GetBaseAppId). +[install_static::GetBaseAppId](https://source.chromium.org/chromium/chromium/src/+/main:chrome/install_static/install_util.cc?q=install_static::GetBaseAppId). This varies for different Chrome channels (e.g., Canary vs. Stable) and different Chromium-based browsers (e.g., Chrome vs. Chromium). @@ -53,9 +53,9 @@ on user-level installs. Since AUMI's for browser and app windows include the profile_name, each profile's windows will be grouped together on the taskbar. -shell_integration_win.cc has a function [GetExpectedAppId](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/shell_integration_win.cc?q=GetExpectedAppid) +shell_integration_win.cc has a function [GetExpectedAppId](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/shell_integration_win.cc?q=GetExpectedAppid) to determine what the AUMI for a shortcut should be. It also has a function -[MigrateTaskbarPins](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/shell_integration_win.cc?q=MigrateTaskbarPins) +[MigrateTaskbarPins](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/shell_integration_win.cc?q=MigrateTaskbarPins) to migrate pinned taskbar icons if the AUMI's need to change. ## Multi-profile Support diff --git a/docs/windows_virtual_desktop_handling.md b/docs/windows_virtual_desktop_handling.md index 81eec1a114156b..f4dc796b573ad0 100644 --- a/docs/windows_virtual_desktop_handling.md +++ b/docs/windows_virtual_desktop_handling.md @@ -26,14 +26,14 @@ Windows 10 exposes the COM interface [IVirtualDesktopManager](https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-ivirtualdesktopmanager) to access the Virtual Desktop functionality. To make sure that opening a URL stays on the current virtual desktop, -[BrowserView::IsOnCurrentWorkspace](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/frame/browser_view.cc?q=%20BrowserView::IsOnCurrentWorkspace) +[BrowserView::IsOnCurrentWorkspace](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/frame/browser_view.cc?q=%20BrowserView::IsOnCurrentWorkspace) uses the IVirtualDesktopManager method [IsWindowOnCurrentVirtualDesktop](https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ivirtualdesktopmanager-iswindowoncurrentvirtualdesktop). -[BrowserMatches](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/browser_finder.cc?q=BrowserMatches) +[BrowserMatches](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/browser_finder.cc?q=BrowserMatches) in browser_finder.cc only returns a browser window on the current desktop. To restore browser windows to the desktop they were last open on, -[BrowserDesktopWindowTreeHostWin](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc) +[BrowserDesktopWindowTreeHostWin](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc) implements GetWorkspace by using the [GetWindowDesktopId](https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ivirtualdesktopmanager-getwindowdesktopid) method on IVirtualDesktopManager, and restores the workspace using @@ -44,7 +44,7 @@ The actual implementation is a bit more complicated in order to avoid calling COM methods on the UI thread, or destroying COM objects on the UI thread, since doing so can cause nested message loops and re-entrant calls, leading to blocked UI threads and crashes. The -[VirtualDesktopHelper](https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc?q=VirtualDesktopHelper&sq=&ss=chromium%2Fchromium%2Fsrc) +[VirtualDesktopHelper](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/views/frame/browser_desktop_window_tree_host_win.cc?q=VirtualDesktopHelper&sq=&ss=chromium%2Fchromium%2Fsrc) class does the workspace handling for BrowserDesktopWindowTreeHostWin, including doing all the COM operations on a separate COM task runner. The GetWorkspace method is synchronous so VirtualDesktopHelper has to remember and return the @@ -60,9 +60,9 @@ that iterates over windows generally needs to be Virtual Desktop-aware. For example, the following places in code ignore windows not on the current virtual desktop: - * [LocalProcessWindowFinder::GetProcessWindowAtPoint](https://source.chromium.org/chromium/chromium/src/+/master:ui/display/win/local_process_window_finder_win.cc?q=LocalProcessWindowFinder::ShouldStopIterating&ss=chromium%2Fchromium%2Fsrc) + * [LocalProcessWindowFinder::GetProcessWindowAtPoint](https://source.chromium.org/chromium/chromium/src/+/main:ui/display/win/local_process_window_finder_win.cc?q=LocalProcessWindowFinder::ShouldStopIterating&ss=chromium%2Fchromium%2Fsrc) * third_party/webrtc/modules/desktop_capture/win/window_capture_utils.cc - * [Native Window occlusion tracker](https://source.chromium.org/chromium/chromium/src/+/master:ui/aura/native_window_occlusion_tracker_win.cc?q=WindowCanOccludeOtherWindowsOnCurrentVirtualDesktop&ss=chromium%2Fchromium%2Fsrc), + * [Native Window occlusion tracker](https://source.chromium.org/chromium/chromium/src/+/main:ui/aura/native_window_occlusion_tracker_win.cc?q=WindowCanOccludeOtherWindowsOnCurrentVirtualDesktop&ss=chromium%2Fchromium%2Fsrc), when determining if a Chromium window is occluded/covered by other windows. Windows not on the current virtual desktop are considered occluded. diff --git a/docs/working_remotely_with_android.md b/docs/working_remotely_with_android.md index 33fe5e3162ffac..2db3aeaef1fc23 100644 --- a/docs/working_remotely_with_android.md +++ b/docs/working_remotely_with_android.md @@ -60,7 +60,7 @@ Copy /tools/android/adb_remote_setup.sh to your laptop, then run it. adb_remote_setup.sh updates itself, so you only need to copy it once. ```shell -laptop$ curl -sSf "https://chromium.googlesource.com/chromium/src.git/+/master/tools/android/adb_remote_setup.sh?format=TEXT" | base64 --decode > adb_remote_setup.sh +laptop$ curl -sSf "https://chromium.googlesource.com/chromium/src.git/+/main/tools/android/adb_remote_setup.sh?format=TEXT" | base64 --decode > adb_remote_setup.sh laptop$ chmod +x adb_remote_setup.sh laptop$ ./adb_remote_setup.sh ```