Reference "main" branches instead of "master" branches.

Both WebRTC and Chromium have migrated from the "master" to the "main" branch.

TBR=hta@webrtc.org

Bug: None
Change-Id: I2b5e6973bdd8fdc9c1bd96e2747a8a9ac2630b14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226080
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34475}
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 7b48e69..f6b7d0f 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -61,8 +61,8 @@
 ## Acknowledgements
 
 This Code of Conduct is based on Contributor Covenant, version 1.4,
-available [here](http://contributor-covenant.org/version/1/4) and [Chromium](https://chromium.googlesource.com/chromium/src/+/master/CODE_OF_CONDUCT.md)
+available [here](http://contributor-covenant.org/version/1/4) and [Chromium](https://chromium.googlesource.com/chromium/src/+/main/CODE_OF_CONDUCT.md)
 
 ## License
 
-This Code of Conduct is available for reuse under the Creative Commons Zero (CC0) license.
\ No newline at end of file
+This Code of Conduct is available for reuse under the Creative Commons Zero (CC0) license.
diff --git a/README.md b/README.md
index 0b290fd..37694d9 100644
--- a/README.md
+++ b/README.md
@@ -28,4 +28,4 @@
  * [Code of conduct](CODE_OF_CONDUCT.md)
  * [Reporting bugs](docs/bug-reporting.md)
 
-[native-dev]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/index.md
+[native-dev]: https://webrtc.googlesource.com/src/+/main/docs/native-code/index.md
diff --git a/docs/bug-reporting.md b/docs/bug-reporting.md
index 4e5cbda..c21186a 100644
--- a/docs/bug-reporting.md
+++ b/docs/bug-reporting.md
@@ -166,5 +166,5 @@
 [ChromeBugList]: https://bugs.chromium.org/p/chromium/issues/list?can=1&q=Type%3DBug-Security+component%3ABlink%3EWebRTC+-status%3ADuplicate%2CWontfix&sort=-closed&colspec=ID+Pri+M+Component+Status+Owner+Summary+OS+Closed&x=m&y=releaseblock&cells=ids
 [WebRtcBugList]: https://bugs.chromium.org/p/webrtc/issues/list?q=Type%3DBug-Security&can=1
 [ChromeSecurity]: https://www.chromium.org/Home/chromium-security
-[SeverityGuidelines]: https://chromium.googlesource.com/chromium/src/+/master/docs/security/severity-guidelines.md
-[SecurityFaq]: https://chromium.googlesource.com/chromium/src/+/master/docs/security/faq.md
+[SeverityGuidelines]: https://chromium.googlesource.com/chromium/src/+/main/docs/security/severity-guidelines.md
+[SecurityFaq]: https://chromium.googlesource.com/chromium/src/+/main/docs/security/faq.md
diff --git a/docs/faq.md b/docs/faq.md
index 700fd15..7511c8c 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -114,7 +114,7 @@
 
 We have put sample applications [here][examples-link].
 
-[examples-link]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/index.md#example-applications
+[examples-link]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/index.md#example-applications
 
 
 ### Are WebRTC components subject to change?
@@ -133,7 +133,7 @@
 Please see [Getting Started][getting-started-link] and
 [Contributing bug fixes][contributing-link] for more information.
 
-[getting-started-link]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/index.md
+[getting-started-link]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/index.md
 [contributing-link]: https://webrtc.org/support/contributing
 
 
@@ -191,7 +191,7 @@
 for video and iSAC and iLBC for audio).  For more information, see the [License
 page][license-link].
 
-[license-link]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/license/index.md
+[license-link]: https://webrtc.googlesource.com/src/+/main/LICENSE
 
 
 ### What does this license let me do?
diff --git a/docs/native-code/android/index.md b/docs/native-code/android/index.md
index 8207821..e378cf9 100644
--- a/docs/native-code/android/index.md
+++ b/docs/native-code/android/index.md
@@ -150,9 +150,9 @@
 preferably generate the projects files into a directory like `out/Release`).
 Then use the scripts generated in `out/Release/bin` instead.
 
-[webrtc-prerequisite-sw]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/prerequisite-sw/index.md
-[webrtc-jni-doc]: https://webrtc.googlesource.com/src/+/master/sdk/android/README
-[apprtc-doc]: https://webrtc.googlesource.com/src/+/master/examples/androidapp/README
+[webrtc-prerequisite-sw]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/prerequisite-sw/index.md
+[webrtc-jni-doc]: https://webrtc.googlesource.com/src/+/main/sdk/android/README
+[apprtc-doc]: https://webrtc.googlesource.com/src/+/main/examples/androidapp/README
 [ninja]: https://ninja-build.org/
 [prebuilt-libraries]: https://bintray.com/google/webrtc/google-webrtc
-[webrtc-development]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/index.md
+[webrtc-development]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/index.md
diff --git a/docs/native-code/development/index.md b/docs/native-code/development/index.md
index b19a15c..3b3940d 100644
--- a/docs/native-code/development/index.md
+++ b/docs/native-code/development/index.md
@@ -9,7 +9,7 @@
 
 First, be sure to install the [prerequisite software][webrtc-prerequisite-sw].
 
-[webrtc-prerequisite-sw]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/prerequisite-sw/index.md
+[webrtc-prerequisite-sw]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/prerequisite-sw/index.md
 
 
 ## Getting the Code
@@ -44,7 +44,7 @@
 
 ```
 $ cd src
-$ git checkout master
+$ git checkout main
 $ git new-branch your-branch-name
 ```
 
@@ -58,11 +58,11 @@
 Update your current branch with:
 
 ```
-$ git checkout master
-$ git pull origin master
+$ git checkout main
+$ git pull origin main
 $ gclient sync
 $ git checkout my-branch
-$ git merge master
+$ git merge main
 ```
 
 ## Building
@@ -168,7 +168,7 @@
 $ cd ~/dev/webrtc/src
 $ gclient sync
 $ # When done, go back to depot_tools, git reset --hard, run gclient again and
-$ # verify the current branch becomes REMOTE:origin/master
+$ # verify the current branch becomes REMOTE:origin/main
 ```
 
 The above is untested and unsupported, but it might help.
@@ -273,8 +273,8 @@
 [ninja-build-rules]: https://gn.googlesource.com/gn/+/master/docs/reference.md#the-all-and-default-rules
 [gn]: https://gn.googlesource.com/gn/+/master/README.md
 [gn-doc]: https://gn.googlesource.com/gn/+/master/docs/reference.md#IDE-options
-[webrtc-android-development]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/android/index.md
-[webrtc-ios-development]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/ios/index.md
+[webrtc-android-development]: https://webrtc.googlesource.com/src/+/main/docs/native-code/android/index.md
+[webrtc-ios-development]: https://webrtc.googlesource.com/src/+/main/docs/native-code/ios/index.md
 [chromium-work-branches]: https://www.chromium.org/developers/how-tos/get-the-code/working-with-branches
 [chromium-work-release-branches]: https://www.chromium.org/developers/how-tos/get-the-code/working-with-release-branches
 [webrtc-contributing]: https://webrtc.org/support/contributing/
@@ -283,4 +283,4 @@
 [rfc-5766]: https://tools.ietf.org/html/rfc5766
 [m80-log]: https://webrtc.googlesource.com/src/+log/branch-heads/3987
 [m80]: https://webrtc.googlesource.com/src/+/branch-heads/3987
-[fuzzers]: https://chromium.googlesource.com/external/webrtc/+/refs/heads/master/test/fuzzers/
+[fuzzers]: https://webrtc.googlesource.com/src/+/main/test/fuzzers/
diff --git a/docs/native-code/development/prerequisite-sw/index.md b/docs/native-code/development/prerequisite-sw/index.md
index 7f49f267..e4d5d20 100644
--- a/docs/native-code/development/prerequisite-sw/index.md
+++ b/docs/native-code/development/prerequisite-sw/index.md
@@ -54,7 +54,7 @@
 [depot-tools]: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
 [git]: http://git-scm.com
 [install-build-deps]: https://cs.chromium.org/chromium/src/build/install-build-deps.sh
-[chromium-linux-build-instructions]: https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md
-[chromium-win-build-instructions]: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
-[chromium-linux-prerequisites]: https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md#notes
-[chromium-android-build-build-instructions]: https://chromium.googlesource.com/chromium/src/+/master/docs/android_build_instructions.md
+[chromium-linux-build-instructions]: https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md
+[chromium-win-build-instructions]: https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md
+[chromium-linux-prerequisites]: https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md#notes
+[chromium-android-build-build-instructions]: https://chromium.googlesource.com/chromium/src/+/main/docs/android_build_instructions.md
diff --git a/docs/native-code/index.md b/docs/native-code/index.md
index f91bbb7..928af6e 100644
--- a/docs/native-code/index.md
+++ b/docs/native-code/index.md
@@ -20,7 +20,7 @@
 before downloading the source code.
 
 [webrtc-license]: https://webrtc.org/support/license
-[webrtc-faq]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/faq.md
+[webrtc-faq]: https://webrtc.googlesource.com/src/+/main/docs/faq.md
 
 The WebRTC [issue tracker][webrtc-issue-tracker] can be used for submitting
 bugs found in native code.
@@ -35,8 +35,8 @@
 * [iOS][webrtc-ios-development]
 * [Experimental RTP header extensions][rtp-hdrext]
 
-[webrtc-prerequitite-sw]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/prerequisite-sw/index.md
-[webrtc-development]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/index.md
-[webtc-android-development]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/android/index.md
-[webrtc-ios-development]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/ios/index.md
-[rtp-hdrext]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/rtp-hdrext/index.md
+[webrtc-prerequitite-sw]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/prerequisite-sw/index.md
+[webrtc-development]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/index.md
+[webtc-android-development]: https://webrtc.googlesource.com/src/+/main/docs/native-code/android/index.md
+[webrtc-ios-development]: https://webrtc.googlesource.com/src/+/main/docs/native-code/ios/index.md
+[rtp-hdrext]: https://webrtc.googlesource.com/src/+/main/docs/native-code/rtp-hdrext/index.md
diff --git a/docs/native-code/ios/index.md b/docs/native-code/ios/index.md
index e2f6c3d..d046927 100644
--- a/docs/native-code/ios/index.md
+++ b/docs/native-code/ios/index.md
@@ -185,9 +185,9 @@
 
 
 [cocoapods]: https://cocoapods.org/pods/GoogleWebRTC
-[webrtc-prerequisite-sw]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/prerequisite-sw/index.md
-[webrtc-development]: https://webrtc.googlesource.com/src/+/refs/heads/master/docs/native-code/development/index.md
-[framework-script]: https://chromium.googlesource.com/external/webrtc/+/master/tools_webrtc/ios/build_ios_libs.py
+[webrtc-prerequisite-sw]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/prerequisite-sw/index.md
+[webrtc-development]: https://webrtc.googlesource.com/src/+/main/docs/native-code/development/index.md
+[framework-script]: https://webrtc.googlesource.com/src/+/main/tools_webrtc/ios/build_ios_libs.py
 [ninja]: https://ninja-build.org/
 [gn]: https://gn.googlesource.com/gn/+/master/README.md
 [ios-deploy]: https://github.com/phonegap/ios-deploy
diff --git a/g3doc/how_to_write_documentation.md b/g3doc/how_to_write_documentation.md
index 6fbca11..a29d686 100644
--- a/g3doc/how_to_write_documentation.md
+++ b/g3doc/how_to_write_documentation.md
@@ -67,6 +67,5 @@
 
 Documentation of specific classes and function APIs and their usage, including
 their purpose, is embedded in the .h files defining that API. See
-[C++ style guide](https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md)
+[C++ style guide](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md)
 for pointers on how to write API documentatin in .h files.
-
diff --git a/g3doc/style-guide.md b/g3doc/style-guide.md
index f3b0e88..e6195d7 100644
--- a/g3doc/style-guide.md
+++ b/g3doc/style-guide.md
@@ -20,7 +20,7 @@
 style guide trumps the Google style guide, and the rules in this file trump them
 both.
 
-[chr-style]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md
+[chr-style]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md
 [goog-style]: https://google.github.io/styleguide/cppguide.html
 
 ### C++ version
@@ -197,13 +197,13 @@
 WebRTC follows the
 [Chromium Objective-C and Objective-C++ style guide][chr-objc-style].
 
-[chr-objc-style]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/objective-c/objective-c.md
+[chr-objc-style]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/objective-c/objective-c.md
 
 ## Python
 
 WebRTC follows [Chromium's Python style][chr-py-style].
 
-[chr-py-style]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/python/python.md
+[chr-py-style]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/python/python.md
 
 ## Build files
 
diff --git a/modules/audio_device/g3doc/audio_device_module.md b/modules/audio_device/g3doc/audio_device_module.md
index 3aa1a59..fb88b69 100644
--- a/modules/audio_device/g3doc/audio_device_module.md
+++ b/modules/audio_device/g3doc/audio_device_module.md
@@ -53,7 +53,7 @@
 for [Android][28].
 
 Desktop version are not updated to comply with the latest
-[C++ style guide](https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md)
+[C++ style guide](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md)
 and more work is also needed to improve the performance and stability of these
 versions.
 
diff --git a/native-api.md b/native-api.md
index a9893c3..53e6b1c 100644
--- a/native-api.md
+++ b/native-api.md
@@ -91,7 +91,7 @@
 argument `rtc_exclude_field_trial_default` to true and GN will define the
 macro for you.
 
-[field_trial_h]: https://webrtc.googlesource.com/src/+/master/system_wrappers/include/field_trial.h
+[field_trial_h]: https://webrtc.googlesource.com/src/+/main/system_wrappers/include/field_trial.h
 
 ## `WEBRTC_EXCLUDE_METRICS_DEFAULT`
 If you want to provide your own implementation of `webrtc::metrics` functions
@@ -103,7 +103,7 @@
 argument `rtc_exclude_metrics_default` to true and GN will define the
 macro for you.
 
-[metrics_h]: https://webrtc.googlesource.com/src/+/master/system_wrappers/include/metrics.h
+[metrics_h]: https://webrtc.googlesource.com/src/+/main/system_wrappers/include/metrics.h
 
 ## `WEBRTC_EXCLUDE_TRANSIENT_SUPPRESSOR`
 The transient suppressor functionality in the audio processing module is not
diff --git a/webrtc.gni b/webrtc.gni
index c0ff14f..a338d72 100644
--- a/webrtc.gni
+++ b/webrtc.gni
@@ -23,7 +23,7 @@
         "WebRTC static library, so there is no difference between " +
         "`is_component_build=true` and `is_component_build=false`.")
   print(
-      "More info about component builds at: " + "https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md")
+      "More info about component builds at: " + "https://chromium.googlesource.com/chromium/src/+/main/docs/component_build.md")
   assert(!is_component_build, "Component builds are not supported in WebRTC.")
 }