[cr143] Extension::Create taking a u16string arg
This used to be a `std::string`. Chromium changes: https://chromium.googlesource.com/chromium/src/+/79167e224d3cd322af1031bb0124212580e7cde8 commit 79167e224d3cd322af1031bb0124212580e7cde8 Author: Jaewon Jung <jw.jung@navercorp.com> Date: Thu Oct 2 19:04:02 2025 -0700 Use std::u16string for Extension::Create() error parameter The `Extension::Create()` method and its callers used `std::string` for the error output parameter, leading to unnecessary conversions between UTF-8 and UTF-16. This change migrates the error parameter to `std::u16string` across the call stack. This eliminates string conversions, simplifying the code and improving consistency. In a few places where a `std::string` is still required, a temporary conversion is performed. Signed-off-by: Jaewon Jung <jw.jung@navercorp.com> Bug: 41317803 Change-Id: Ia660ca60834f233eca82e8f2b65961cce48230d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6975452 Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> Cr-Commit-Position: refs/heads/main@{#1524554}
This commit is contained in:
@@ -226,7 +226,7 @@ void ExternalWalletsImporter::GetLocalStorage(
|
||||
const extensions::Extension& extension,
|
||||
InitCallback callback) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
std::string error;
|
||||
std::u16string error;
|
||||
extension_ = Extension::Create(
|
||||
extension.path(), ManifestLocation::kExternalPref,
|
||||
*extension.manifest()->value(), extension.creation_flags(), &error);
|
||||
|
||||
@@ -32,7 +32,7 @@ TEST(Mv2WarningTest, ExtensionManifestVersions) {
|
||||
return dict;
|
||||
};
|
||||
|
||||
std::string error;
|
||||
std::u16string error;
|
||||
scoped_refptr<extensions::Extension> extension =
|
||||
extensions::Extension::Create(
|
||||
base::FilePath(), extensions::mojom::ManifestLocation::kUnpacked,
|
||||
|
||||
Reference in New Issue
Block a user