| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 if (!has_receiver_) | 204 if (!has_receiver_) |
| 205 return; | 205 return; |
| 206 | 206 |
| 207 if (reset_needed_) { | 207 if (reset_needed_) { |
| 208 sender->Send(new ViewMsg_VisitedLink_Reset()); | 208 sender->Send(new ViewMsg_VisitedLink_Reset()); |
| 209 reset_needed_ = false; | 209 reset_needed_ = false; |
| 210 return; | 210 return; |
| 211 } | 211 } |
| 212 | 212 |
| 213 if (pending_.size() == 0) | 213 if (pending_.empty()) |
| 214 return; | 214 return; |
| 215 | 215 |
| 216 sender->Send(new ViewMsg_VisitedLink_Add(pending_)); | 216 sender->Send(new ViewMsg_VisitedLink_Add(pending_)); |
| 217 | 217 |
| 218 pending_.clear(); | 218 pending_.clear(); |
| 219 } | 219 } |
| 220 | 220 |
| 221 // Notifies the updater that it is now safe to send visited state updates. | 221 // Notifies the updater that it is now safe to send visited state updates. |
| 222 void ReceiverReady(IPC::Channel::Sender* sender) { | 222 void ReceiverReady(IPC::Channel::Sender* sender) { |
| 223 has_receiver_ = true; | 223 has_receiver_ = true; |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 IPC::PlatformFileForTransit file; | 1281 IPC::PlatformFileForTransit file; |
| 1282 #if defined(OS_POSIX) | 1282 #if defined(OS_POSIX) |
| 1283 file = base::FileDescriptor(model_file, false); | 1283 file = base::FileDescriptor(model_file, false); |
| 1284 #elif defined(OS_WIN) | 1284 #elif defined(OS_WIN) |
| 1285 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1285 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
| 1286 false, DUPLICATE_SAME_ACCESS); | 1286 false, DUPLICATE_SAME_ACCESS); |
| 1287 #endif | 1287 #endif |
| 1288 Send(new ViewMsg_SetPhishingModel(file)); | 1288 Send(new ViewMsg_SetPhishingModel(file)); |
| 1289 } | 1289 } |
| 1290 } | 1290 } |
| OLD | NEW |