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 54eb509409641bf74f5462b97ac1ab8ad686e33b..8c62a5680be8a191d6343cf44e3f4e25fcf99cf5 100644 |
--- a/chrome/browser/extensions/platform_app_launcher.cc |
+++ b/chrome/browser/extensions/platform_app_launcher.cc |
@@ -162,19 +162,9 @@ class PlatformAppCommandLineLauncher |
// call back to us. |
extensions::LazyBackgroundTaskQueue* queue = |
ExtensionSystem::Get(profile_)->lazy_background_task_queue(); |
- if (queue->ShouldEnqueueTask(profile_, extension_)) { |
- queue->AddPendingTask(profile_, extension_->id(), base::Bind( |
- &PlatformAppCommandLineLauncher::GrantAccessToFileAndLaunch, |
- this, file_path, mime_type)); |
- return; |
- } |
- |
- ExtensionProcessManager* process_manager = |
- ExtensionSystem::Get(profile_)->process_manager(); |
- ExtensionHost* host = |
- process_manager->GetBackgroundHostForExtension(extension_->id()); |
- DCHECK(host); |
- GrantAccessToFileAndLaunch(file_path, mime_type, host); |
+ queue->AddPendingTask(profile_, extension_->id(), base::Bind( |
+ &PlatformAppCommandLineLauncher::GrantAccessToFileAndLaunch, |
+ this, file_path, mime_type)); |
} |
void GrantAccessToFileAndLaunch(const FilePath& file_path, |
@@ -250,19 +240,9 @@ class PlatformAppBlobIntentLauncher |
// call back to us. |
extensions::LazyBackgroundTaskQueue* queue = |
ExtensionSystem::Get(profile_)->lazy_background_task_queue(); |
- if (queue->ShouldEnqueueTask(profile_, extension_)) { |
- queue->AddPendingTask(profile_, extension_->id(), base::Bind( |
- &PlatformAppBlobIntentLauncher::GrantAccessToFileAndLaunch, |
- this)); |
- return; |
- } |
- |
- ExtensionProcessManager* process_manager = |
- ExtensionSystem::Get(profile_)->process_manager(); |
- ExtensionHost* host = |
- process_manager->GetBackgroundHostForExtension(extension_->id()); |
- DCHECK(host); |
- GrantAccessToFileAndLaunch(host); |
+ queue->AddPendingTask(profile_, extension_->id(), base::Bind( |
+ &PlatformAppBlobIntentLauncher::GrantAccessToFileAndLaunch, |
+ this)); |
} |
private: |