summaryrefslogtreecommitdiff
path: root/chromium/styleguide
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-28 15:28:34 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-28 13:54:51 +0000
commit2a19c63448c84c1805fb1a585c3651318bb86ca7 (patch)
treeeb17888e8531aa6ee5e85721bd553b832a7e5156 /chromium/styleguide
parentb014812705fc80bff0a5c120dfcef88f349816dc (diff)
downloadqtwebengine-chromium-2a19c63448c84c1805fb1a585c3651318bb86ca7.tar.gz
BASELINE: Update Chromium to 69.0.3497.70
Change-Id: I2b7b56e4e7a8b26656930def0d4575dc32b900a0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/styleguide')
-rw-r--r--chromium/styleguide/c++/blink-c++.md9
-rw-r--r--chromium/styleguide/c++/c++11.html8
-rw-r--r--chromium/styleguide/web/web.md12
3 files changed, 17 insertions, 12 deletions
diff --git a/chromium/styleguide/c++/blink-c++.md b/chromium/styleguide/c++/blink-c++.md
index 25653fe07c0..4d7f765641e 100644
--- a/chromium/styleguide/c++/blink-c++.md
+++ b/chromium/styleguide/c++/blink-c++.md
@@ -47,13 +47,10 @@ FrameLoader::FrameLoader(LocalFrame* frame)
}
```
-## Prefer WTF types over STL types
+## Prefer WTF types over STL and base types
-Outside of `//third_party/blink/common`, Blink should use WTF types. STL string
-and container types should only be used at the boundary to interoperate with
-'//base', `//third_party/blink/common`, and other Chromium-side code.
-Similarly, Blink should prefer `KURL` over `GURL` and `SecurityOrigin` over
-`url::Origin`.
+See [Blink readme](../../third_party/blink/renderer/README.md#Type-dependencies)
+for more details on Blink directories and their type usage.
**Good:**
```c++
diff --git a/chromium/styleguide/c++/c++11.html b/chromium/styleguide/c++/c++11.html
index e7757275e6e..9bc95a48a0e 100644
--- a/chromium/styleguide/c++/c++11.html
+++ b/chromium/styleguide/c++/c++11.html
@@ -704,6 +704,14 @@ template &lt;typename T&gt;<br/>void Function(T&amp;&amp; t) { ... }</code></td>
<td></td>
</tr>
+<tr>
+<td>Reverse Iterator Adaptor</td>
+<td><code>std::make_reverse_iterator()</code></td>
+<td>For a given iterator, deduces the type of a corresponding reverse iterator and constructs it.</td>
+<td><a href="http://en.cppreference.com/w/cpp/iterator/make_reverse_iterator">std::make_reverse_iterator</a></td>
+<td>Useful to reduce boilerplate when constructing reverse iterators. The alternative is using <code>std::reverse_iterator<T>(i)</code> where <code>T</code> is the, usually long, type of the iterator <code>i</code>. <a href="https://groups.google.com/a/chromium.org/forum/#!topic/cxx/qOE1XA0b6Dk">Discussion thread</a></td>
+</tr>
+
</tbody>
</table>
diff --git a/chromium/styleguide/web/web.md b/chromium/styleguide/web/web.md
index e657ab39406..981caa26f8d 100644
--- a/chromium/styleguide/web/web.md
+++ b/chromium/styleguide/web/web.md
@@ -331,11 +331,11 @@ Guide](https://google.github.io/styleguide/jsguide.html).
compiler](https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md)
to identify JS type errors and enforce correct JSDoc annotations.
-* Add a `compiled_resources2.gyp` file to any new web UI code directory.
+* Add a `BUILD.gn` file to any new web UI code directory.
-* Ensure that your `compiled_resources2.gyp` file is included in
- `third_party/closure_compiler/compiled_resources2.gyp` (or somewhere in its
- include hierarchy) so that your code is typechecked in an automated way.
+* Ensure that your `BUILD.gn` file is included in
+ `src/BUILD.gn:webui_closure_compile` (or somewhere in its
+ deps hierarchy) so that your code is typechecked in an automated way.
* Type Polymer elements by appending 'Element' to the element name, e.g.
`/** @type {IronIconElement} */`
@@ -381,8 +381,8 @@ Also see the [Google Polymer Style Guide](http://go/polymer-style).
* `created`, `ready`, `attached`, `detached`
* public methods
* event handlers, computed functions, and private methods
-
-* Use camelCase for element IDs to simplify local DOM accessors (i.e.
+
+* Use camelCase for element IDs to simplify local DOM accessors (i.e.
`this.$.camelCase` instead of `this.$[‘dash-case’]`).
* Use `this.foo` instead of `newFoo` arguments in observers when possible.