[COIL] Change chromium code search type links to use main rather than master for styleguide
See this doc: go/chromium-coil-change for more info
BUG=1210385
Change-Id: I9b7ab9492650ec2d40d825c0a5b7146d3d4f3de6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2902875
Auto-Submit: John Palmer <[email protected]>
Commit-Queue: Kentaro Hara <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Owners-Override: Kentaro Hara <[email protected]>
Cr-Commit-Position: refs/heads/master@{#884419}
diff --git a/styleguide/java/java.md b/styleguide/java/java.md
index 6067a25..67b6b57 100644
--- a/styleguide/java/java.md
+++ b/styleguide/java/java.md
@@ -1,7 +1,7 @@
# Chromium Java style guide
_For other languages, please see the [Chromium style
-guides](https://chromium.googlesource.com/chromium/src/+/master/styleguide/styleguide.md)._
+guides](https://chromium.googlesource.com/chromium/src/+/main/styleguide/styleguide.md)._
Chromium follows the [Android Open Source style
guide](http://source.android.com/source/code-style.html) unless an exception
@@ -10,7 +10,7 @@
You can propose changes to this style guide by sending an email to
`[email protected]`. Ideally, the list will arrive at some consensus and you can
request review for a change to this file. If there's no consensus,
-[`//styleguide/java/OWNERS`](https://chromium.googlesource.com/chromium/src/+/master/styleguide/java/OWNERS)
+[`//styleguide/java/OWNERS`](https://chromium.googlesource.com/chromium/src/+/main/styleguide/java/OWNERS)
get to decide.
[TOC]
@@ -92,7 +92,7 @@
enables them in debug builds (or when `dcheck_always_on=true`) (via a [build
step](https://codereview.chromium.org/2517203002)). You should use asserts in
the [same
-scenarios](https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md#CHECK_DCHECK_and-NOTREACHED)
+scenarios](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#CHECK_DCHECK_and-NOTREACHED)
where C++ DCHECK()s make sense. For multi-statement asserts, use
`org.chromium.base.BuildConfig.DCHECK_IS_ON` to guard your code.
@@ -121,7 +121,7 @@
* causes additional garbage collector jank.
Classes that need destructor logic should provide an explicit `destroy()`
-method. Use [LifetimeAssert](https://chromium.googlesource.com/chromium/src/+/master/base/android/java/src/org/chromium/base/LifetimeAssert.java)
+method. Use [LifetimeAssert](https://chromium.googlesource.com/chromium/src/+/main/base/android/java/src/org/chromium/base/LifetimeAssert.java)
to ensure in debug builds and tests that `destroy()` is called.
### AndroidX Annotations
@@ -145,8 +145,8 @@
For automatically using the correct style, follow the guide to set up your
favorite IDE:
-* [Android Studio](https://chromium.googlesource.com/chromium/src/+/master/docs/android_studio.md)
-* [Eclipse](https://chromium.googlesource.com/chromium/src/+/master/docs/eclipse.md)
+* [Android Studio](https://chromium.googlesource.com/chromium/src/+/main/docs/android_studio.md)
+* [Eclipse](https://chromium.googlesource.com/chromium/src/+/main/docs/eclipse.md)
### Checkstyle
Checkstyle is automatically run by the build bots, and to ensure you do not have
@@ -155,12 +155,12 @@
### Lint
Lint is run as part of the build. For more information, see
-[here](https://chromium.googlesource.com/chromium/src/+/master/build/android/docs/lint.md).
+[here](https://chromium.googlesource.com/chromium/src/+/main/build/android/docs/lint.md).
## Style / Formatting
### File Headers
-* Use the same format as in the [C++ style guide](https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md#File-headers).
+* Use the same format as in the [C++ style guide](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#File-headers).
### TODOs
* TODO should follow chromium convention. Examples:
@@ -216,21 +216,21 @@
## Test-only Code
Functions used only for testing should be restricted to test-only usages
-with the testing suffixes supported [PRESUMBIT.py](https://chromium.googlesource.com/chromium/src/+/master/PRESUBMIT.py).
+with the testing suffixes supported [PRESUMBIT.py](https://chromium.googlesource.com/chromium/src/+/main/PRESUBMIT.py).
`ForTesting` is the conventional suffix although similar patterns, such as
`ForTest`, are also accepted. These suffixes are checked at presubmit time
to ensure the functions are called only by test files.
## Location
"Top level directories" are defined as directories with a GN file, such as
-[//base](https://chromium.googlesource.com/chromium/src/+/master/base/)
+[//base](https://chromium.googlesource.com/chromium/src/+/main/base/)
and
-[//content](https://chromium.googlesource.com/chromium/src/+/master/content/),
+[//content](https://chromium.googlesource.com/chromium/src/+/main/content/),
Chromium Java should live in a directory named
`<top level directory>/android/java`, with a package name
`org.chromium.<top level directory>`. Each top level directory's Java should
build into a distinct JAR that honors the abstraction specified in a native
-[checkdeps](https://chromium.googlesource.com/chromium/buildtools/+/master/checkdeps/checkdeps.py)
+[checkdeps](https://chromium.googlesource.com/chromium/buildtools/+/main/checkdeps/checkdeps.py)
(e.g. `org.chromium.base` does not import `org.chromium.content`). The full
path of any java file should contain the complete package name.
@@ -243,7 +243,7 @@
New `<top level directory>/android` directories should have an `OWNERS` file
much like
-[//base/android/OWNERS](https://chromium.googlesource.com/chromium/src/+/master/base/android/OWNERS).
+[//base/android/OWNERS](https://chromium.googlesource.com/chromium/src/+/main/base/android/OWNERS).
## Miscellany
* Use UTF-8 file encodings and LF line endings.