Index: chrome/browser/chromeos/first_run/drive_first_run_controller.cc |
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc |
index b69a68859675b7daa28a7ffcdd0944ccd015f911..2c77717b4cbfe87df9fbcd5f68b2886282387f8f 100644 |
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc |
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc |
@@ -163,6 +163,7 @@ class DriveWebContentsManager : public content::WebContentsObserver, |
// content::WebContentsDelegate overrides: |
bool ShouldCreateWebContents( |
content::WebContents* web_contents, |
+ content::RenderFrameHost* opener, |
content::SiteInstance* source_site_instance, |
int32_t route_id, |
int32_t main_frame_route_id, |
@@ -276,6 +277,7 @@ void DriveWebContentsManager::DidFailLoad( |
bool DriveWebContentsManager::ShouldCreateWebContents( |
content::WebContents* web_contents, |
+ content::RenderFrameHost* opener, |
content::SiteInstance* source_site_instance, |
int32_t route_id, |
int32_t main_frame_route_id, |
@@ -306,11 +308,14 @@ bool DriveWebContentsManager::ShouldCreateWebContents( |
base::UTF8ToUTF16(app_id_))) { |
return false; |
} |
- // We are creating a new SiteInstance (and thus a new renderer process) here, |
- // so we must not use |route_id|, etc, which are IDs in a different process. |
+ // drive_first_run/app/manifest.json sets allow_js_access to false and |
+ // therefore we are creating a new SiteInstance (and thus a new renderer |
+ // process) here, so we must use MSG_ROUTING_NONE and we cannot pass the |
+ // opener (similarily to how allow_js_access:false is handled in |
+ // Browser::MaybeCreateBackgroundContents). |
BackgroundContents* contents = |
background_contents_service->CreateBackgroundContents( |
- content::SiteInstance::Create(profile_), MSG_ROUTING_NONE, |
+ content::SiteInstance::Create(profile_), nullptr, MSG_ROUTING_NONE, |
MSG_ROUTING_NONE, MSG_ROUTING_NONE, profile_, frame_name, |
base::ASCIIToUTF16(app_id_), partition_id, session_storage_namespace); |