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:
parent
3db691804b
commit
d7c6fb8250
3 changed files with 4 additions and 4 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue