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

Unified Diff: chrome_frame/sync_msg_reply_dispatcher.cc

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 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
« no previous file with comments | « chrome_frame/sync_msg_reply_dispatcher.h ('k') | chrome_frame/task_marshaller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/sync_msg_reply_dispatcher.cc
diff --git a/chrome_frame/sync_msg_reply_dispatcher.cc b/chrome_frame/sync_msg_reply_dispatcher.cc
deleted file mode 100644
index e2f197472d401707d3a1eefb9cc5ff9e0e39da6d..0000000000000000000000000000000000000000
--- a/chrome_frame/sync_msg_reply_dispatcher.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome_frame/sync_msg_reply_dispatcher.h"
-
-#include "ipc/ipc_sync_message.h"
-
-void SyncMessageReplyDispatcher::Push(IPC::SyncMessage* msg,
- SyncMessageCallContext* context,
- void* key) {
- if (context) {
- context->message_type_ = msg->type();
- context->id_ = IPC::SyncMessage::GetMessageId(*msg);
- context->key_ = key;
-
- base::AutoLock lock(message_queue_lock_);
- message_queue_.push_back(context);
- }
-}
-
-bool SyncMessageReplyDispatcher::HandleMessageType(
- const IPC::Message& msg, SyncMessageCallContext* context) {
- return false;
-}
-
-bool SyncMessageReplyDispatcher::OnMessageReceived(const IPC::Message& msg) {
- SyncMessageCallContext* context = GetContext(msg);
- // No context e.g. no return values and/or don't care
- if (!context) {
- return false;
- }
-
- return HandleMessageType(msg, context);
-}
-
-void SyncMessageReplyDispatcher::Cancel(void* key) {
- DCHECK(key != NULL);
- base::AutoLock lock(message_queue_lock_);
- PendingSyncMessageQueue::iterator it = message_queue_.begin();
- while (it != message_queue_.end()) {
- SyncMessageCallContext* context = *it;
- if (context->key_ == key) {
- it = message_queue_.erase(it);
- delete context;
- } else {
- ++it;
- }
- }
-}
-
-SyncMessageReplyDispatcher::SyncMessageCallContext*
- SyncMessageReplyDispatcher::GetContext(const IPC::Message& msg) {
- if (!msg.is_reply())
- return NULL;
-
- int id = IPC::SyncMessage::GetMessageId(msg);
- base::AutoLock lock(message_queue_lock_);
- PendingSyncMessageQueue::iterator it;
- for (it = message_queue_.begin(); it != message_queue_.end(); ++it) {
- SyncMessageCallContext* context = *it;
- if (context->id_ == id) {
- message_queue_.erase(it);
- return context;
- }
- }
- return NULL;
-}
« no previous file with comments | « chrome_frame/sync_msg_reply_dispatcher.h ('k') | chrome_frame/task_marshaller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698