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

Issue 1407233017: Define a Java-side global application context. (Closed)

Created:
5 years, 1 month ago by Torne
Modified:
5 years ago
Reviewers:
sky, Lambros, Nico, nyquist, Yaron, mef, qsr
CC:
chromium-reviews, qsr+mojo_chromium.org, chromoting-reviews_chromium.org, yzshen+watch_chromium.org, nyquist+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, ben+mojo_chromium.org, cbentzel+watch_chromium.org, maniscalco+watch-blimp_chromium.org, vmpstr+watch_chromium.org, jam, abarth-chromium, marcinjb+watch-blimp_chromium.org, darin-cc_chromium.org, yfriedman+watch_chromium.org, jbudorick+watch_chromium.org, viettrungluu+watch_chromium.org, klundberg+watch_chromium.org, sriramsr+watch-blimp_chromium.org, Aaron Boodman, mikecase+watch_chromium.org, darin (slow to review), dtrainor+watch-blimp_chromium.org, dgn, Ben Goodger (Google), Sergey Ulanov
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Define a Java-side global application context. Instead of each user of base setting the native-side global app context separately, introduce a Java-side global app context, which is always in sync with the native-side one. Switch most callers to setting it on the Java side, except where this is problematic. Callers of ApplicationStatus.getApplicationContext will be updated incrementally in followup CLs once it's been verified that they only require a Context and not a BaseChromiumApplication. BUG=552419 Committed: https://crrev.com/961a488f6a5d8c82b576444054f5d26b3f8a6877 Cr-Commit-Position: refs/heads/master@{#361306}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Update remoting code per comments #

Patch Set 3 : Make ApplicationStatus call ContextUtils #

Patch Set 4 : rebase #

Patch Set 5 : Allow init from native or java side, resolve mojo issues, rebase #

Patch Set 6 : rebase #

Patch Set 7 : Undo changes to ApplicationStatus #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -94 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M base/android/base_jni_registrar.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
A base/android/context_utils.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
A base/android/context_utils.cc View 1 2 3 4 1 chunk +58 lines, -0 lines 0 comments Download
A base/android/java/src/org/chromium/base/ContextUtils.java View 1 2 3 4 1 chunk +56 lines, -0 lines 0 comments Download
M base/android/jni_android.h View 1 2 3 4 3 chunks +4 lines, -13 lines 0 comments Download
M base/android/jni_android.cc View 3 chunks +0 lines, -18 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M blimp/client/android/blimp_library_loader.cc View 1 chunk +1 line, -4 lines 2 comments Download
M blimp/client/android/java/src/org/chromium/blimp/BlimpLibraryLoader.java View 3 chunks +4 lines, -2 lines 0 comments Download
M components/cronet/android/cronet_library_loader.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M components/cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java View 3 chunks +2 lines, -2 lines 0 comments Download
M content/app/android/content_main.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/app/ContentMain.java View 3 chunks +3 lines, -3 lines 2 comments Download
M mojo/android/javatests/mojo_test_case.cc View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
M mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M mojo/runner/android/apk/src/org/chromium/mojo/shell/ShellMain.java View 1 2 3 4 3 chunks +13 lines, -14 lines 0 comments Download
M mojo/runner/android/main.cc View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java View 1 2 chunks +6 lines, -5 lines 0 comments Download
M remoting/client/jni/chromoting_jni_runtime.cc View 1 2 3 4 1 chunk +1 line, -5 lines 0 comments Download
M testing/android/native_test/native_test_launcher.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 42 (11 generated)
Torne
This isn't finished yet, but there are some issues that I need to discuss with ...
5 years, 1 month ago (2015-11-06 16:38:24 UTC) #1
Torne
+ben/sky: I have some questions about mojo in the context of this change. No need ...
5 years, 1 month ago (2015-11-06 16:43:19 UTC) #3
Torne
+sergeyu for remoting-related question: https://codereview.chromium.org/1407233017/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java File remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java (right): https://codereview.chromium.org/1407233017/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java#newcode148 remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java:148: * THIS IS SKETCHY: the ...
5 years, 1 month ago (2015-11-06 16:51:34 UTC) #5
Lambros
https://codereview.chromium.org/1407233017/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java File remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java (right): https://codereview.chromium.org/1407233017/diff/1/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java#newcode148 remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java:148: * THIS IS SKETCHY: the code doesn't update the ...
5 years, 1 month ago (2015-11-06 19:46:03 UTC) #7
Torne
On 2015/11/06 19:46:03, Lambros wrote: > The comment seems to be outdated, probably all they ...
5 years, 1 month ago (2015-11-09 15:16:20 UTC) #8
Lambros
remoting/ lgtm, thanks!
5 years, 1 month ago (2015-11-09 18:36:03 UTC) #9
Torne
+qsr who wrote the comment https://code.google.com/p/chromium/codesearch#chromium/src/mojo/runner/android/apk/src/org/chromium/mojo/shell/MojoShellActivity.java&l=50 qsr, can you help answer the questions I posed ...
5 years, 1 month ago (2015-11-13 14:08:26 UTC) #12
qsr
https://codereview.chromium.org/1407233017/diff/1/mojo/runner/android/android_handler.cc File mojo/runner/android/android_handler.cc (right): https://codereview.chromium.org/1407233017/diff/1/mojo/runner/android/android_handler.cc#newcode54 mojo/runner/android/android_handler.cc:54: // TODO: what to do about this? On 2015/11/06 ...
5 years, 1 month ago (2015-11-13 14:36:06 UTC) #13
Torne
On 2015/11/13 14:36:06, qsr wrote: > https://codereview.chromium.org/1407233017/diff/1/mojo/runner/android/android_handler.cc > File mojo/runner/android/android_handler.cc (right): > > https://codereview.chromium.org/1407233017/diff/1/mojo/runner/android/android_handler.cc#newcode54 > ...
5 years, 1 month ago (2015-11-13 14:47:19 UTC) #14
qsr
On 2015/11/13 14:47:19, Torne wrote: > On 2015/11/13 14:36:06, qsr wrote: > > > https://codereview.chromium.org/1407233017/diff/1/mojo/runner/android/android_handler.cc ...
5 years, 1 month ago (2015-11-13 14:56:39 UTC) #15
Torne
On 2015/11/13 14:56:39, qsr wrote: > On 2015/11/13 14:47:19, Torne wrote: > > On 2015/11/13 ...
5 years, 1 month ago (2015-11-13 15:05:36 UTC) #16
qsr
On 2015/11/13 15:05:36, Torne wrote: > On 2015/11/13 14:56:39, qsr wrote: > > On 2015/11/13 ...
5 years, 1 month ago (2015-11-13 15:09:01 UTC) #17
Torne
On 2015/11/13 15:09:01, qsr wrote: > Yes. They should call your new mechanism through JNI ...
5 years, 1 month ago (2015-11-13 15:23:23 UTC) #18
Torne
Okay, have changed the CL to keep the native-side initialisation option so that mojo applications ...
5 years, 1 month ago (2015-11-20 13:55:36 UTC) #22
mef
On 2015/11/20 13:55:36, Torne wrote: > Okay, have changed the CL to keep the native-side ...
5 years, 1 month ago (2015-11-20 14:45:54 UTC) #23
nyquist
blimp lgtm
5 years, 1 month ago (2015-11-20 17:54:58 UTC) #24
Nico
base/ lgtm
5 years, 1 month ago (2015-11-20 21:23:43 UTC) #25
Torne
Hm, some of the Java initialisation in Chrome relies on being able to cast ApplicationStatus.getApplicationContext() ...
5 years, 1 month ago (2015-11-23 15:22:31 UTC) #26
Yaron
On 2015/11/23 15:22:31, Torne wrote: > Hm, some of the Java initialisation in Chrome relies ...
5 years, 1 month ago (2015-11-23 15:28:43 UTC) #27
Torne
On 2015/11/23 15:28:43, Yaron wrote: > On 2015/11/23 15:22:31, Torne wrote: > > Hm, some ...
5 years, 1 month ago (2015-11-23 15:31:37 UTC) #28
Torne
On 2015/11/23 15:31:37, Torne wrote: > On 2015/11/23 15:28:43, Yaron wrote: > > On 2015/11/23 ...
5 years, 1 month ago (2015-11-23 15:36:32 UTC) #29
Torne
Hm, probably the easiest option is to leave ApplicationStatus alone in this CL and then ...
5 years, 1 month ago (2015-11-23 15:42:42 UTC) #30
Torne
Updated CL and description to not change ApplicationStatus.getApplicationContext, which should unbreak chrome_public startup. Does the ...
5 years, 1 month ago (2015-11-23 15:51:30 UTC) #32
Torne
Updated CL and description to not change ApplicationStatus.getApplicationContext, which should unbreak chrome_public startup. Does the ...
5 years, 1 month ago (2015-11-23 15:51:31 UTC) #33
sky
mojo LGTM
5 years, 1 month ago (2015-11-23 15:59:20 UTC) #34
Yaron
lgtm https://codereview.chromium.org/1407233017/diff/120001/blimp/client/android/blimp_library_loader.cc File blimp/client/android/blimp_library_loader.cc (right): https://codereview.chromium.org/1407233017/diff/120001/blimp/client/android/blimp_library_loader.cc#newcode64 blimp/client/android/blimp_library_loader.cc:64: // TODO(dtrainor): Start the runner? this is a ...
5 years, 1 month ago (2015-11-23 20:35:16 UTC) #35
Lambros
remoting/ lgtm
5 years, 1 month ago (2015-11-23 21:03:18 UTC) #36
Torne
https://codereview.chromium.org/1407233017/diff/120001/blimp/client/android/blimp_library_loader.cc File blimp/client/android/blimp_library_loader.cc (right): https://codereview.chromium.org/1407233017/diff/120001/blimp/client/android/blimp_library_loader.cc#newcode64 blimp/client/android/blimp_library_loader.cc:64: // TODO(dtrainor): Start the runner? On 2015/11/23 20:35:16, Yaron ...
5 years ago (2015-11-24 10:22:34 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1407233017/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1407233017/120001
5 years ago (2015-11-24 10:24:09 UTC) #40
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years ago (2015-11-24 10:31:07 UTC) #41
commit-bot: I haz the power
5 years ago (2015-11-24 10:32:02 UTC) #42
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/961a488f6a5d8c82b576444054f5d26b3f8a6877
Cr-Commit-Position: refs/heads/master@{#361306}

Powered by Google App Engine
This is Rietveld 408576698