mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: follow upstream's suggestions on when to use EmptyGURL() (#45498)
- Prefer GURL() when we want to return a non-reference empty URL. - In ServiceWorkerMain::GetStorageKey(), use a reference instead of instantiating a new temporary GURL. From url/gurl.h: > // Returns a reference to a singleton empty GURL. This object is for > // callers who return references but don't have anything to return in > // some cases. If you just want an empty URL for normal use, prefer > // GURL().
This commit is contained in:
@@ -214,7 +214,7 @@ GURL ElectronManagementAPIDelegate::GetEffectiveUpdateURL(
|
||||
const extensions::Extension& extension,
|
||||
content::BrowserContext* context) const {
|
||||
// TODO(codebytere): we do not currently support ExtensionManagement.
|
||||
return GURL::EmptyGURL();
|
||||
return {};
|
||||
}
|
||||
|
||||
void ElectronManagementAPIDelegate::ShowMv2DeprecationReEnableDialog(
|
||||
|
||||
Reference in New Issue
Block a user