Commit c19083a6 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions Cleanup] Remove TODO and unnecessary check

There's a check in ExecuteCodeFunction that extension()::id() is
non-empty, but this is unnecessary. Every extension object necessarily
has a non-empty extension ID, and if that ever changed, many, many
other things would explode long before this check were reached (for
instance, we wouldn't be able to associate the extension with the
function, since it's retrieved by ID).

Bug: None
Change-Id: Id967398b43885e21792c5679fdfd236179157434
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2518118
Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org>
Auto-Submit: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: default avatarIstiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825887}
parent 05fdfeee
...@@ -173,10 +173,7 @@ bool ExecuteCodeFunction::LoadFile(const std::string& file, ...@@ -173,10 +173,7 @@ bool ExecuteCodeFunction::LoadFile(const std::string& file,
} }
script_url_ = extension()->GetResourceURL(file); script_url_ = extension()->GetResourceURL(file);
// TODO(lazyboy): |extension_id| should not be empty(), turn this into a bool might_require_localization = ShouldInsertCSS() || ShouldRemoveCSS();
// DCHECK.
bool might_require_localization =
(ShouldInsertCSS() || ShouldRemoveCSS()) && !extension()->id().empty();
LoadAndLocalizeResource( LoadAndLocalizeResource(
*extension(), resource, might_require_localization, *extension(), resource, might_require_localization,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment