Skip to content

Commit

Permalink
Update codesearch links
Browse files Browse the repository at this point in the history
code.google.com redirects no longer work. This CL replaces links in /docs
to source.chromium.org equivalent.
This CL was uploaded by git cl split.

Change-Id: I8014645395846f3e57117b7faaae9dd8c0ef6e3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2392761
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Cr-Commit-Position: refs/heads/master@{#805483}
  • Loading branch information
sokcevicG authored and Commit Bot committed Sep 9, 2020
1 parent b74cfe8 commit ba14441
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/clang_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ the now-formatted code.
Many developers find it useful to integrate the clang-format tool with their
editor of choice. As a convenience, the scripts for this are also available in
your checkout of Chrome under
[src/buildtools/clang_format/script/](https://code.google.com/p/chromium/codesearch#chromium/src/buildtools/clang_format/script/).
[src/buildtools/clang_format/script/](https://source.chromium.org/chromium/chromium/src/+/HEAD:buildtools/clang_format/script/).

If you use an editor integration, you should try to make sure that you're using
the version of clang-format that comes with your checkout. That way, you'll
Expand Down
2 changes: 1 addition & 1 deletion docs/gpu/gpu_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ overview of this documentation and links back to various portions.
[isolated-testing-infra]: https://www.chromium.org/developers/testing/isolated-testing/infrastructure
[chromium.gpu]: https://ci.chromium.org/p/chromium/g/chromium.gpu/console
[chromium.gpu.fyi]: https://ci.chromium.org/p/chromium/g/chromium.gpu.fyi/console
[tools/build workspace]: https://code.google.com/p/chromium/codesearch#chromium/build/scripts/slave/recipe_modules/chromium_tests/chromium_gpu_fyi.py
[tools/build workspace]: https://source.chromium.org/chromium/chromium/tools/build/+/HEAD:recipes/recipe_modules/chromium_tests/builders/chromium_gpu_fyi.py
[bots-presentation]: https://docs.google.com/presentation/d/1BC6T7pndSqPFnituR7ceG7fMY7WaGqYHhx5i9ECa8EI/edit?usp=sharing

## Fleet Status
Expand Down
10 changes: 5 additions & 5 deletions docs/optional.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

## History

[base::Optional<T>](https://code.google.com/p/chromium/codesearch#chromium/src/base/optional.h)
is an implementation of [std::optional<T>](http://en.cppreference.com/w/cpp/utility/optional),
[base::Optional<T>](https://source.chromium.org/chromium/chromium/src/+/HEAD:base/optional.h)
is an implementation of [std::optional<T>](https://en.cppreference.com/w/cpp/utility/optional),
initially a C++ experimental feature and now part of the C++17 standard. The
Chromium's implementation is as close as possible to the specification. The
differences are listed at the beginning of the header. The most important
Expand All @@ -17,8 +17,8 @@ instead of `std::`. Also, following Chromium coding style, the class is named

## API description

For a deep API description, please have a look at [std::optional<T>](http://en.cppreference.com/w/cpp/utility/optional)
or the [Chromium implementation](https://code.google.com/p/chromium/codesearch#chromium/src/base/optional.h).
For a deep API description, please have a look at [std::optional<T>](https://en.cppreference.com/w/cpp/utility/optional)
or the [Chromium implementation](https://source.chromium.org/chromium/chromium/src/+/HEAD:base/optional.h).

When initialized without a value, `base::Optional<T>` will be empty. When empty,
the `operator bool` will return `false` and `value()` should not be called. An
Expand Down Expand Up @@ -110,7 +110,7 @@ It is recommended to not use `base::Optional<T>` as a function parameter as it
will force the callers to use `base::Optional<T>`. Instead, it is recommended to
keep using `T*` for arguments that can be omitted, with `nullptr` representing
no value. A helper, `base::OptionalOrNullptr`, is available in
[stl_util.h](https://code.google.com/p/chromium/codesearch#chromium/src/base/stl_util.h)
[stl_util.h](https://source.chromium.org/chromium/chromium/src/+/HEAD:base/stl_util.h)
and can make it easier to convert `base::Optional<T>` to `T*`.

Furthermore, depending on `T`, MSVC might fail to compile code using
Expand Down
12 changes: 6 additions & 6 deletions docs/tab_helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ itself. Let's break that down.
## `WebContentsObserver`

`WebContentsObserver` is a
[simple interface](https://code.google.com/p/chromium/codesearch#chromium/src/content/public/browser/web_contents_observer.h&q=webcontentsobserver)
[simple interface](https://source.chromium.org/chromium/chromium/src/+/HEAD:content/public/browser/web_contents_observer.)
that allows an object to observe events in the life of a `WebContents`. As an
example, if we look at the `TabStripModel`, there are times when it need to
watch out for WebContents being deleted. So it creates a
[TabStripModel::WebContentsData](https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/tabs/tab_strip_model.cc&q=TabStripModel::WebContentsData).
[TabStripModel::WebContentsData](https://source.chromium.org/chromium/chromium/src/+/HEA:chrome/browser/ui/tabs/tab_strip_model.cc).
That object overrides `WebContentsDestroyed()`, and when a
`WebContents` gets destroyed, the callback is called and the object
processes the message. Note that `TabStripModel::WebContentsData` object is not owned by the
Expand All @@ -27,7 +27,7 @@ processes the message. Note that `TabStripModel::WebContentsData` object is not
## `SupportsUserData` and `WebContentsUserData`

There is a mechanism used in Chromium called
[`SupportsUserData`](https://code.google.com/p/chromium/codesearch#chromium/src/base/supports_user_data.h&q=SupportsUserData)
[`SupportsUserData`](https://source.chromium.org/chromium/chromium/src/+/HEAD:base/supports_user_data.h)
that allows attaching of arbitrary objects to an object. The mechanism is
simple: host objects derive from `SupportsUserData`, and owned objects derive
from `SupportsUserData::Data`. There are three calls to attach and detach the
Expand All @@ -36,7 +36,7 @@ data.
`WebContents` derives from `SupportsUserData`, so that mechanism works for
attaching objects to a `WebContents`, but the `SupportsUserData` mechanism is a
bit low-level. A higher level abstraction is
[`WebContentsUserData`](https://code.google.com/p/chromium/codesearch#chromium/src/content/public/browser/web_contents_user_data.h&q=WebContentsUserData),
[`WebContentsUserData`](https://source.chromium.org/chromium/chromium/src/+/HEAD:content/public/browser/web_contents_user_data.h),
which is easy to derive from and has easy-to-use functionality in
`CreateForWebContents()` and `FromWebContents()`.

Expand Down Expand Up @@ -75,7 +75,7 @@ helper to the `WebContents`es that are used for the browser tabs?
## AttachTabHelpers

There is a function called
[`AttachTabHelpers()`](https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/tab_helpers.cc&q=AttachTabHelpers).
[`AttachTabHelpers()`](https://source.chromium.org/chromium/chromium/src/+/HEAD:chrome/browser/ui/tab_helpers.cc;).
Whenever a `WebContents` is created for use as a browser tab,
`AttachTabHelpers()` is called. Every tab helper from around Chromium,
from ContentSettings to Favicons to History to Prefs, all take this opportunity
Expand All @@ -92,7 +92,7 @@ that are in browser tabs, and all of those code paths are already written.
Sometimes it's useful to re-use tab helpers for `WebContents`es that aren't
browser tabs. For example, the Chrome Apps code wants to be able to print, and
wants to use the printing code that browser tabs use. So in
[`ChromeAppDelegate::InitWebContents()`](https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/apps/chrome_app_delegate.cc&q=ChromeAppDelegate::InitWebContents)
[`ChromeAppDelegate::InitWebContents()`](https://source.chromium.org/chromium/chromium/src/+/HEAD:chrome/browser/ui/apps/chrome_app_delegate.cc)
we see that whenever the Apps code creates a new `WebContents`, it attaches a
carefully-chosen subset of tab helpers, including two printing ones.

Expand Down

0 comments on commit ba14441

Please sign in to comment.