| 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 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 933 reply->set_reply_error(); | 933 reply->set_reply_error(); |
| 934 Send(reply); | 934 Send(reply); |
| 935 } | 935 } |
| 936 return; | 936 return; |
| 937 } | 937 } |
| 938 listener->OnMessageReceived(msg); | 938 listener->OnMessageReceived(msg); |
| 939 } | 939 } |
| 940 | 940 |
| 941 void BrowserRenderProcessHost::OnChannelConnected(int32 peer_pid) { | 941 void BrowserRenderProcessHost::OnChannelConnected(int32 peer_pid) { |
| 942 #if defined(IPC_MESSAGE_LOG_ENABLED) | 942 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 943 Send(new ViewMsg_SetIPCLoggingEnabled(IPC::Logging::current()->Enabled())); | 943 Send(new ViewMsg_SetIPCLoggingEnabled( |
| 944 IPC::Logging::GetInstance()->Enabled())); |
| 944 #endif | 945 #endif |
| 945 } | 946 } |
| 946 | 947 |
| 947 // Static. This function can be called from any thread. | 948 // Static. This function can be called from any thread. |
| 948 void BrowserRenderProcessHost::BadMessageTerminateProcess( | 949 void BrowserRenderProcessHost::BadMessageTerminateProcess( |
| 949 uint32 msg_type, base::ProcessHandle process) { | 950 uint32 msg_type, base::ProcessHandle process) { |
| 950 LOG(ERROR) << "bad message " << msg_type << " terminating renderer."; | 951 LOG(ERROR) << "bad message " << msg_type << " terminating renderer."; |
| 951 if (run_renderer_in_process()) { | 952 if (run_renderer_in_process()) { |
| 952 // In single process mode it is better if we don't suicide but just crash. | 953 // In single process mode it is better if we don't suicide but just crash. |
| 953 CHECK(false); | 954 CHECK(false); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 IPC::PlatformFileForTransit file; | 1207 IPC::PlatformFileForTransit file; |
| 1207 #if defined(OS_POSIX) | 1208 #if defined(OS_POSIX) |
| 1208 file = base::FileDescriptor(model_file, false); | 1209 file = base::FileDescriptor(model_file, false); |
| 1209 #elif defined(OS_WIN) | 1210 #elif defined(OS_WIN) |
| 1210 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1211 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
| 1211 false, DUPLICATE_SAME_ACCESS); | 1212 false, DUPLICATE_SAME_ACCESS); |
| 1212 #endif | 1213 #endif |
| 1213 Send(new ViewMsg_SetPhishingModel(file)); | 1214 Send(new ViewMsg_SetPhishingModel(file)); |
| 1214 } | 1215 } |
| 1215 } | 1216 } |
| OLD | NEW |