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

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

Issue 8585016: Don't use process isolation for bookmark apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 // extension as the host. This has the effect of grouping apps together in 341 // extension as the host. This has the effect of grouping apps together in
342 // a common SiteInstance. 342 // a common SiteInstance.
343 if (!profile || !profile->GetExtensionService()) 343 if (!profile || !profile->GetExtensionService())
344 return url; 344 return url;
345 345
346 const Extension* extension = 346 const Extension* extension =
347 profile->GetExtensionService()->GetExtensionByWebExtent(url); 347 profile->GetExtensionService()->GetExtensionByWebExtent(url);
348 if (!extension) 348 if (!extension)
349 return url; 349 return url;
350 350
351 // Bookmark apps do not use the hosted app process model, and should be
352 // treated as normal URLs.
353 if (extension->from_bookmark())
354 return url;
355
351 // If the URL is part of an extension's web extent, convert it to an 356 // If the URL is part of an extension's web extent, convert it to an
352 // extension URL. 357 // extension URL.
353 return extension->GetResourceURL(url.path()); 358 return extension->GetResourceURL(url.path());
354 } 359 }
355 360
356 bool ChromeContentBrowserClient::ShouldUseProcessPerSite( 361 bool ChromeContentBrowserClient::ShouldUseProcessPerSite(
357 content::BrowserContext* browser_context, const GURL& effective_url) { 362 content::BrowserContext* browser_context, const GURL& effective_url) {
358 // Non-extension URLs should generally use process-per-site-instance. 363 // Non-extension URLs should generally use process-per-site-instance.
359 // Because we expect to use the effective URL, hosted apps URLs should have 364 // Because we expect to use the effective URL, hosted apps URLs should have
360 // an extension scheme by now. 365 // an extension scheme by now.
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 #if defined(USE_NSS) 1118 #if defined(USE_NSS)
1114 crypto::CryptoModuleBlockingPasswordDelegate* 1119 crypto::CryptoModuleBlockingPasswordDelegate*
1115 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1120 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1116 const GURL& url) { 1121 const GURL& url) {
1117 return browser::NewCryptoModuleBlockingDialogDelegate( 1122 return browser::NewCryptoModuleBlockingDialogDelegate(
1118 browser::kCryptoModulePasswordKeygen, url.host()); 1123 browser::kCryptoModulePasswordKeygen, url.host());
1119 } 1124 }
1120 #endif 1125 #endif
1121 1126
1122 } // namespace chrome 1127 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/extension_set.h » ('j') | chrome/renderer/chrome_content_renderer_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698