Convert base::StringPiece to std::string_view [chromium/mini_chromium : main]

0 views
Skip to first unread message

Mark Mentovai (Gerrit)

unread,
Aug 15, 2025, 2:14:37 PMAug 15
to Joshua Peraza, crashp...@chromium.org
Attention needed from Joshua Peraza

Mark Mentovai voted and added 3 comments

Votes added by Mark Mentovai

Code-Review+1

3 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Mark Mentovai . resolved

#include

File base/strings/pattern.h
Line 15, Patchset 4 (Latest):bool MatchPattern(std::string_view string, std::string_view pattern);
Mark Mentovai . unresolved

`#include <string_view>`

File base/strings/strcat.h
Line 53, Patchset 4 (Latest):// constructors which will cause the std::string_view constructors to be de-inlined
Mark Mentovai . unresolved

Reflow this comment.

Open in Gerrit

Related details

Attention is currently required from:
  • Joshua Peraza
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/mini_chromium
Gerrit-Branch: main
Gerrit-Change-Id: I065943ec0a6d763ffe64e97a5c4a698f40848a91
Gerrit-Change-Number: 6851626
Gerrit-PatchSet: 4
Gerrit-Owner: Joshua Peraza <jpe...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Joshua Peraza <jpe...@chromium.org>
Gerrit-Comment-Date: Fri, 15 Aug 2025 18:14:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Joshua Peraza (Gerrit)

unread,
Aug 15, 2025, 2:18:09 PMAug 15
to Mark Mentovai, crashp...@chromium.org

Joshua Peraza added 3 comments

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Joshua Peraza . resolved

Thanks!

File base/strings/pattern.h
Line 15, Patchset 4:bool MatchPattern(std::string_view string, std::string_view pattern);
Mark Mentovai . resolved

`#include <string_view>`

Joshua Peraza

Done

File base/strings/strcat.h
Line 53, Patchset 4:// constructors which will cause the std::string_view constructors to be de-inlined
Mark Mentovai . resolved

Reflow this comment.

Joshua Peraza

Done

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/mini_chromium
Gerrit-Branch: main
Gerrit-Change-Id: I065943ec0a6d763ffe64e97a5c4a698f40848a91
Gerrit-Change-Number: 6851626
Gerrit-PatchSet: 5
Gerrit-Owner: Joshua Peraza <jpe...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Fri, 15 Aug 2025 18:18:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
satisfied_requirement
open
diffy

Joshua Peraza (Gerrit)

unread,
Aug 15, 2025, 2:18:19 PMAug 15
to Mark Mentovai, crashp...@chromium.org

Joshua Peraza submitted the change with unreviewed changes

Unreviewed changes

4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: base/strings/pattern.h
Insertions: 2, Deletions: 0.

@@ -5,6 +5,8 @@
#ifndef BASE_STRINGS_PATTERN_H_
#define BASE_STRINGS_PATTERN_H_

+#include <string_view>
+
namespace base {

// Returns true if the |string| passed in matches the |pattern|. The pattern
```
```
The name of the file: base/strings/strcat.h
Insertions: 3, Deletions: 3.

@@ -50,9 +50,9 @@
//
// As-written Abseil's helper class for numbers generates slightly more code
// than the raw std::string_view version. We can de-inline the helper class'
-// constructors which will cause the std::string_view constructors to be de-inlined
-// for this call and generate slightly less code. This is something we can
-// explore more in the future.
+// constructors which will cause the std::string_view constructors to be
+// de-inlined for this call and generate slightly less code. This is something
+// we can explore more in the future.

[[nodiscard]] std::string StrCat(span<const std::string_view> pieces);

```

Change information

Commit message:
Convert base::StringPiece to std::string_view

Generated with the script in https://g-issues.chromium.org/issues/40506050#comment344
Bug: 40506050
Change-Id: I065943ec0a6d763ffe64e97a5c4a698f40848a91
Reviewed-by: Mark Mentovai <ma...@chromium.org>
Files:
  • M base/metrics/persistent_histogram_allocator.h
  • M base/strings/pattern.cc
  • M base/strings/pattern.h
  • M base/strings/strcat.cc
  • M base/strings/strcat.h
  • M base/strings/string_number_conversions.cc
  • M base/strings/string_number_conversions.h
  • M base/strings/string_piece.h
  • M base/strings/utf_string_conversions.cc
  • M base/strings/utf_string_conversions.h
Change size: M
Delta: 10 files changed, 50 insertions(+), 46 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Mark Mentovai
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/mini_chromium
Gerrit-Branch: main
Gerrit-Change-Id: I065943ec0a6d763ffe64e97a5c4a698f40848a91
Gerrit-Change-Number: 6851626
Gerrit-PatchSet: 6
Gerrit-Owner: Joshua Peraza <jpe...@chromium.org>
Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages