| Index: extensions/renderer/user_script_set.cc
|
| diff --git a/extensions/renderer/user_script_set.cc b/extensions/renderer/user_script_set.cc
|
| index 9c6ca59731efde8774e714a6c9e40261d8347ba8..058f79aa78f2ec0ee5eff5b3bcea97233eca9b47 100644
|
| --- a/extensions/renderer/user_script_set.cc
|
| +++ b/extensions/renderer/user_script_set.cc
|
| @@ -58,7 +58,7 @@ void UserScriptSet::RemoveObserver(Observer* observer) {
|
|
|
| void UserScriptSet::GetActiveExtensionIds(
|
| std::set<std::string>* ids) const {
|
| - for (const std::unique_ptr<UserScript>& script : scripts_) {
|
| + for (const std::unique_ptr<RendererUserScript>& script : scripts_) {
|
| if (script->host_id().type() != HostID::EXTENSIONS)
|
| continue;
|
| DCHECK(!script->extension_id().empty());
|
| @@ -73,7 +73,7 @@ void UserScriptSet::GetInjections(
|
| UserScript::RunLocation run_location,
|
| bool log_activity) {
|
| GURL document_url = GetDocumentUrlForFrame(render_frame->GetWebFrame());
|
| - for (const std::unique_ptr<UserScript>& script : scripts_) {
|
| + for (const std::unique_ptr<RendererUserScript>& script : scripts_) {
|
| std::unique_ptr<ScriptInjection> injection = GetInjectionForScript(
|
| script.get(), render_frame, tab_id, run_location, document_url,
|
| false /* is_declarative */, log_activity);
|
| @@ -115,7 +115,7 @@ bool UserScriptSet::UpdateUserScripts(base::SharedMemoryHandle shared_memory,
|
| scripts_.clear();
|
| scripts_.reserve(num_scripts);
|
| for (uint32_t i = 0; i < num_scripts; ++i) {
|
| - std::unique_ptr<UserScript> script(new UserScript());
|
| + std::unique_ptr<RendererUserScript> script(new RendererUserScript());
|
| script->Unpickle(pickle, &iter);
|
|
|
| // Note that this is a pointer into shared memory. We don't own it. It gets
|
| @@ -125,14 +125,14 @@ bool UserScriptSet::UpdateUserScripts(base::SharedMemoryHandle shared_memory,
|
| const char* body = NULL;
|
| int body_length = 0;
|
| CHECK(iter.ReadData(&body, &body_length));
|
| - script->js_scripts()[j].set_external_content(
|
| + script->js_scripts()[j]->set_external_content(
|
| base::StringPiece(body, body_length));
|
| }
|
| for (size_t j = 0; j < script->css_scripts().size(); ++j) {
|
| const char* body = NULL;
|
| int body_length = 0;
|
| CHECK(iter.ReadData(&body, &body_length));
|
| - script->css_scripts()[j].set_external_content(
|
| + script->css_scripts()[j]->set_external_content(
|
| base::StringPiece(body, body_length));
|
| }
|
|
|
| @@ -162,7 +162,7 @@ std::unique_ptr<ScriptInjection> UserScriptSet::GetDeclarativeScriptInjection(
|
| UserScript::RunLocation run_location,
|
| const GURL& document_url,
|
| bool log_activity) {
|
| - for (const std::unique_ptr<UserScript>& script : scripts_) {
|
| + for (const std::unique_ptr<RendererUserScript>& script : scripts_) {
|
| if (script->id() == script_id) {
|
| return GetInjectionForScript(script.get(), render_frame, tab_id,
|
| run_location, document_url,
|
| @@ -173,7 +173,7 @@ std::unique_ptr<ScriptInjection> UserScriptSet::GetDeclarativeScriptInjection(
|
| }
|
|
|
| std::unique_ptr<ScriptInjection> UserScriptSet::GetInjectionForScript(
|
| - const UserScript* script,
|
| + const RendererUserScript* script,
|
| content::RenderFrame* render_frame,
|
| int tab_id,
|
| UserScript::RunLocation run_location,
|
|
|