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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update cookie logic in test. Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 06290c7fec70c6fc23c8e5797a9c8c6182e69443..f8e70caeb7fd8c34d5df6e98d71ffdd1d491f5e7 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -378,14 +378,22 @@ bool ExtensionService::IsDownloadFromMiniGallery(const GURL& download_url) {
false); // case_sensitive
}
-bool ExtensionService::IsInstalledApp(const GURL& url) {
+const Extension* ExtensionService::GetInstalledApp(const GURL& url) {
// Check for hosted app.
- if (GetExtensionByWebExtent(url) != NULL)
- return true;
+ const Extension* app = GetExtensionByWebExtent(url);
+ if (app != NULL)
Matt Perry 2011/01/26 20:09:23 nit: chrome style is to drop the "!= NULL"
Charlie Reis 2011/03/01 21:33:11 Done.
+ return app;
// Check for packaged app.
- const Extension* extension = GetExtensionByURL(url);
- return extension != NULL && extension->is_app();
+ app = GetExtensionByURL(url);
+ if (app != NULL && app->is_app())
+ return app;
+
+ return NULL;
+}
+
+bool ExtensionService::IsInstalledApp(const GURL& url) {
+ return GetInstalledApp(url) != NULL;
}
// static

Powered by Google App Engine
This is Rietveld 408576698