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

Unified Diff: content/public/android/java/src/org/chromium/content/app/ChildProcessService.java

Issue 1178253005: Use Chromium's logging utility for content files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/BackgroundSyncLauncherService.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
diff --git a/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java b/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
index aa68ad6420ba9ca556f0b8f36431a2f42f152b4b..ca7567f52de51132ab50875e9313ab5ff9623ff5 100644
--- a/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
+++ b/content/public/android/java/src/org/chromium/content/app/ChildProcessService.java
@@ -13,13 +13,13 @@ import android.os.IBinder;
import android.os.Parcelable;
import android.os.Process;
import android.os.RemoteException;
-import android.util.Log;
import android.view.Surface;
import org.chromium.base.BaseSwitches;
import org.chromium.base.CalledByNative;
import org.chromium.base.CommandLine;
import org.chromium.base.JNINamespace;
+import org.chromium.base.Log;
import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.library_loader.LibraryProcessType;
@@ -47,7 +47,7 @@ import java.util.concurrent.atomic.AtomicReference;
@JNINamespace("content")
public class ChildProcessService extends Service {
private static final String MAIN_THREAD_NAME = "ChildProcessMain";
- private static final String TAG = "ChildProcessService";
+ private static final String TAG = "cr.ChildProcessService";
private IChildProcessCallback mCallback;
// This is the native "Main" thread for the renderer / utility process.
@@ -116,7 +116,7 @@ public class ChildProcessService extends Service {
@Override
public void onCreate() {
- Log.i(TAG, "Creating new ChildProcessService pid=" + Process.myPid());
+ Log.i(TAG, "Creating new ChildProcessService pid=%d", Process.myPid());
if (sContext.get() != null) {
throw new RuntimeException("Illegal child process reuse.");
}
@@ -209,9 +209,9 @@ public class ChildProcessService extends Service {
nativeExitChildProcess();
}
} catch (InterruptedException e) {
- Log.w(TAG, MAIN_THREAD_NAME + " startup failed: " + e);
+ Log.w(TAG, "%s startup failed: %s", MAIN_THREAD_NAME, e);
} catch (ProcessInitException e) {
- Log.w(TAG, MAIN_THREAD_NAME + " startup failed: " + e);
+ Log.w(TAG, "%s startup failed: %s", MAIN_THREAD_NAME, e);
}
}
}, MAIN_THREAD_NAME);
@@ -221,7 +221,7 @@ public class ChildProcessService extends Service {
@Override
@SuppressFBWarnings("DM_EXIT")
public void onDestroy() {
- Log.i(TAG, "Destroying ChildProcessService pid=" + Process.myPid());
+ Log.i(TAG, "Destroying ChildProcessService pid=%d", Process.myPid());
super.onDestroy();
if (mActivitySemaphore.tryAcquire()) {
// TODO(crbug.com/457406): This is a bit hacky, but there is no known better solution
@@ -295,13 +295,13 @@ public class ChildProcessService extends Service {
surface = new Surface((SurfaceTexture) surfaceObject);
needRelease = true;
} else {
- Log.e(TAG, "Not a valid surfaceObject: " + surfaceObject);
+ Log.e(TAG, "Not a valid surfaceObject: %s", surfaceObject);
return;
}
try {
mCallback.establishSurfacePeer(pid, surface, primaryID, secondaryID);
} catch (RemoteException e) {
- Log.e(TAG, "Unable to call establishSurfaceTexturePeer: " + e);
+ Log.e(TAG, "Unable to call establishSurfaceTexturePeer: %s", e);
return;
} finally {
if (needRelease) {
@@ -321,7 +321,7 @@ public class ChildProcessService extends Service {
try {
return mCallback.getViewSurface(surfaceId).getSurface();
} catch (RemoteException e) {
- Log.e(TAG, "Unable to call establishSurfaceTexturePeer: " + e);
+ Log.e(TAG, "Unable to call establishSurfaceTexturePeer: %s", e);
return null;
}
}
@@ -339,7 +339,7 @@ public class ChildProcessService extends Service {
try {
mCallback.registerSurfaceTextureSurface(surfaceTextureId, clientId, surface);
} catch (RemoteException e) {
- Log.e(TAG, "Unable to call registerSurfaceTextureSurface: " + e);
+ Log.e(TAG, "Unable to call registerSurfaceTextureSurface: %s", e);
}
surface.release();
}
@@ -355,7 +355,7 @@ public class ChildProcessService extends Service {
try {
mCallback.unregisterSurfaceTextureSurface(surfaceTextureId, clientId);
} catch (RemoteException e) {
- Log.e(TAG, "Unable to call unregisterSurfaceTextureSurface: " + e);
+ Log.e(TAG, "Unable to call unregisterSurfaceTextureSurface: %s", e);
}
}
@@ -370,7 +370,7 @@ public class ChildProcessService extends Service {
try {
return mCallback.getSurfaceTextureSurface(surfaceTextureId).getSurface();
} catch (RemoteException e) {
- Log.e(TAG, "Unable to call getSurfaceTextureSurface: " + e);
+ Log.e(TAG, "Unable to call getSurfaceTextureSurface: %s", e);
return null;
}
}
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/BackgroundSyncLauncherService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698