Commit e5e01b7d authored by aruslan's avatar aruslan Committed by Commit bot

Temporary logging to help ANR dissection

BUG=446578

Review URL: https://codereview.chromium.org/893003004

Cr-Commit-Position: refs/heads/master@{#314644}
parent 78f64bb7
......@@ -728,7 +728,9 @@ public class ChromeBrowserProvider extends ContentProvider {
result.putBoolean(CLIENT_API_RESULT_KEY,
isBookmarkInMobileBookmarksBranch(extras.getLong(argKey(0))));
} else if (CLIENT_API_DELETE_ALL_USER_BOOKMARKS.equals(method)) {
android.util.Log.i(TAG, "before nativeRemoveAllUserBookmarks");
nativeRemoveAllUserBookmarks(mNativeChromeBrowserProvider);
android.util.Log.i(TAG, "after nativeRemoveAllUserBookmarks");
} else {
Log.w(TAG, "Received invalid method " + method);
return null;
......
......@@ -173,8 +173,10 @@ public class ChromeBrowserProviderClient {
@SuppressWarnings("unchecked")
private static <T extends Object> T chromeBrowserProviderCall(Class returnType, String name,
Context context, Bundle args) {
android.util.Log.i(TAG, "before executing " + name + " call");
Bundle result = context.getContentResolver().call(getPrivateProviderUri(context),
name, null, args);
android.util.Log.i(TAG, "after executing " + name + " call");
if (result == null)
return null;
if (Parcelable.class.isAssignableFrom(returnType)) {
......
......@@ -128,6 +128,7 @@ public class ChildAccountService {
new AccountManagerCallback<Boolean>() {
@Override
public void run(AccountManagerFuture<Boolean> future) {
Log.i(TAG, "completed AM request");
assert future == mAccountManagerFuture;
assert future.isDone();
......@@ -143,7 +144,10 @@ public class ChildAccountService {
timer.schedule(new TimerTask() {
@Override
public void run() {
if (!mAccountManagerFuture.isDone()) mAccountManagerFuture.cancel(true);
if (!mAccountManagerFuture.isDone()) {
Log.i(TAG, "cancelling AM request");
mAccountManagerFuture.cancel(true);
}
}}, CHILD_ACCOUNT_TIMEOUT_MS);
}
......@@ -155,7 +159,10 @@ public class ChildAccountService {
private boolean getFutureResult() {
try {
return mAccountManagerFuture.getResult();
Log.i(TAG, "before mAccountManagerFuture.getResult()");
boolean result = mAccountManagerFuture.getResult();
Log.i(TAG, "after mAccountManagerFuture.getResult()");
return result;
} catch (OperationCanceledException e) {
Log.e(TAG, "Timed out fetching child account flag: ", e);
} catch (AuthenticatorException e) {
......
......@@ -298,7 +298,9 @@ class RemoveAllUserBookmarksTask : public BookmarkModelObserverTask {
static void RunOnUIThread(BookmarkModel* model) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
LOG(ERROR) << "begin model->RemoveAllUserBookmarks";
model->RemoveAllUserBookmarks();
LOG(ERROR) << "after model->RemoveAllUserBookmarks";
}
private:
......@@ -1515,8 +1517,10 @@ ScopedJavaLocalRef<jobject> ChromeBrowserProvider::GetEditableBookmarkFolders(
}
void ChromeBrowserProvider::RemoveAllUserBookmarks(JNIEnv* env, jobject obj) {
LOG(ERROR) << "begin ChromeBrowserProvider::RemoveAllUserBookmarks";
RemoveAllUserBookmarksTask task(bookmark_model_);
task.Run();
LOG(ERROR) << "end ChromeBrowserProvider::RemoveAllUserBookmarks";
}
ScopedJavaLocalRef<jobject> ChromeBrowserProvider::GetBookmarkNode(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment