summarylogtreecommitdiffstats
path: root/clean-up-a-call-to-set_utf8.patch
blob: 01384c039417549d885f55dc5ebfe8543a56e463 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From ede390a0b18e4565abf8ac1e1ff717e1d43fc320 Mon Sep 17 00:00:00 2001
From: Paul Wankadia <junyer@chromium.org>
Date: Tue, 14 Apr 2020 16:54:51 +0000
Subject: [PATCH] Clean up a call to set_utf8().

This is part of an effort to rewrite calls to utf8() and set_utf8()
(in RE2::Options) as calls to encoding() and set_encoding(),
respectively. utf8() and set_utf8() have been marked as the "legacy"
interface since 2008, so it is long past time that we get rid of them.

R=parastoog@google.com

Change-Id: I62c48cd575a55b519d5264ed857f927c163068b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2145261
Reviewed-by: Parastoo Geranmayeh <parastoog@google.com>
Commit-Queue: Paul Wankadia <junyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758886}
---
 components/autofill/core/browser/address_rewriter.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/autofill/core/browser/address_rewriter.cc b/components/autofill/core/browser/address_rewriter.cc
index 1b85a50974c..030a5aba146 100644
--- a/components/autofill/core/browser/address_rewriter.cc
+++ b/components/autofill/core/browser/address_rewriter.cc
@@ -57,7 +57,7 @@ void CompileRulesFromData(const std::string& data_string,
                           CompiledRuleVector* compiled_rules) {
   base::StringPiece data = data_string;
   re2::RE2::Options options;
-  options.set_utf8(true);
+  options.set_encoding(RE2::Options::EncodingUTF8);
   options.set_word_boundary(true);
 
   size_t token_end = 0;