| Code-Review | +1 |
const GURL& ChromeUINewTabURLAsGURL();There are [many other places that parse these URL constants on demand](https://source.chromium.org/search?q=%22GURL(chrome::kChromeUINewTabURL)%22%20%22GURL(chrome::kChromeUINewTabPageURL)%22). Are you planning to update those too?
}Huh, I'm a bit surprised that nobody else has run into this kind of thing so far, so there's no established pattern. And then it's odd that permissions is the first thing to run into a perf issue here; presumably the permissions code doesn't run *that* frequently?
But the pattern seems fine, and I don't see any better place to put it, so lgtm.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
const GURL& ChromeUINewTabURLAsGURL();There are [many other places that parse these URL constants on demand](https://source.chromium.org/search?q=%22GURL(chrome::kChromeUINewTabURL)%22%20%22GURL(chrome::kChromeUINewTabPageURL)%22). Are you planning to update those too?
Thanks! Yes, since I started this, I'll send out multiple small CLs for all those places.
Huh, I'm a bit surprised that nobody else has run into this kind of thing so far, so there's no established pattern. And then it's odd that permissions is the first thing to run into a perf issue here; presumably the permissions code doesn't run *that* frequently?
But the pattern seems fine, and I don't see any better place to put it, so lgtm.
I guess so. Still, I don't think it makes sense to keep parsing these URLs.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[permissions] Avoid continuously reparsing NTP url
This CL creates GURL constants for ChromeUINewTabURL and
ChromeUINewTabPageURL so that they don't need to be parsed again and
again in chrome_permission_client.cc.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Hidehiko Abe to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
R=hide...@chromium.org
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 95e3845..7466bc94 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -930,7 +930,7 @@
}
GURL TestingProfile::GetHomePage() {
- return GURL(chrome::kChromeUINewTabURL);
+ return chrome::ChromeUINewTabURLAsGURL();
}
void TestingProfile::SetCreationTimeForTesting(base::Time creation_time) {
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Marc Treib to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in ['chrome/browser', 'chrome/browser/first_run', 'chrome/browser/history', 'chrome/browser/printing', 'chrome/browser/privacy_sandbox', 'chrome/browser/resource_coordinator', 'chrome/browser/subresource_filter'], avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Christine Ying to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/actor/ui, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
diff --git a/chrome/browser/actor/ui/actor_ui_tab_controller_browsertest.cc b/chrome/browser/actor/ui/actor_ui_tab_controller_browsertest.cc
index e5c99f6c..adf6ec84 100644
--- a/chrome/browser/actor/ui/actor_ui_tab_controller_browsertest.cc
+++ b/chrome/browser/actor/ui/actor_ui_tab_controller_browsertest.cc
@@ -156,7 +156,7 @@
base::PlatformThread::Sleep(actor::ui::kProfileScopedUiUpdateDebounceDelay);
ASSERT_TRUE(AddTabAtIndexToBrowser(browser(), 0,
- GURL(chrome::kChromeUINewTabURL),
+ chrome::ChromeUINewTabURLAsGURL(),
::ui::PAGE_TRANSITION_LINK));
auto* tab_one = browser()->GetTabStripModel()->GetTabAtIndex(0);
base::RunLoop loop;
diff --git a/chrome/browser/actor/ui/task_list_bubble/actor_task_list_bubble_interactive_uitest.cc b/chrome/browser/actor/ui/task_list_bubble/actor_task_list_bubble_interactive_uitest.cc
index 5da927d..b725a7f 100644
--- a/chrome/browser/actor/ui/task_list_bubble/actor_task_list_bubble_interactive_uitest.cc
+++ b/chrome/browser/actor/ui/task_list_bubble/actor_task_list_bubble_interactive_uitest.cc
@@ -86,7 +86,7 @@
// Add and activate the non-actuation tab.
ASSERT_TRUE(AddTabAtIndexToBrowser(browser(), 1,
- GURL(chrome::kChromeUINewTabURL),
+ chrome::ChromeUINewTabURLAsGURL(),
ui::PAGE_TRANSITION_LINK));
auto* tab_two = browser()->GetTabStripModel()->GetTabAtIndex(1);
browser()->GetTabStripModel()->ActivateTabAt(1);
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Toni Barzic to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/apps, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
diff --git a/chrome/browser/apps/app_service/launch_utils.cc b/chrome/browser/apps/app_service/launch_utils.cc
index 80aa52a..85343e5 100644
--- a/chrome/browser/apps/app_service/launch_utils.cc
+++ b/chrome/browser/apps/app_service/launch_utils.cc
@@ -97,7 +97,7 @@
Browser::CreateParams create_params(profile, /*user_gesture=*/false);
Browser* browser = Browser::Create(create_params);
- NavigateParams params(browser, GURL(chrome::kChromeUINewTabURL),
+ NavigateParams params(browser, chrome::ChromeUINewTabURLAsGURL(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
params.tabstrip_add_types = AddTabTypes::ADD_ACTIVE;
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index 874e305d..ce8ffd2 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -2686,7 +2686,7 @@
GURL original_url = guest_main_frame->GetLastCommittedURL();
// Try to navigate <webview> to a chrome: URL directly.
- GURL chrome_url(chrome::kChromeUINewTabURL);
+ GURL chrome_url = chrome::ChromeUINewTabURLAsGURL();
content::TestFrameNavigationObserver observer(guest_main_frame);
guest->GetController().LoadURL(chrome_url, content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL,
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Mike Dougherty to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/breadcrumbs, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
diff --git a/chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.cc b/chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.cc
index 59683b9..30d8d5ba 100644
--- a/chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.cc
+++ b/chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.cc
@@ -17,10 +17,10 @@
namespace {
bool IsNtpUrl(const GURL& url) {
- const std::string origin = url.DeprecatedGetOriginAsURL().spec();
- return origin == chrome::kChromeUINewTabURL ||
- origin == chrome::kChromeUINewTabPageURL ||
- origin == chrome::kChromeUINewTabPageThirdPartyURL;
+ const GURL origin = url.DeprecatedGetOriginAsURL();
+ return origin == chrome::ChromeUINewTabURLAsGURL() ||
+ origin == chrome::ChromeUINewTabPageURLAsGURL() ||
+ origin.spec() == chrome::kChromeUINewTabPageThirdPartyURL;
}
} // namespace
diff --git a/chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper_unittest.cc b/chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper_unittest.cc
index a3ed3be..f9e99c63 100644
--- a/chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper_unittest.cc
+++ b/chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper_unittest.cc
@@ -182,7 +182,7 @@
TEST_F(BreadcrumbManagerTabHelperTest, ChromeNewTabNavigationStart) {
ASSERT_EQ(0u, GetNumEvents());
auto simulator = content::NavigationSimulator::CreateBrowserInitiated(
- GURL(chrome::kChromeUINewTabURL), web_contents());
+ chrome::ChromeUINewTabURLAsGURL(), web_contents());
simulator->Start();
const auto& events = GetEvents();
ASSERT_EQ(1u, events.size());
@@ -353,7 +353,7 @@
TEST_F(BreadcrumbManagerTabHelperTest, NtpPageLoad) {
ASSERT_EQ(0u, GetNumEvents());
content::NavigationSimulator::NavigateAndCommitFromBrowser(
- web_contents(), GURL(chrome::kChromeUINewTabURL));
+ web_contents(), chrome::ChromeUINewTabURLAsGURL());
const auto& events = GetEvents();
ASSERT_EQ(3u, events.size());
EXPECT_NE(std::string::npos,
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Avi Drissman to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in ['chrome/browser/browsing_data', 'chrome/browser/btm', 'chrome/browser/chromeos', 'chrome/browser/content_settings', 'chrome/browser/devtools', 'chrome/browser/password_manager', 'chrome/browser/policy', 'chrome/browser/profiles', 'chrome/browser/renderer_context_menu', 'chrome/browser/supervised_user', 'chrome/browser/win'], avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Sébastien Lalancette to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/enterprise/connectors/interstitials, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
diff --git a/chrome/browser/enterprise/connectors/interstitials/enterprise_block_controller_client.cc b/chrome/browser/enterprise/connectors/interstitials/enterprise_block_controller_client.cc
index 272e4d83..1109158 100644
--- a/chrome/browser/enterprise/connectors/interstitials/enterprise_block_controller_client.cc
+++ b/chrome/browser/enterprise/connectors/interstitials/enterprise_block_controller_client.cc
@@ -36,7 +36,7 @@
Profile::FromBrowserContext(web_contents->GetBrowserContext())
->GetPrefs(),
g_browser_process->GetApplicationLocale(),
- GURL(chrome::kChromeUINewTabURL),
+ chrome::ChromeUINewTabURLAsGURL(),
/*settings_page_helper=*/nullptr),
request_url_(request_url) {}
diff --git a/chrome/browser/enterprise/connectors/interstitials/enterprise_warn_controller_client.cc b/chrome/browser/enterprise/connectors/interstitials/enterprise_warn_controller_client.cc
index 91e84fd..ca28682e 100644
--- a/chrome/browser/enterprise/connectors/interstitials/enterprise_warn_controller_client.cc
+++ b/chrome/browser/enterprise/connectors/interstitials/enterprise_warn_controller_client.cc
@@ -36,7 +36,7 @@
Profile::FromBrowserContext(web_contents->GetBrowserContext())
->GetPrefs(),
g_browser_process->GetApplicationLocale(),
- GURL(chrome::kChromeUINewTabURL),
+ chrome::ChromeUINewTabURLAsGURL(),
/*settings_page_helper=*/nullptr),
request_url_(request_url) {}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Yann Dago to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/enterprise/signin, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Andrea Orru to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/extensions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Finnur Thorarinsson to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/extensions/api, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Dominic Battré to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/extensions/api/web_request, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
diff --git a/chrome/browser/extensions/api/web_request/web_request_apitest.cc b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
index 1e68232..62ccde1 100644
--- a/chrome/browser/extensions/api/web_request/web_request_apitest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
@@ -3159,7 +3159,7 @@
// Navigate to the NTP. The request for "fake_ntp_script.js" should not have
// reached the extension, since it was made by the instant NTP renderer, which
// is semi-privileged.
- ASSERT_TRUE(NavigateToURL(web_contents, GURL(chrome::kChromeUINewTabURL)));
+ ASSERT_TRUE(NavigateToURL(web_contents, chrome::ChromeUINewTabURLAsGURL()));
EXPECT_TRUE(was_ntp_script_loaded(web_contents));
ASSERT_TRUE(search::IsInstantNTP(web_contents));
EXPECT_FALSE(was_script_request_intercepted(extension->id()));
@@ -3296,7 +3296,7 @@
ASSERT_FALSE(GetAndResetOneGoogleBarRequestSeen());
auto* web_contents = GetActiveWebContents();
- ASSERT_TRUE(NavigateToURL(web_contents, GURL(chrome::kChromeUINewTabURL)));
+ ASSERT_TRUE(NavigateToURL(web_contents, chrome::ChromeUINewTabURLAsGURL()));
ASSERT_EQ(ntp_test_utils::GetFinalNtpUrl(profile()),
GetActiveWebContents()->GetLastCommittedURL());
WaitForOneGoogleBarDataUpdate();
diff --git a/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc
index 540881f6..11f34a5 100644
--- a/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_permissions_unittest.cc
@@ -127,7 +127,7 @@
};
url::Origin ntp_origin =
- url::Origin::Create(GURL(chrome::kChromeUINewTabPageURL));
+ url::Origin::Create(chrome::ChromeUINewTabPageURLAsGURL());
// Sub-resource browser initiated requests are hidden from extensions.
WebRequestInfoInitParams info_params_1 = create_request_params(
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Bryant Chandler to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/glic, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Erik Chen to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/glic/host/context, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
diff --git a/chrome/browser/glic/host/context/glic_sharing_utils.cc b/chrome/browser/glic/host/context/glic_sharing_utils.cc
index b564115..e16c78d 100644
--- a/chrome/browser/glic/host/context/glic_sharing_utils.cc
+++ b/chrome/browser/glic/host/context/glic_sharing_utils.cc
@@ -35,7 +35,7 @@
static const base::NoDestructor<std::vector<GURL>> kUrlAllowList{
{GURL(), GURL(url::kAboutBlankURL),
GURL(chrome::kChromeUINewTabPageThirdPartyURL),
- GURL(chrome::kChromeUINewTabPageURL), GURL(chrome::kChromeUINewTabURL),
+ chrome::ChromeUINewTabPageURLAsGURL(), chrome::ChromeUINewTabURLAsGURL(),
#if BUILDFLAG(IS_ANDROID)
GURL(chrome::kChromeUINativeNewTabURL),
#endif
diff --git a/chrome/browser/glic/host/context/glic_sharing_utils_unittest.cc b/chrome/browser/glic/host/context/glic_sharing_utils_unittest.cc
index 3c4e5d67..9e05859 100644
--- a/chrome/browser/glic/host/context/glic_sharing_utils_unittest.cc
+++ b/chrome/browser/glic/host/context/glic_sharing_utils_unittest.cc
@@ -47,7 +47,7 @@
TEST_F(GlicSharingUtilsTest, IsTabValidForSharing_ChromeUINewTab) {
content::WebContents* web_contents =
- CreateWebContents(GURL(chrome::kChromeUINewTabURL));
+ CreateWebContents(chrome::ChromeUINewTabURLAsGURL());
EXPECT_TRUE(IsTabValidForSharing(web_contents));
}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Zekun Jiang to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/glic/suggestions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
diff --git a/chrome/browser/glic/suggestions/contextual_cueing_helper_interactive_uitest.cc b/chrome/browser/glic/suggestions/contextual_cueing_helper_interactive_uitest.cc
index be15afa..48a87ed 100644
--- a/chrome/browser/glic/suggestions/contextual_cueing_helper_interactive_uitest.cc
+++ b/chrome/browser/glic/suggestions/contextual_cueing_helper_interactive_uitest.cc
@@ -264,7 +264,7 @@
SwapToFakeDelegate(nudge_delegate);
ASSERT_TRUE(ui_test_utils::NavigateToURLWithDisposition(
- browser(), GURL(chrome::kChromeUINewTabURL),
+ browser(), chrome::ChromeUINewTabURLAsGURL(),
WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_LOAD_STOP));
EXPECT_FALSE(nudge_delegate.GetIsShowingGlicNudge());
diff --git a/chrome/browser/glic/suggestions/contextual_cueing_service_browsertest.cc b/chrome/browser/glic/suggestions/contextual_cueing_service_browsertest.cc
index e0b4a0f..e35b899 100644
--- a/chrome/browser/glic/suggestions/contextual_cueing_service_browsertest.cc
+++ b/chrome/browser/glic/suggestions/contextual_cueing_service_browsertest.cc
@@ -294,7 +294,7 @@
ASSERT_TRUE(embedded_test_server()->Start());
ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(),
- GURL(chrome::kChromeUINewTabURL)));
+ chrome::ChromeUINewTabURLAsGURL()));
base::test::TestFuture<std::vector<std::string>> future;
auto* web_contents = browser()->tab_strip_model()->GetActiveWebContents();
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Emily Stark to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/lookalikes, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Paul Adedeji to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/new_tab_page, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Takashi Toyoshima to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/page_load_metrics/observers, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Elias Klim to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/permissions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Igor Ruvinov to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/policy/test, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Lingqi Chi to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/preloading, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like thefrog to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/safe_browsing, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Moe Ahmadi to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/search, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Nicolas Dossou-Gbété to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/search_engine_choice, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Darryl James to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/sessions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Samar Chehade to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/signin, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Bug: 503370195nit: please use `b:` for the Google-internal issue tracker ([docs](https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md#cl-footer-reference)).
```suggestion
Bug: b:503370195
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
nit: please use `b:` for the Google-internal issue tracker ([docs](https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md#cl-footer-reference)).
```suggestion
Bug: b:503370195
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
lgtm! Thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/actor/ui, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/extensions/api/web_request, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in ['chrome/browser', 'chrome/browser/first_run', 'chrome/browser/history', 'chrome/browser/printing', 'chrome/browser/privacy_sandbox', 'chrome/browser/resource_coordinator', 'chrome/browser/subresource_filter'], avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/search_engine_choice, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/extensions/api, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/safe_browsing, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ssl, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
NO_IFTTT=Does not apply here
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/sessions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/glic/suggestions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
Thanks!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/new_tab_page, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/policy/test, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/enterprise/connectors/interstitials, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/breadcrumbs, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
thank you!!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/preloading, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/extensions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/glic/host/context, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in ['chrome/browser/browsing_data', 'chrome/browser/btm', 'chrome/browser/chromeos', 'chrome/browser/content_settings', 'chrome/browser/devtools', 'chrome/browser/password_manager', 'chrome/browser/policy', 'chrome/browser/profiles', 'chrome/browser/renderer_context_menu', 'chrome/browser/supervised_user', 'chrome/browser/win'], avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/permissions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Reviewer source(s):
msa...@chromium.org is from context(googleclient/chrome/chromium_gwsq/components/signin/config.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/page_load_metrics/observers, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Thanks!
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/signin, avoidingLong lines should be wrapped to 72 columns, format?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/signin, avoidingLong lines should be wrapped to 72 columns, format?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/search, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/signin,
avoiding parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/lookalikes, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Mahmoud Rashad to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/sync/test/integration, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Mike Wasserman to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Bruno Braga to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/autofill, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like David Pennington to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/bookmarks, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
diff --git a/chrome/browser/ui/bookmarks/bookmark_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_unittest.cc
index d373a9e..ffafcbce 100644
--- a/chrome/browser/ui/bookmarks/bookmark_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_unittest.cc
@@ -49,7 +49,7 @@
bookmarks::AddIfNotBookmarked(bookmark_model, GURL("https://www.test.com"),
std::u16string());
- AddTab(browser(), GURL(chrome::kChromeUINewTabURL));
+ AddTab(browser(), chrome::ChromeUINewTabURLAsGURL());
EXPECT_EQ(BookmarkBar::SHOW,
BookmarkBarController::From(browser())->bookmark_bar_state());
}
@@ -59,7 +59,7 @@
BookmarkModelFactory::GetForBrowserContext(profile());
bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model);
- AddTab(browser(), GURL(chrome::kChromeUINewTabURL));
+ AddTab(browser(), chrome::ChromeUINewTabURLAsGURL());
EXPECT_EQ(BookmarkBar::HIDDEN,
BookmarkBarController::From(browser())->bookmark_bar_state());
}
@@ -77,7 +77,7 @@
// Give it a NTP virtual URL.
content::NavigationController* controller = &web_contents->GetController();
content::NavigationEntry* entry = controller->GetVisibleEntry();
- entry->SetVirtualURL(GURL(chrome::kChromeUINewTabURL));
+ entry->SetVirtualURL(chrome::ChromeUINewTabURLAsGURL());
// Verify that the bookmark bar is hidden.
EXPECT_EQ(BookmarkBar::HIDDEN,
diff --git a/chrome/browser/ui/bookmarks/bookmark_utils.cc b/chrome/browser/ui/bookmarks/bookmark_utils.cc
index 8244288..cc32422 100644
--- a/chrome/browser/ui/bookmarks/bookmark_utils.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_utils.cc
@@ -185,7 +185,7 @@
}
// Use "New tab" as title if the current page is NTP even in incognito mode.
- if (u == GURL(chrome::kChromeUINewTabURL)) {
+ if (u == chrome::ChromeUINewTabURLAsGURL()) {
*title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE);
}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Masa Fujita to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/extensions, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Martin Šrámek to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/hats, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Marlon Facey to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/search, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Chrome Signin Desktop Reviews to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/signin, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Nicolas Ouellet-Payeur to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/startup, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Shakti Sahu to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/tabs/saved_tab_groups, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Dana Fried to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/toolbar, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Antonio Sartori would like Emily Shack to review this change.
Avoid continuously reparsing NTP url
This CL is a refactoring which switches to using the GURL version of
ChromeUINewTabURL and/or ChromeUINewPageURL in chrome/browser/ui/views, avoiding
parsing GURL again and again.
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Reviewer source(s):
ame...@google.com is from context(googleclient/chrome/chromium_gwsq/components/signin/config.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |