summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorppi@chromium.org <ppi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-23 01:47:21 +0000
committerppi@chromium.org <ppi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-23 01:47:21 +0000
commit6c24e95258942e3013f47e1221ee0cca46db0e90 (patch)
tree654be7bba228a07cba7773206afc602b6e5d633e /content
parentd70e363d7aabe7b439262223e525fd3f734384b8 (diff)
downloadchromium_src-6c24e95258942e3013f47e1221ee0cca46db0e90.zip
chromium_src-6c24e95258942e3013f47e1221ee0cca46db0e90.tar.gz
chromium_src-6c24e95258942e3013f47e1221ee0cca46db0e90.tar.bz2
Rename the lock variable in ChildProcessLauncher.
Unless I am missing something, it doesn't make too much sense to call a lock variable "mUiThreadLock", as we employ it specifically to handle class access from different threads. This patch renames "mUiThreadLock" -> "mLock". BUG=None Review URL: https://chromiumcodereview.appspot.com/22992005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java
index 14e5d58..9715f63 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessConnection.java
@@ -95,9 +95,9 @@ public class ChildProcessConnection {
// Synchronization: While most internal flow occurs on the UI thread, the public API
// (specifically start and stop) may be called from any thread, hence all entry point methods
- // into the class are synchronized on the ChildProcessConnection instance to protect access to
- // these members. But see also the TODO where AsyncBoundServiceConnection is created.
- private final Object mUiThreadLock = new Object();
+ // into the class are synchronized on the lock to protect access to these members. But see also
+ // the TODO where AsyncBoundServiceConnection is created.
+ private final Object mLock = new Object();
private IChildProcessService mService = null;
// Set to true when the service connect is finished, even if it fails.
private boolean mServiceConnectComplete = false;
@@ -187,7 +187,7 @@ public class ChildProcessConnection {
@Override
public void onServiceConnected(ComponentName className, IBinder service) {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
// A flag from the parent class ensures we run the post-connection logic only once
// (instead of once per each ChildServiceConnection).
if (mServiceConnectComplete) {
@@ -253,7 +253,7 @@ public class ChildProcessConnection {
}
IChildProcessService getService() {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
return mService;
}
}
@@ -274,7 +274,7 @@ public class ChildProcessConnection {
* the command line parameters must instead be passed to setupConnection().
*/
void start(String[] commandLine) {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
TraceEvent.begin();
assert !ThreadUtils.runningOnUiThread();
@@ -301,7 +301,7 @@ public class ChildProcessConnection {
FileDescriptorInfo[] filesToBeMapped,
IChildProcessCallback processCallback,
ConnectionCallbacks connectionCallbacks) {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
TraceEvent.begin();
assert mConnectionParams == null;
mConnectionCallbacks = connectionCallbacks;
@@ -320,7 +320,7 @@ public class ChildProcessConnection {
* this multiple times.
*/
void stop() {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
mInitialBinding.unbind();
mStrongBinding.unbind();
mWaivedBinding.unbind();
@@ -421,7 +421,7 @@ public class ChildProcessConnection {
* renderer will not be killed immediately after the call.
*/
void removeInitialBinding() {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
if (!mInitialBinding.isBound()) {
// While it is safe to post and execute the unbinding multiple times, we prefer to
// avoid spamming the message queue.
@@ -431,7 +431,7 @@ public class ChildProcessConnection {
ThreadUtils.postOnUiThreadDelayed(new Runnable() {
@Override
public void run() {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
mInitialBinding.unbind();
}
}
@@ -445,7 +445,7 @@ public class ChildProcessConnection {
* multiple bindings, we count the requests and unbind when the count drops to zero.
*/
void attachAsActive() {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
if (mService == null) {
Log.w(TAG, "The connection is not bound for " + mPID);
return;
@@ -469,7 +469,7 @@ public class ChildProcessConnection {
ThreadUtils.postOnUiThreadDelayed(new Runnable() {
@Override
public void run() {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
if (mService == null) {
Log.w(TAG, "The connection is not bound for " + mPID);
return;
@@ -488,7 +488,7 @@ public class ChildProcessConnection {
* @return The connection PID, or 0 if not yet connected.
*/
int getPid() {
- synchronized(mUiThreadLock) {
+ synchronized(mLock) {
return mPID;
}
}