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

Side by Side Diff: chrome/browser/browser_process_platform_part_android.cc

Issue 15995014: Adds MemoryPressureListener. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « base/memory/memory_pressure_listener.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser/browser_process_platform_part_mac.h" 5 #include "chrome/browser/browser_process_platform_part_android.h"
6
7 #include "base/android/memory_pressure_listener_android.h"
6 #include "chrome/browser/lifetime/application_lifetime_android.h" 8 #include "chrome/browser/lifetime/application_lifetime_android.h"
9 #include "chrome/browser/memory_purger.h"
7 10
8 BrowserProcessPlatformPart::BrowserProcessPlatformPart() { 11 BrowserProcessPlatformPart::BrowserProcessPlatformPart() {
12 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(
13 base::android::AttachCurrentThread());
9 } 14 }
10 15
11 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { 16 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() {
12 } 17 }
13 18
14 void BrowserProcessPlatformPart::AttemptExit() { 19 void BrowserProcessPlatformPart::AttemptExit() {
15 // Tell the Java code to finish() the Activity. 20 // Tell the Java code to finish() the Activity.
16 chrome::TerminateAndroid(); 21 chrome::TerminateAndroid();
17 } 22 }
OLDNEW
« no previous file with comments | « base/memory/memory_pressure_listener.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698