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

Unified Diff: base/android/java/src/org/chromium/base/MemoryPressureListener.java

Issue 2784353002: Android: Remove GetApplicationContext part 2 (Closed)
Patch Set: Fix tests Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: base/android/java/src/org/chromium/base/MemoryPressureListener.java
diff --git a/base/android/java/src/org/chromium/base/MemoryPressureListener.java b/base/android/java/src/org/chromium/base/MemoryPressureListener.java
index d61a006018032de06bc3e658ce63eea06fcfc130..408cafb9812636f4bc06381c3ebf31b67765b0fd 100644
--- a/base/android/java/src/org/chromium/base/MemoryPressureListener.java
+++ b/base/android/java/src/org/chromium/base/MemoryPressureListener.java
@@ -6,7 +6,6 @@ package org.chromium.base;
import android.app.Activity;
import android.content.ComponentCallbacks2;
-import android.content.Context;
import android.content.res.Configuration;
import org.chromium.base.annotations.CalledByNative;
@@ -47,8 +46,8 @@ public class MemoryPressureListener {
"org.chromium.base.ACTION_TRIM_MEMORY_MODERATE";
@CalledByNative
- private static void registerSystemCallback(Context context) {
- context.registerComponentCallbacks(
+ private static void registerSystemCallback() {
+ ContextUtils.getApplicationContext().registerComponentCallbacks(
new ComponentCallbacks2() {
@Override
public void onTrimMemory(int level) {
« no previous file with comments | « android_webview/native/android_protocol_handler.cc ('k') | base/android/memory_pressure_listener_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698