diff options
author | creis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-07 01:40:40 +0000 |
---|---|---|
committer | creis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-07 01:40:40 +0000 |
commit | 311e4cc1f29a90bb5d9e36f7364d2e4fd1113fb7 (patch) | |
tree | 4e2ce7a7e975856c17ae50771f45977fbcc3ad3b /chrome/browser/profiles | |
parent | f0dd202ffdb5779229f52c6cfda50853778d7287 (diff) | |
download | chromium_src-311e4cc1f29a90bb5d9e36f7364d2e4fd1113fb7.zip chromium_src-311e4cc1f29a90bb5d9e36f7364d2e4fd1113fb7.tar.gz chromium_src-311e4cc1f29a90bb5d9e36f7364d2e4fd1113fb7.tar.bz2 |
Require experimental permission for isolated apps.
BUG=84740
TEST=IsolatedAppApiTest.CookieIsolation
TEST=ExtensionManifestTest.IsolatedApps
Review URL: http://codereview.chromium.org/7058029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles')
-rw-r--r-- | chrome/browser/profiles/profile.cc | 11 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_impl.cc | 11 |
2 files changed, 10 insertions, 12 deletions
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc index f507e55..0871cf9 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc @@ -446,12 +446,11 @@ class OffTheRecordProfileImpl : public Profile, virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( int renderer_child_id) { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableExperimentalAppManifests)) { - const Extension* installed_app = GetExtensionService()-> - GetInstalledAppForRenderer(renderer_child_id); - if (installed_app != NULL && installed_app->is_storage_isolated()) - return GetRequestContextForIsolatedApp(installed_app->id()); + const Extension* installed_app = GetExtensionService()-> + GetInstalledAppForRenderer(renderer_child_id); + if (installed_app != NULL && installed_app->is_storage_isolated() && + installed_app->HasApiPermission(Extension::kExperimentalPermission)) { + return GetRequestContextForIsolatedApp(installed_app->id()); } return GetRequestContext(); diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 3733ecb..2d45b33 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -875,12 +875,11 @@ net::URLRequestContextGetter* ProfileImpl::GetRequestContext() { net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( int renderer_child_id) { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableExperimentalAppManifests)) { - const Extension* installed_app = extension_service_-> - GetInstalledAppForRenderer(renderer_child_id); - if (installed_app != NULL && installed_app->is_storage_isolated()) - return GetRequestContextForIsolatedApp(installed_app->id()); + const Extension* installed_app = extension_service_-> + GetInstalledAppForRenderer(renderer_child_id); + if (installed_app != NULL && installed_app->is_storage_isolated() && + installed_app->HasApiPermission(Extension::kExperimentalPermission)) { + return GetRequestContextForIsolatedApp(installed_app->id()); } return GetRequestContext(); |