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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 897413002: Add a finch experiment for different memory pressure management strategies in ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
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
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
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
OLDNEW
« base/chromeos/memory_pressure_observer_chromeos.cc ('K') | « chromeos/chromeos_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698