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

Side by Side Diff: chrome/browser/browser_process_impl.h

Issue 2527973003: Consolidate code monitoring low memory kills and OOM kills to MemoryKillsMonitor on ChromeOS. (Closed)
Patch Set: restrict it to ChromeoS Created 4 years 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 // When each service is created, we set a flag indicating this. At this point, 5 // When each service is created, we set a flag indicating this. At this point,
6 // the service initialization could fail or succeed. This allows us to remember 6 // the service initialization could fail or succeed. This allows us to remember
7 // if we tried to create a service, and not try creating it over and over if 7 // if we tried to create a service, and not try creating it over and over if
8 // the creation failed. 8 // the creation failed.
9 9
10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_
11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ 11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_
12 12
13 #include <stdint.h> 13 #include <stdint.h>
14 14
15 #include <memory> 15 #include <memory>
16 #include <string> 16 #include <string>
17 17
18 #include "base/debug/stack_trace.h" 18 #include "base/debug/stack_trace.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
21 #include "base/threading/non_thread_safe.h" 21 #include "base/threading/non_thread_safe.h"
22 #include "base/timer/timer.h" 22 #include "base/timer/timer.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/lifetime/keep_alive_state_observer.h" 25 #include "chrome/browser/lifetime/keep_alive_state_observer.h"
26 #include "chrome/browser/memory/memory_kills_monitor.h"
26 #include "chrome/common/features.h" 27 #include "chrome/common/features.h"
27 #include "components/prefs/pref_change_registrar.h" 28 #include "components/prefs/pref_change_registrar.h"
28 #include "extensions/features/features.h" 29 #include "extensions/features/features.h"
29 #include "printing/features/features.h" 30 #include "printing/features/features.h"
30 31
31 class ChromeChildProcessWatcher; 32 class ChromeChildProcessWatcher;
32 class ChromeDeviceClient; 33 class ChromeDeviceClient;
33 class ChromeResourceDispatcherHostDelegate; 34 class ChromeResourceDispatcherHostDelegate;
34 class DevToolsAutoOpener; 35 class DevToolsAutoOpener;
35 class RemoteDebuggingServer; 36 class RemoteDebuggingServer;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 std::unique_ptr<ChromeChildProcessWatcher> child_process_watcher_; 340 std::unique_ptr<ChromeChildProcessWatcher> child_process_watcher_;
340 341
341 std::unique_ptr<ChromeDeviceClient> device_client_; 342 std::unique_ptr<ChromeDeviceClient> device_client_;
342 343
343 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) 344 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
344 // Any change to this #ifdef must be reflected as well in 345 // Any change to this #ifdef must be reflected as well in
345 // chrome/browser/memory/tab_manager_browsertest.cc 346 // chrome/browser/memory/tab_manager_browsertest.cc
346 std::unique_ptr<memory::TabManager> tab_manager_; 347 std::unique_ptr<memory::TabManager> tab_manager_;
347 #endif 348 #endif
348 349
350 #if defined(OS_CHROMEOS)
sky 2016/11/26 16:49:40 If this is CHROMEOS specific, how come the include
cylee1 2016/11/29 20:28:40 You're right. Moved it to ChromeBrowserMainPartsCh
351 memory::MemoryKillsMonitor::Handle memory_kills_monitor_handle_;
352 #endif // !defined(OS_ANDROID)
353
349 shell_integration::DefaultWebClientState cached_default_web_client_state_; 354 shell_integration::DefaultWebClientState cached_default_web_client_state_;
350 355
351 std::unique_ptr<PhysicalWebDataSource> physical_web_data_source_; 356 std::unique_ptr<PhysicalWebDataSource> physical_web_data_source_;
352 357
353 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); 358 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl);
354 }; 359 };
355 360
356 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ 361 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698