OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_render_process_observer.h" | 5 #include "chrome/renderer/chrome_render_process_observer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 crypto::ForceNSSNoDBInit(); | 191 crypto::ForceNSSNoDBInit(); |
192 crypto::EnsureNSSInit(); | 192 crypto::EnsureNSSInit(); |
193 } | 193 } |
194 #elif defined(OS_WIN) | 194 #elif defined(OS_WIN) |
195 // crypt32.dll is used to decode X509 certificates for Chromoting. | 195 // crypt32.dll is used to decode X509 certificates for Chromoting. |
196 // Only load this library when the feature is enabled. | 196 // Only load this library when the feature is enabled. |
197 std::string error; | 197 std::string error; |
198 base::LoadNativeLibrary(FilePath(L"crypt32.dll"), &error); | 198 base::LoadNativeLibrary(FilePath(L"crypt32.dll"), &error); |
199 #endif | 199 #endif |
200 // Setup initial set of crash dump data for Field Trials in this renderer. | 200 // Setup initial set of crash dump data for Field Trials in this renderer. |
201 ExperimentsHelper::SetChildProcessLoggingExperimentList(); | 201 experiments_helper::SetChildProcessLoggingExperimentList(); |
202 } | 202 } |
203 | 203 |
204 ChromeRenderProcessObserver::~ChromeRenderProcessObserver() { | 204 ChromeRenderProcessObserver::~ChromeRenderProcessObserver() { |
205 } | 205 } |
206 | 206 |
207 bool ChromeRenderProcessObserver::OnControlMessageReceived( | 207 bool ChromeRenderProcessObserver::OnControlMessageReceived( |
208 const IPC::Message& message) { | 208 const IPC::Message& message) { |
209 bool handled = true; | 209 bool handled = true; |
210 IPC_BEGIN_MESSAGE_MAP(ChromeRenderProcessObserver, message) | 210 IPC_BEGIN_MESSAGE_MAP(ChromeRenderProcessObserver, message) |
211 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsIncognitoProcess, | 211 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsIncognitoProcess, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 new ChromeViewHostMsg_WriteTcmallocHeapProfile_ACK(filename, result)); | 302 new ChromeViewHostMsg_WriteTcmallocHeapProfile_ACK(filename, result)); |
303 #endif | 303 #endif |
304 } | 304 } |
305 | 305 |
306 #endif | 306 #endif |
307 | 307 |
308 void ChromeRenderProcessObserver::OnSetFieldTrialGroup( | 308 void ChromeRenderProcessObserver::OnSetFieldTrialGroup( |
309 const std::string& field_trial_name, | 309 const std::string& field_trial_name, |
310 const std::string& group_name) { | 310 const std::string& group_name) { |
311 base::FieldTrialList::CreateFieldTrial(field_trial_name, group_name); | 311 base::FieldTrialList::CreateFieldTrial(field_trial_name, group_name); |
312 ExperimentsHelper::SetChildProcessLoggingExperimentList(); | 312 experiments_helper::SetChildProcessLoggingExperimentList(); |
313 } | 313 } |
314 | 314 |
315 void ChromeRenderProcessObserver::OnGetV8HeapStats() { | 315 void ChromeRenderProcessObserver::OnGetV8HeapStats() { |
316 v8::HeapStatistics heap_stats; | 316 v8::HeapStatistics heap_stats; |
317 v8::V8::GetHeapStatistics(&heap_stats); | 317 v8::V8::GetHeapStatistics(&heap_stats); |
318 RenderThread::Get()->Send(new ChromeViewHostMsg_V8HeapStats( | 318 RenderThread::Get()->Send(new ChromeViewHostMsg_V8HeapStats( |
319 heap_stats.total_heap_size(), heap_stats.used_heap_size())); | 319 heap_stats.total_heap_size(), heap_stats.used_heap_size())); |
320 } | 320 } |
321 | 321 |
322 void ChromeRenderProcessObserver::OnPurgeMemory() { | 322 void ChromeRenderProcessObserver::OnPurgeMemory() { |
(...skipping 29 matching lines...) Expand all Loading... |
352 if (clear_cache_pending_) { | 352 if (clear_cache_pending_) { |
353 clear_cache_pending_ = false; | 353 clear_cache_pending_ = false; |
354 WebCache::clear(); | 354 WebCache::clear(); |
355 } | 355 } |
356 } | 356 } |
357 | 357 |
358 const RendererContentSettingRules* | 358 const RendererContentSettingRules* |
359 ChromeRenderProcessObserver::content_setting_rules() const { | 359 ChromeRenderProcessObserver::content_setting_rules() const { |
360 return &content_setting_rules_; | 360 return &content_setting_rules_; |
361 } | 361 } |
OLD | NEW |