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

Unified Diff: extensions/browser/api/guest_view/web_view/web_view_internal_api.cc

Issue 2228743002: Rework some UserScriptLoader logic in preparation to removing UserScript copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott 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/browser/api/guest_view/web_view/web_view_internal_api.cc
diff --git a/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc b/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
index 74493cfc6a53f7ac1b81e3ba0a9c45f84f40ad88..3ecc6d656c087d74c632085efd737e806c6bb621 100644
--- a/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
+++ b/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
@@ -215,7 +215,7 @@ bool ParseContentScripts(
const HostID& host_id,
bool incognito_enabled,
const GURL& owner_base_url,
- std::set<UserScript>* result,
+ extensions::UserScriptList* result,
std::string* error) {
if (content_script_list.empty())
return false;
@@ -239,7 +239,7 @@ bool ParseContentScripts(
script.set_incognito_enabled(incognito_enabled);
script.set_host_id(host_id);
script.set_consumer_instance_type(UserScript::WEBVIEW);
- result->insert(script);
+ result->push_back(script);
}
return true;
}
@@ -500,12 +500,11 @@ WebViewInternalAddContentScriptsFunction::Run() {
GURL owner_base_url(
render_frame_host()->GetSiteInstance()->GetSiteURL().GetWithEmptyPath());
- std::set<UserScript> result;
-
content::WebContents* sender_web_contents = GetSenderWebContents();
HostID host_id = GenerateHostIDFromEmbedder(extension(), sender_web_contents);
bool incognito_enabled = browser_context()->IsOffTheRecord();
+ UserScriptList result;
if (!ParseContentScripts(params->content_script_list, extension(), host_id,
incognito_enabled, owner_base_url, &result, &error_))
return RespondNow(Error(error_));
« no previous file with comments | « chrome/browser/extensions/shared_user_script_master.cc ('k') | extensions/browser/declarative_user_script_master.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698