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

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

Issue 10804020: Introduce runtime.onSuspendCanceled() event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos call Created 8 years, 5 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_message_service.cc
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index d9f547740f78cec3fe2a58643b9dd7100dd4cce0..e4c978109508bf39c38ebfa364200347d5fe311a 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -432,21 +432,19 @@ bool ExtensionMessageService::MaybeAddPendingOpenChannelTask(
const std::string& extension_id = params.target_extension_id;
const extensions::Extension* extension = service->extensions()->GetByID(
extension_id);
- if (extension && extension->has_lazy_background_page()) {
+ if (extension) {
// If the extension uses spanning incognito mode, make sure we're always
// using the original profile since that is what the extension process
// will use.
if (!extension->incognito_split_mode())
profile = profile->GetOriginalProfile();
- if (lazy_background_task_queue_->ShouldEnqueueTask(profile, extension)) {
- lazy_background_task_queue_->AddPendingTask(profile, extension_id,
- base::Bind(&ExtensionMessageService::PendingOpenChannel,
- base::Unretained(this), params, params.source->GetID()));
- pending_channels_[GET_CHANNEL_ID(params.receiver_port_id)] =
- PendingChannel(profile, extension_id);
- return true;
- }
+ lazy_background_task_queue_->AddPendingTask(profile, extension_id,
+ base::Bind(&ExtensionMessageService::PendingOpenChannel,
+ base::Unretained(this), params, params.source->GetID()));
+ pending_channels_[GET_CHANNEL_ID(params.receiver_port_id)] =
+ PendingChannel(profile, extension_id);
+ return true;
}
return false;

Powered by Google App Engine
This is Rietveld 408576698