| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 } | 373 } |
| 374 | 374 |
| 375 void RenderThread::OnGetRendererHistograms(int sequence_number) { | 375 void RenderThread::OnGetRendererHistograms(int sequence_number) { |
| 376 SendHistograms(sequence_number); | 376 SendHistograms(sequence_number); |
| 377 } | 377 } |
| 378 | 378 |
| 379 #if defined(USE_TCMALLOC) | 379 #if defined(USE_TCMALLOC) |
| 380 void RenderThread::OnGetRendererTcmalloc() { | 380 void RenderThread::OnGetRendererTcmalloc() { |
| 381 std::string result; | 381 std::string result; |
| 382 char buffer[1024 * 32]; | 382 char buffer[1024 * 32]; |
| 383 int pid = base::GetCurrentProcId(); | 383 base::ProcessId pid = base::GetCurrentProcId(); |
| 384 MallocExtension::instance()->GetStats(buffer, sizeof(buffer)); | 384 MallocExtension::instance()->GetStats(buffer, sizeof(buffer)); |
| 385 result.append(buffer); | 385 result.append(buffer); |
| 386 Send(new ViewHostMsg_RendererTcmalloc(pid, result)); | 386 Send(new ViewHostMsg_RendererTcmalloc(pid, result)); |
| 387 } | 387 } |
| 388 #endif | 388 #endif |
| 389 | 389 |
| 390 void RenderThread::InformHostOfCacheStats() { | 390 void RenderThread::InformHostOfCacheStats() { |
| 391 EnsureWebKitInitialized(); | 391 EnsureWebKitInitialized(); |
| 392 WebCache::UsageStats stats; | 392 WebCache::UsageStats stats; |
| 393 WebCache::getUsageStats(&stats); | 393 WebCache::getUsageStats(&stats); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 void RenderThread::OnPurgePluginListCache(bool reload_pages) { | 562 void RenderThread::OnPurgePluginListCache(bool reload_pages) { |
| 563 EnsureWebKitInitialized(); | 563 EnsureWebKitInitialized(); |
| 564 // The call below will cause a GetPlugins call with refresh=true, but at this | 564 // The call below will cause a GetPlugins call with refresh=true, but at this |
| 565 // point we already know that the browser has refreshed its list, so disable | 565 // point we already know that the browser has refreshed its list, so disable |
| 566 // refresh temporarily to prevent each renderer process causing the list to be | 566 // refresh temporarily to prevent each renderer process causing the list to be |
| 567 // regenerated. | 567 // regenerated. |
| 568 plugin_refresh_allowed_ = false; | 568 plugin_refresh_allowed_ = false; |
| 569 WebKit::resetPluginCache(reload_pages); | 569 WebKit::resetPluginCache(reload_pages); |
| 570 plugin_refresh_allowed_ = true; | 570 plugin_refresh_allowed_ = true; |
| 571 } | 571 } |
| OLD | NEW |