forked from uazo/cromite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFix-crash-on-customize-profile-ui.patch
44 lines (42 loc) · 2.67 KB
/
Fix-crash-on-customize-profile-ui.patch
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
35
36
37
38
39
40
41
42
43
44
From: uazo <[email protected]>
Date: Thu, 7 Sep 2023 06:15:28 +0000
Subject: Fix crash on customize profile ui
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
---
.../theme_color_picker/theme_color_picker_handler.cc | 4 ++--
.../webui/customize_themes/chrome_customize_themes_handler.cc | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.cc b/chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.cc
--- a/chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.cc
+++ b/chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.cc
@@ -48,7 +48,7 @@ theme_color_picker::mojom::ChromeColorPtr CreateChromeColor(
chrome_colors::ColorInfo color_info) {
auto theme_colors = GetAutogeneratedThemeColors(color_info.color);
auto color = theme_color_picker::mojom::ChromeColor::New();
- color->name = l10n_util::GetStringUTF8(color_info.label_id);
+ //color->name = l10n_util::GetStringUTF8(color_info.label_id);
color->seed = color_info.color;
color->background = theme_colors.active_tab_color;
color->foreground = theme_colors.frame_color;
@@ -63,7 +63,7 @@ theme_color_picker::mojom::ChromeColorPtr CreateDynamicChromeColor(
auto color = theme_color_picker::mojom::ChromeColor::New();
auto color_palette = ui::GeneratePalette(
color_info.color, GetSchemeVariant(color_info.variant));
- color->name = l10n_util::GetStringUTF8(color_info.label_id);
+ //color->name = l10n_util::GetStringUTF8(color_info.label_id);
color->seed = color_info.color;
color->background = is_dark_mode ? color_palette->primary().get(80)
: color_palette->primary().get(40);
diff --git a/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc b/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc
--- a/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc
+++ b/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc
@@ -79,7 +79,7 @@ void ChromeCustomizeThemesHandler::GetChromeThemes(
auto theme_colors = GetAutogeneratedThemeColors(color_info.color);
auto theme = customize_themes::mojom::ChromeTheme::New();
theme->id = color_info.id;
- theme->label = l10n_util::GetStringUTF8(color_info.label_id);
+ //theme->label = l10n_util::GetStringUTF8(color_info.label_id);
auto colors = customize_themes::mojom::ThemeColors::New();
colors->frame = theme_colors.frame_color;
colors->active_tab = theme_colors.active_tab_color;
--