[go: nahoru, domu]

[CodeHealth] Change |frames| to base::Value::List in StatusData

Bug: 1187001
Change-Id: I6b71cc64bf27696be799d1c7b260579d86a515d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4560005
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Andrew Rayskiy <greengrape@google.com>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Auto-Submit: Andrew Rayskiy <greengrape@google.com>
Cr-Commit-Position: refs/heads/main@{#1149076}
diff --git a/base/values.h b/base/values.h
index 5d62e8c..5deca9b 100644
--- a/base/values.h
+++ b/base/values.h
@@ -653,6 +653,14 @@
     // the size. Assume all existing iterators will be invalidated.
     void reserve(size_t capacity);
 
+    // Resizes the list.
+    // If `new_size` is greater than current size, the extra elements in the
+    // back will be destroyed.
+    // If `new_size` is less than current size, new default-initialized elements
+    // will be added to the back.
+    // Assume all existing iterators will be invalidated.
+    void resize(size_t new_size);
+
     // Returns a reference to the value at `index` in this list. Fails with a
     // `CHECK()` if `index >= size()`.
     const Value& operator[](size_t index) const;