Chromium Code Reviews| 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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.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/logging.h" | 9 #include "base/logging.h" | 
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" | 
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 484 // Create a MessageLoop if one does not already exist for the current thread. | 484 // Create a MessageLoop if one does not already exist for the current thread. | 
| 485 if (!base::MessageLoop::current()) | 485 if (!base::MessageLoop::current()) | 
| 486 main_message_loop_.reset(new base::MessageLoopForUI); | 486 main_message_loop_.reset(new base::MessageLoopForUI); | 
| 487 | 487 | 
| 488 InitializeMainThread(); | 488 InitializeMainThread(); | 
| 489 | 489 | 
| 490 #if defined(OS_CHROMEOS) | 490 #if defined(OS_CHROMEOS) | 
| 491 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 491 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 
| 492 chromeos::switches::kDisableMemoryPressureSystemChromeOS)) { | 492 chromeos::switches::kDisableMemoryPressureSystemChromeOS)) { | 
| 493 memory_pressure_observer_.reset(new base::MemoryPressureObserverChromeOS( | 493 memory_pressure_observer_.reset(new base::MemoryPressureObserverChromeOS( | 
| 494 chromeos::switches::GetMemoryPressureThresholds())); | 494 base::MemoryPressureObserverChromeOS::GetMemoryPressureThresholds())); | 
| 
 
Mr4D (OOO till 08-26)
2015/02/06 03:56:35
Call the previous function to get the threshold pa
 
 | |
| 495 } | 495 } | 
| 496 #endif | 496 #endif | 
| 497 | 497 | 
| 498 { | 498 { | 
| 499 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SystemMonitor"); | 499 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SystemMonitor"); | 
| 500 system_monitor_.reset(new base::SystemMonitor); | 500 system_monitor_.reset(new base::SystemMonitor); | 
| 501 } | 501 } | 
| 502 { | 502 { | 
| 503 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:PowerMonitor"); | 503 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:PowerMonitor"); | 
| 504 scoped_ptr<base::PowerMonitorSource> power_monitor_source( | 504 scoped_ptr<base::PowerMonitorSource> power_monitor_source( | 
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1271 | 1271 | 
| 1272 void BrowserMainLoop::EndStartupTracing() { | 1272 void BrowserMainLoop::EndStartupTracing() { | 
| 1273 is_tracing_startup_ = false; | 1273 is_tracing_startup_ = false; | 
| 1274 TracingController::GetInstance()->DisableRecording( | 1274 TracingController::GetInstance()->DisableRecording( | 
| 1275 TracingController::CreateFileSink( | 1275 TracingController::CreateFileSink( | 
| 1276 startup_trace_file_, | 1276 startup_trace_file_, | 
| 1277 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1277 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 
| 1278 } | 1278 } | 
| 1279 | 1279 | 
| 1280 } // namespace content | 1280 } // namespace content | 
| OLD | NEW |