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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 #include "content/browser/renderer_host/render_view_host.h" 10 #include "content/browser/renderer_host/render_view_host.h"
10 11
11 namespace chrome { 12 namespace chrome {
12 13
13 void ChromeContentBrowserClient::OnRenderViewCreation( 14 void ChromeContentBrowserClient::OnRenderViewCreation(
14 RenderViewHost* render_view_host, 15 RenderViewHost* render_view_host,
15 Profile* profile, 16 Profile* profile,
16 const GURL& url) { 17 const GURL& url) {
17 // Tell the RenderViewHost whether it will be used for an extension process. 18 // Tell the RenderViewHost whether it will be used for an extension process.
18 ExtensionService* service = profile->GetExtensionService(); 19 ExtensionService* service = profile->GetExtensionService();
19 if (service) { 20 if (service) {
20 bool is_extension_process = service->ExtensionBindingsAllowed(url); 21 bool is_extension_process = service->ExtensionBindingsAllowed(url);
21 render_view_host->set_is_extension_process(is_extension_process); 22 render_view_host->set_is_extension_process(is_extension_process);
23
24 const Extension* installed_app = service->GetInstalledApp(url);
25 static_cast<BrowserRenderProcessHost*>(render_view_host->process())->
26 set_installed_app(installed_app);
22 } 27 }
23 } 28 }
24 29
25 } // namespace chrome 30 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698