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

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

Issue 803443006: Adding flag to specify the used memory pressure strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Created 5 years, 11 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
« chromeos/chromeos_switches.cc ('K') | « chromeos/chromeos_switches.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) 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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
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 } 495 }
495 #endif 496 #endif
496 497
497 { 498 {
498 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SystemMonitor"); 499 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:SystemMonitor");
499 system_monitor_.reset(new base::SystemMonitor); 500 system_monitor_.reset(new base::SystemMonitor);
500 } 501 }
501 { 502 {
502 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:PowerMonitor"); 503 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:PowerMonitor");
503 scoped_ptr<base::PowerMonitorSource> power_monitor_source( 504 scoped_ptr<base::PowerMonitorSource> power_monitor_source(
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 1240
1240 void BrowserMainLoop::EndStartupTracing() { 1241 void BrowserMainLoop::EndStartupTracing() {
1241 is_tracing_startup_ = false; 1242 is_tracing_startup_ = false;
1242 TracingController::GetInstance()->DisableRecording( 1243 TracingController::GetInstance()->DisableRecording(
1243 TracingController::CreateFileSink( 1244 TracingController::CreateFileSink(
1244 startup_trace_file_, 1245 startup_trace_file_,
1245 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1246 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1246 } 1247 }
1247 1248
1248 } // namespace content 1249 } // namespace content
OLDNEW
« chromeos/chromeos_switches.cc ('K') | « chromeos/chromeos_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698