[cr149] String::Substring renamed to DeprecatedSubstring

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/c6f8d3ab428ec002d18b29ecd18c0c124b667e87

commit c6f8d3ab428ec002d18b29ecd18c0c124b667e87
Author: Kent Tamura <tkent@chromium.org>
Date:   Thu Apr 9 01:44:49 2026 -0700

    WTF: Rename String::Substring() to DeprecatedSubstring()

    * inspector_css_parser_observer.cc:
      A DCHECK assumes `comment_text` is not empty, so `start_offset`
      should not be greater than `parsed_text_.length()`. We can use
      subview().

    Bug: 473854537
    Change-Id: Ia38b03fd58755e9370037c483bce7bfd5482343e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7740859
    Auto-Submit: Kent Tamura <tkent@chromium.org>
    Reviewed-by: Fredrik Söderquist <fs@opera.com>
    Commit-Queue: Fredrik Söderquist <fs@opera.com>
    Cr-Commit-Position: refs/heads/main@{#1612041}
This commit is contained in:
Claudio DeSouza
2026-05-22 16:18:04 -04:00
committed by Max Karolinskiy
parent 794beb15af
commit 89f4eb930e
2 changed files with 3 additions and 3 deletions
@@ -853,7 +853,7 @@ void PageGraph::RegisterPageGraphWebAPICallWithResult(
blink::Vector<String> cookie_structure = value.SplitSkippingEmpty('=');
String cookie_key = *(cookie_structure.begin());
String cookie_value =
value.Substring(cookie_key.length() + 1, value.length());
value.DeprecatedSubstring(cookie_key.length() + 1, value.length());
RegisterStorageWrite(execution_context, cookie_key,
base::Value(cookie_value.Utf8()),
brave_page_graph::StorageLocation::kCookie);
@@ -936,7 +936,7 @@ void PageGraph::RegisterPageGraphJavaScriptUrl(blink::Document* document,
.script_code =
blink::DecodeUrlEscapeSequences(
url.GetString(), blink::DecodeUrlMode::kUtf8OrIsomorphic)
.Substring(kJavascriptSchemeLength),
.DeprecatedSubstring(kJavascriptSchemeLength),
.parent_script_id = GetExecutingScriptId(execution_context),
});
}
@@ -405,7 +405,7 @@ bool BraveSessionCache::AllowFontFamily(
case BraveFarblingLevel::MAXIMUM: {
if (AllowFontByFamilyName(
family_name,
blink::DefaultLanguage().GetString().Substring(0, 2))) {
blink::DefaultLanguage().GetString().DeprecatedSubstring(0, 2))) {
return true;
}
if (IsFontAllowedForFarbling(family_name)) {