Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: extensions/renderer/user_script_injector.h

Issue 2213603002: Prevent duplicate content script injection defined in manifest.json (reland) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test added Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/user_script_injector.h
diff --git a/extensions/renderer/user_script_injector.h b/extensions/renderer/user_script_injector.h
index b62995a107a8a6fe543c3b235fa6b35dda104064..af1f202875443e2abf2a3b96da8801d484710a0b 100644
--- a/extensions/renderer/user_script_injector.h
+++ b/extensions/renderer/user_script_injector.h
@@ -42,16 +42,20 @@ class UserScriptInjector : public ScriptInjector,
bool ShouldExecuteInMainWorld() const override;
bool IsUserGesture() const override;
bool ExpectsResults() const override;
- bool ShouldInjectJs(UserScript::RunLocation run_location) const override;
- bool ShouldInjectCss(UserScript::RunLocation run_location) const override;
+ bool ShouldInjectJs(UserScript::RunLocation run_location,
+ std::set<GURL> injected_scripts) const override;
+ bool ShouldInjectCss(UserScript::RunLocation run_location,
+ std::set<GURL> injected_scripts) const override;
PermissionsData::AccessType CanExecuteOnFrame(
const InjectionHost* injection_host,
blink::WebLocalFrame* web_frame,
int tab_id) const override;
std::vector<blink::WebScriptSource> GetJsSources(
- UserScript::RunLocation run_location) const override;
+ UserScript::RunLocation run_location,
+ ScriptsRunInfo* scripts_run_info) const override;
std::vector<std::string> GetCssSources(
- UserScript::RunLocation run_location) const override;
+ UserScript::RunLocation run_location,
+ ScriptsRunInfo* scripts_run_info) const override;
void GetRunInfo(ScriptsRunInfo* scripts_run_info,
UserScript::RunLocation run_location) const override;
void OnInjectionComplete(std::unique_ptr<base::Value> execution_result,

Powered by Google App Engine
This is Rietveld 408576698