OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 | 960 |
961 return channel_->Send(msg); | 961 return channel_->Send(msg); |
962 } | 962 } |
963 | 963 |
964 bool BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { | 964 bool BrowserRenderProcessHost::OnMessageReceived(const IPC::Message& msg) { |
965 // If we're about to be deleted, we can no longer trust that our profile is | 965 // If we're about to be deleted, we can no longer trust that our profile is |
966 // valid, so we ignore incoming messages. | 966 // valid, so we ignore incoming messages. |
967 if (deleting_soon_) | 967 if (deleting_soon_) |
968 return false; | 968 return false; |
969 | 969 |
970 #if defined(OS_CHROMEOS) | |
971 // To troubleshoot crosbug.com/7327. | |
972 CHECK(this); | |
973 CHECK(&msg); | |
974 #endif | |
975 | |
976 mark_child_process_activity_time(); | 970 mark_child_process_activity_time(); |
977 if (msg.routing_id() == MSG_ROUTING_CONTROL) { | 971 if (msg.routing_id() == MSG_ROUTING_CONTROL) { |
978 // Dispatch control messages. | 972 // Dispatch control messages. |
979 bool msg_is_ok = true; | 973 bool msg_is_ok = true; |
980 IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok) | 974 IPC_BEGIN_MESSAGE_MAP_EX(BrowserRenderProcessHost, msg, msg_is_ok) |
981 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdatedCacheStats, | 975 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdatedCacheStats, |
982 OnUpdatedCacheStats) | 976 OnUpdatedCacheStats) |
983 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, | 977 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, |
984 SuddenTerminationChanged); | 978 SuddenTerminationChanged); |
985 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionAddListener, | 979 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionAddListener, |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 IPC::PlatformFileForTransit file; | 1282 IPC::PlatformFileForTransit file; |
1289 #if defined(OS_POSIX) | 1283 #if defined(OS_POSIX) |
1290 file = base::FileDescriptor(model_file, false); | 1284 file = base::FileDescriptor(model_file, false); |
1291 #elif defined(OS_WIN) | 1285 #elif defined(OS_WIN) |
1292 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1286 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
1293 false, DUPLICATE_SAME_ACCESS); | 1287 false, DUPLICATE_SAME_ACCESS); |
1294 #endif | 1288 #endif |
1295 Send(new ViewMsg_SetPhishingModel(file)); | 1289 Send(new ViewMsg_SetPhishingModel(file)); |
1296 } | 1290 } |
1297 } | 1291 } |
OLD | NEW |