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

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

Issue 11117011: Keep browser process alive while there are platform apps with background pages running. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test Created 8 years, 2 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/platform_app_launcher.cc
diff --git a/chrome/browser/extensions/platform_app_launcher.cc b/chrome/browser/extensions/platform_app_launcher.cc
index b1276416e0de85f9c419dc56b17f6cd7c1ee809b..6da068d120d915e70f01b0dc11de058499bc4c8f 100644
--- a/chrome/browser/extensions/platform_app_launcher.cc
+++ b/chrome/browser/extensions/platform_app_launcher.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/extensions/lazy_background_task_queue.h"
+#include "chrome/browser/extensions/platform_app_service.h"
#include "chrome/browser/intents/web_intents_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/extension.h"
@@ -346,6 +347,7 @@ void LaunchPlatformApp(Profile* profile,
const Extension* extension,
const CommandLine* command_line,
const FilePath& current_directory) {
+ PlatformAppService::CreateInstance(profile);
FilePath path;
if (!GetAbsolutePathFromCommandLine(command_line, current_directory, &path)) {
LaunchPlatformAppWithNoData(profile, extension);
@@ -358,6 +360,7 @@ void LaunchPlatformApp(Profile* profile,
void LaunchPlatformAppWithPath(Profile* profile,
const Extension* extension,
const FilePath& file_path) {
+ PlatformAppService::CreateInstance(profile);
// launcher will be freed when nothing has a reference to it. The message
// queue will retain a reference for any outstanding task, so when the
// launcher has finished it will be freed.
@@ -371,6 +374,7 @@ void LaunchPlatformAppWithWebIntent(
const Extension* extension,
content::WebIntentsDispatcher* intents_dispatcher,
content::WebContents* source) {
+ PlatformAppService::CreateInstance(profile);
scoped_refptr<PlatformAppWebIntentLauncher> launcher =
new PlatformAppWebIntentLauncher(
profile, extension, intents_dispatcher, source);

Powered by Google App Engine
This is Rietveld 408576698