Commit 7afefc29 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

SuperSize: Align mojo canned query between caspian / canned_queries.py

Caspian's caught more, so used that one.

Bug: None
Change-Id: I2c559ceb7ade128111166eea6756531a6e6896b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490358Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819857}
parent 40feb513
...@@ -132,10 +132,7 @@ def _CategorizeGenerated(symbols): ...@@ -132,10 +132,7 @@ def _CategorizeGenerated(symbols):
'/protobuf/' in s.object_path or '/protobuf/' in s.object_path or
s.object_path.endswith('.pbzero.o') or s.object_path.endswith('.pbzero.o') or
s.object_path.endswith('.pb.o')))) s.object_path.endswith('.pb.o'))))
symbols = g.Add('Mojo', symbols.Filter(lambda s: ( symbols = g.Add('Mojo', symbols.WhereSourcePathMatches(r'\bmojom?\b|^mojo::'))
'.mojom' in s.source_path or # Blink uses .mojom-blink.cc
s.source_path.startswith('mojo/') or
s.name.startswith('mojo::'))))
symbols = g.Add('DevTools', symbols.WhereSourcePathMatches( symbols = g.Add('DevTools', symbols.WhereSourcePathMatches(
r'\b(?:protocol|devtools)\b')) r'\b(?:protocol|devtools)\b'))
symbols = g.Add('Blink (bindings)', symbols.WherePathMatches( symbols = g.Add('Blink (bindings)', symbols.WherePathMatches(
......
...@@ -80,8 +80,8 @@ std::string_view GeneratedLens::ParentName(const BaseSymbol& symbol) { ...@@ -80,8 +80,8 @@ std::string_view GeneratedLens::ParentName(const BaseSymbol& symbol) {
return "C++ Protocol Buffers"; return "C++ Protocol Buffers";
} }
static LazyRE2 mojo_regex = {".mojom|^mojo/|^mojo::"}; static LazyRE2 mojo_regex = {"\\bmojom?\\b|^mojo::"};
if (PartialMatch(symbol.ObjectPath(), *mojo_regex)) { if (PartialMatch(symbol.SourcePath(), *mojo_regex)) {
return "Mojo"; return "Mojo";
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment