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

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

Issue 42496: histogram synchronizer code between renderer and browser for UMA and about_histogram (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | chrome/renderer/renderer_histogram_snapshots.h » ('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 #include "chrome/renderer/render_thread.h" 5 #include "chrome/renderer/render_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 void RenderThread::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) { 90 void RenderThread::RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) {
91 channel()->RemoveFilter(filter); 91 channel()->RemoveFilter(filter);
92 } 92 }
93 93
94 void RenderThread::Resolve(const char* name, size_t length) { 94 void RenderThread::Resolve(const char* name, size_t length) {
95 return dns_master_->Resolve(name, length); 95 return dns_master_->Resolve(name, length);
96 } 96 }
97 97
98 void RenderThread::SendHistograms() { 98 void RenderThread::SendHistograms(int sequence_number) {
99 return histogram_snapshots_->SendHistograms(); 99 return histogram_snapshots_->SendHistograms(sequence_number);
100 } 100 }
101 101
102 static WebAppCacheContext* CreateAppCacheContextForRenderer() { 102 static WebAppCacheContext* CreateAppCacheContextForRenderer() {
103 return new AppCacheContextImpl(RenderThread::current()); 103 return new AppCacheContextImpl(RenderThread::current());
104 } 104 }
105 105
106 void RenderThread::Init() { 106 void RenderThread::Init() {
107 #if defined(OS_WIN) 107 #if defined(OS_WIN)
108 // If you are running plugins in this thread you need COM active but in 108 // If you are running plugins in this thread you need COM active but in
109 // the normal case you don't. 109 // the normal case you don't.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return; 178 return;
179 179
180 IPC_BEGIN_MESSAGE_MAP(RenderThread, msg) 180 IPC_BEGIN_MESSAGE_MAP(RenderThread, msg)
181 IPC_MESSAGE_HANDLER(ViewMsg_VisitedLink_NewTable, OnUpdateVisitedLinks) 181 IPC_MESSAGE_HANDLER(ViewMsg_VisitedLink_NewTable, OnUpdateVisitedLinks)
182 IPC_MESSAGE_HANDLER(ViewMsg_SetNextPageID, OnSetNextPageID) 182 IPC_MESSAGE_HANDLER(ViewMsg_SetNextPageID, OnSetNextPageID)
183 // TODO(port): removed from render_messages_internal.h; 183 // TODO(port): removed from render_messages_internal.h;
184 // is there a new non-windows message I should add here? 184 // is there a new non-windows message I should add here?
185 IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView) 185 IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView)
186 IPC_MESSAGE_HANDLER(ViewMsg_SetCacheCapacities, OnSetCacheCapacities) 186 IPC_MESSAGE_HANDLER(ViewMsg_SetCacheCapacities, OnSetCacheCapacities)
187 IPC_MESSAGE_HANDLER(ViewMsg_GetRendererHistograms, 187 IPC_MESSAGE_HANDLER(ViewMsg_GetRendererHistograms,
188 OnGetRendererHistograms) 188 OnGetRendererHistograms)
189 IPC_MESSAGE_HANDLER(ViewMsg_GetCacheResourceStats, 189 IPC_MESSAGE_HANDLER(ViewMsg_GetCacheResourceStats,
190 OnGetCacheResourceStats) 190 OnGetCacheResourceStats)
191 IPC_MESSAGE_HANDLER(ViewMsg_UserScripts_NewScripts, 191 IPC_MESSAGE_HANDLER(ViewMsg_UserScripts_NewScripts,
192 OnUpdateUserScripts) 192 OnUpdateUserScripts)
193 // TODO(rafaelw): create an ExtensionDispatcher that handles extension 193 // TODO(rafaelw): create an ExtensionDispatcher that handles extension
194 // messages seperates their handling from the RenderThread. 194 // messages seperates their handling from the RenderThread.
195 IPC_MESSAGE_HANDLER(ViewMsg_ExtensionHandleConnect, 195 IPC_MESSAGE_HANDLER(ViewMsg_ExtensionHandleConnect,
196 OnExtensionHandleConnect) 196 OnExtensionHandleConnect)
197 IPC_MESSAGE_HANDLER(ViewMsg_ExtensionHandleMessage, 197 IPC_MESSAGE_HANDLER(ViewMsg_ExtensionHandleMessage,
198 OnExtensionHandleMessage) 198 OnExtensionHandleMessage)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 min_dead_capacity, max_dead_capacity, capacity); 240 min_dead_capacity, max_dead_capacity, capacity);
241 } 241 }
242 242
243 void RenderThread::OnGetCacheResourceStats() { 243 void RenderThread::OnGetCacheResourceStats() {
244 EnsureWebKitInitialized(); 244 EnsureWebKitInitialized();
245 WebCache::ResourceTypeStats stats; 245 WebCache::ResourceTypeStats stats;
246 WebCache::getResourceTypeStats(&stats); 246 WebCache::getResourceTypeStats(&stats);
247 Send(new ViewHostMsg_ResourceTypeStats(stats)); 247 Send(new ViewHostMsg_ResourceTypeStats(stats));
248 } 248 }
249 249
250 void RenderThread::OnGetRendererHistograms() { 250 void RenderThread::OnGetRendererHistograms(int sequence_number) {
251 SendHistograms(); 251 SendHistograms(sequence_number);
252 } 252 }
253 253
254 void RenderThread::InformHostOfCacheStats() { 254 void RenderThread::InformHostOfCacheStats() {
255 EnsureWebKitInitialized(); 255 EnsureWebKitInitialized();
256 WebCache::UsageStats stats; 256 WebCache::UsageStats stats;
257 WebCache::getUsageStats(&stats); 257 WebCache::getUsageStats(&stats);
258 Send(new ViewHostMsg_UpdatedCacheStats(stats)); 258 Send(new ViewHostMsg_UpdatedCacheStats(stats));
259 } 259 }
260 260
261 void RenderThread::InformHostOfCacheStatsLater() { 261 void RenderThread::InformHostOfCacheStatsLater() {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 void RenderThread::OnPurgePluginListCache() { 346 void RenderThread::OnPurgePluginListCache() {
347 // The call below will cause a GetPlugins call with refresh=true, but at this 347 // The call below will cause a GetPlugins call with refresh=true, but at this
348 // point we already know that the browser has refreshed its list, so disable 348 // point we already know that the browser has refreshed its list, so disable
349 // refresh temporarily to prevent each renderer process causing the list to be 349 // refresh temporarily to prevent each renderer process causing the list to be
350 // regenerated. 350 // regenerated.
351 plugin_refresh_allowed_ = false; 351 plugin_refresh_allowed_ = false;
352 WebKit::resetPluginCache(); 352 WebKit::resetPluginCache();
353 plugin_refresh_allowed_ = true; 353 plugin_refresh_allowed_ = true;
354 } 354 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | chrome/renderer/renderer_histogram_snapshots.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698