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

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

Issue 300010: Cleanup: change PIDs to base::ProcessId (or pid_t) (Closed)
Patch Set: Print out PID as int64 in case ProcessId type ever grows. Created 11 years, 2 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/process_watcher_posix.cc ('k') | no next file » | 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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/common/process_watcher_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698