diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-14 15:03:37 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-14 15:03:37 +0000 |
commit | dd6730410af6c38e99e54274b60528fc844ad6b1 (patch) | |
tree | b28c2ad5385500d9e47cf7872fc8ee19638b4376 /chrome/browser/background | |
parent | 183be4e9d92afb48a7c4b1f32e70c95c58af83b8 (diff) | |
download | chromium_src-dd6730410af6c38e99e54274b60528fc844ad6b1.zip chromium_src-dd6730410af6c38e99e54274b60528fc844ad6b1.tar.gz chromium_src-dd6730410af6c38e99e54274b60528fc844ad6b1.tar.bz2 |
When creating a background contents, also adopt the session storage namespace.
We already told the RenderView to use this, so we need to adopt it on
the browser side as well.
BUG=269449
R=atwilson@chromium.org,marja@chromium.org,joi@chromium.org
Review URL: https://chromiumcodereview.appspot.com/22854010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217553 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background')
-rw-r--r-- | chrome/browser/background/background_contents_service.cc | 13 | ||||
-rw-r--r-- | chrome/browser/background/background_contents_service.h | 17 |
2 files changed, 21 insertions, 9 deletions
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc index e9889f7..a617be9 100644 --- a/chrome/browser/background/background_contents_service.cc +++ b/chrome/browser/background/background_contents_service.cc @@ -188,7 +188,7 @@ void ShowBalloon(const Extension* extension, Profile* profile) { #endif } -} +} // namespace // Keys for the information we store about individual BackgroundContents in // prefs. There is one top-level DictionaryValue (stored at @@ -554,7 +554,9 @@ void BackgroundContentsService::LoadBackgroundContents( MSG_ROUTING_NONE, profile, frame_name, - application_id); + application_id, + std::string(), + NULL); // TODO(atwilson): Create RenderViews asynchronously to avoid increasing // startup latency (http://crbug.com/47236). @@ -567,8 +569,11 @@ BackgroundContents* BackgroundContentsService::CreateBackgroundContents( int routing_id, Profile* profile, const string16& frame_name, - const string16& application_id) { - BackgroundContents* contents = new BackgroundContents(site, routing_id, this); + const string16& application_id, + const std::string& partition_id, + content::SessionStorageNamespace* session_storage_namespace) { + BackgroundContents* contents = new BackgroundContents( + site, routing_id, this, partition_id, session_storage_namespace); // Register the BackgroundContents internally, then send out a notification // to external listeners. diff --git a/chrome/browser/background/background_contents_service.h b/chrome/browser/background/background_contents_service.h index 50057cf..0d99a92 100644 --- a/chrome/browser/background/background_contents_service.h +++ b/chrome/browser/background/background_contents_service.h @@ -27,6 +27,10 @@ namespace base { class DictionaryValue; } +namespace content { +class SessionStorageNamespace; +} + namespace gfx { class Rect; } @@ -79,11 +83,14 @@ class BackgroundContentsService : private content::NotificationObserver, // A BACKGROUND_CONTENTS_OPENED notification will be generated with the passed // |frame_name| and |application_id| values, using the passed |profile| as the // Source.. - BackgroundContents* CreateBackgroundContents(content::SiteInstance* site, - int route_id, - Profile* profile, - const string16& frame_name, - const string16& application_id); + BackgroundContents* CreateBackgroundContents( + content::SiteInstance* site, + int route_id, + Profile* profile, + const string16& frame_name, + const string16& application_id, + const std::string& partition_id, + content::SessionStorageNamespace* session_storage_namespace); // Load the manifest-specified background page for the specified hosted app. // If the manifest doesn't specify one, then load the BackgroundContents |