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

Side by Side Diff: chrome/browser/extensions/extension_message_service.cc

Issue 10082019: Have LazyBackgroundTaskQueue notify consumers when the transient page fails to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yoyo Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/extension_message_service.h" 5 #include "chrome/browser/extensions/extension_message_service.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 } 436 }
437 437
438 return false; 438 return false;
439 } 439 }
440 440
441 void ExtensionMessageService::PendingOpenChannel( 441 void ExtensionMessageService::PendingOpenChannel(
442 const OpenChannelParams& params_in, 442 const OpenChannelParams& params_in,
443 int source_process_id, 443 int source_process_id,
444 ExtensionHost* host) { 444 ExtensionHost* host) {
445 if (!host)
446 return; // TODO(mpcomplete): notify source of disconnect?
447
445 // Re-lookup the source process since it may no longer be valid. 448 // Re-lookup the source process since it may no longer be valid.
446 OpenChannelParams params = params_in; 449 OpenChannelParams params = params_in;
447 params.source = content::RenderProcessHost::FromID(source_process_id); 450 params.source = content::RenderProcessHost::FromID(source_process_id);
448 if (!params.source) 451 if (!params.source)
449 return; 452 return;
450 453
451 params.receiver = MessagePort(host->render_process_host(), 454 params.receiver = MessagePort(host->render_process_host(),
452 MSG_ROUTING_CONTROL); 455 MSG_ROUTING_CONTROL);
453 OpenChannelImpl(params); 456 OpenChannelImpl(params);
454 } 457 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_message_service.h ('k') | chrome/browser/extensions/lazy_background_task_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698