summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch')
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch22
1 files changed, 11 insertions, 11 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch
index 3f273e5..6bb52b8 100644
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch
+++ b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-for-custom-ntp.patch
@@ -1,6 +1,6 @@
1--- a/chrome/browser/chrome_content_browser_client.cc 1--- chrome/browser/chrome_content_browser_client.cc.orig
2+++ b/chrome/browser/chrome_content_browser_client.cc 2+++ chrome/browser/chrome_content_browser_client.cc
3@@ -771,6 +771,9 @@ bool HandleNewTabPageLocationOverride( 3@@ -743,6 +743,9 @@ bool HandleNewTabPageLocationOverride(
4 Profile* profile = Profile::FromBrowserContext(browser_context); 4 Profile* profile = Profile::FromBrowserContext(browser_context);
5 std::string ntp_location = 5 std::string ntp_location =
6 profile->GetPrefs()->GetString(prefs::kNewTabPageLocationOverride); 6 profile->GetPrefs()->GetString(prefs::kNewTabPageLocationOverride);
@@ -10,9 +10,9 @@
10 if (ntp_location.empty()) 10 if (ntp_location.empty())
11 return false; 11 return false;
12 url::Component scheme; 12 url::Component scheme;
13--- a/chrome/browser/ungoogled_flag_entries.h 13--- chrome/browser/ungoogled_flag_entries.h.orig
14+++ b/chrome/browser/ungoogled_flag_entries.h 14+++ chrome/browser/ungoogled_flag_entries.h
15@@ -80,4 +80,8 @@ 15@@ -84,4 +84,8 @@
16 "Close Confirmation", 16 "Close Confirmation",
17 "Show a warning prompt when closing the browser window. ungoogled-chromium flag", 17 "Show a warning prompt when closing the browser window. ungoogled-chromium flag",
18 kOsDesktop, MULTI_VALUE_TYPE(kCloseConfirmation)}, 18 kOsDesktop, MULTI_VALUE_TYPE(kCloseConfirmation)},
@@ -21,17 +21,17 @@
21+ "Allows setting a custom URL for the new tab page. Value can be internal (e.g. `about:blank`), external (e.g. `example.com`), or local (e.g. `file:///tmp/startpage.html`). This applies for incognito windows as well when not set to a `chrome://` internal page. ungoogled-chromium flag", 21+ "Allows setting a custom URL for the new tab page. Value can be internal (e.g. `about:blank`), external (e.g. `example.com`), or local (e.g. `file:///tmp/startpage.html`). This applies for incognito windows as well when not set to a `chrome://` internal page. ungoogled-chromium flag",
22+ kOsDesktop, ORIGIN_LIST_VALUE_TYPE("custom-ntp", "")}, 22+ kOsDesktop, ORIGIN_LIST_VALUE_TYPE("custom-ntp", "")},
23 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 23 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
24--- a/components/flags_ui/flags_state.cc 24--- components/flags_ui/flags_state.cc.orig
25+++ b/components/flags_ui/flags_state.cc 25+++ components/flags_ui/flags_state.cc
26@@ -207,6 +207,7 @@ std::string GetCombinedOriginListValue(c 26@@ -231,6 +231,7 @@ std::string GetCombinedOriginListValue(c
27 command_line.GetSwitchValueASCII(command_line_switch); 27 command_line_switch);
28 const std::string new_value = 28 const std::string new_value =
29 flags_storage.GetOriginListFlag(internal_entry_name); 29 flags_storage.GetOriginListFlag(internal_entry_name);
30+ if (command_line_switch == "custom-ntp") return existing_value.empty() ? new_value : existing_value; 30+ if (command_line_switch == "custom-ntp") return existing_value.empty() ? new_value : existing_value;
31 return CombineAndSanitizeOriginLists(existing_value, new_value); 31 return CombineAndSanitizeOriginLists(existing_value, new_value);
32 } 32 }
33 33
34@@ -395,6 +396,7 @@ void FlagsState::SetOriginListFlag(const 34@@ -417,6 +418,7 @@ void FlagsState::SetOriginListFlag(const
35 const std::string& value, 35 const std::string& value,
36 FlagsStorage* flags_storage) { 36 FlagsStorage* flags_storage) {
37 const std::string new_value = 37 const std::string new_value =