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

Side by Side Diff: chrome/renderer/render_thread.cc

Issue 21208: POSIX: Transfer network data using shared memory (Closed)
Patch Set: ... Created 11 years, 10 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
« no previous file with comments | « chrome/common/resource_dispatcher.cc ('k') | chrome/renderer/render_thread_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "chrome/renderer/render_thread.h" 10 #include "chrome/renderer/render_thread.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 delete user_script_slave_; 158 delete user_script_slave_;
159 user_script_slave_ = NULL; 159 user_script_slave_ = NULL;
160 160
161 #if defined(OS_WIN) 161 #if defined(OS_WIN)
162 CoUninitialize(); 162 CoUninitialize();
163 #endif 163 #endif
164 } 164 }
165 165
166 void RenderThread::OnUpdateVisitedLinks(base::SharedMemoryHandle table) { 166 void RenderThread::OnUpdateVisitedLinks(base::SharedMemoryHandle table) {
167 DCHECK(table) << "Bad table handle"; 167 DCHECK(base::SharedMemory::IsHandleValid(table)) << "Bad table handle";
168 visited_link_slave_->Init(table); 168 visited_link_slave_->Init(table);
169 } 169 }
170 170
171 void RenderThread::OnUpdateUserScripts( 171 void RenderThread::OnUpdateUserScripts(
172 base::SharedMemoryHandle scripts) { 172 base::SharedMemoryHandle scripts) {
173 DCHECK(scripts) << "Bad scripts handle"; 173 DCHECK(base::SharedMemory::IsHandleValid(scripts)) << "Bad scripts handle";
174 user_script_slave_->UpdateScripts(scripts); 174 user_script_slave_->UpdateScripts(scripts);
175 } 175 }
176 176
177 void RenderThread::OnMessageReceived(const IPC::Message& msg) { 177 void RenderThread::OnMessageReceived(const IPC::Message& msg) {
178 // NOTE: We could subclass router_ to intercept OnControlMessageReceived, but 178 // NOTE: We could subclass router_ to intercept OnControlMessageReceived, but
179 // it seems simpler to just process any control messages that we care about 179 // it seems simpler to just process any control messages that we care about
180 // up-front and then send the rest of the messages onto router_. 180 // up-front and then send the rest of the messages onto router_.
181 181
182 if (msg.routing_id() == MSG_ROUTING_CONTROL) { 182 if (msg.routing_id() == MSG_ROUTING_CONTROL) {
183 IPC_BEGIN_MESSAGE_MAP(RenderThread, msg) 183 IPC_BEGIN_MESSAGE_MAP(RenderThread, msg)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 void RenderThread::InformHostOfCacheStatsLater() { 282 void RenderThread::InformHostOfCacheStatsLater() {
283 // Rate limit informing the host of our cache stats. 283 // Rate limit informing the host of our cache stats.
284 if (!cache_stats_factory_->empty()) 284 if (!cache_stats_factory_->empty())
285 return; 285 return;
286 286
287 MessageLoop::current()->PostDelayedTask(FROM_HERE, 287 MessageLoop::current()->PostDelayedTask(FROM_HERE,
288 cache_stats_factory_->NewRunnableMethod( 288 cache_stats_factory_->NewRunnableMethod(
289 &RenderThread::InformHostOfCacheStats), 289 &RenderThread::InformHostOfCacheStats),
290 kCacheStatsDelayMS); 290 kCacheStatsDelayMS);
291 } 291 }
OLDNEW
« no previous file with comments | « chrome/common/resource_dispatcher.cc ('k') | chrome/renderer/render_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698