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

Issue 340403004: Java wrapper for DistilledPagePrefs. (Closed)

Created:
6 years, 6 months ago by sunangel
Modified:
6 years, 5 months ago
Reviewers:
robliao, nyquist
CC:
chromium-reviews, darin-cc_chromium.org, jam, smaslo, rgustafson
Project:
chromium
Visibility:
Public.

Description

Java wrapper for DistilledPagePrefs. Adds Java version of DomDistillerService and DistilledPagePrefs with support for setting and retrieving the current Theme. The DomDistillerService can be retrieved by using the DomDistillerServiceFactory, which maps a profile to an instance of the service. BUG=383630 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283742

Patch Set 1 #

Patch Set 2 : Reupload not including Susan's changes #

Patch Set 3 : Spacing issues #

Total comments: 6

Patch Set 4 : Reader Mode Prefs High Contrast Mode moved upstream #

Patch Set 5 : DomDistillerService Java wrapper created #

Patch Set 6 : Baseline for comparison for next patch: includes sync and Susan's patches #

Patch Set 7 : DomDistillerService Java wrapper #

Total comments: 35

Patch Set 8 : Styling issues #

Patch Set 9 : Line breaks, commenting #

Total comments: 14

Patch Set 10 : Commenting revised, formatting #

Patch Set 11 : DomDistillerServiceFactory comment spacing fixed #

Total comments: 10

Patch Set 12 : Spacing and indentation #

Total comments: 60

Patch Set 13 : namespaces to classes, native init, enum #

Total comments: 110

Patch Set 14 : base after sync #

Patch Set 15 : formatting, getter in distilled page prefs for theme #

Patch Set 16 : Added test #

Patch Set 17 : Formatting changes, added test #

Total comments: 61

Patch Set 18 : stylistic changes, rename ThemeTestPref, remove unnecessary files #

Total comments: 6

Patch Set 19 : spacing, fixed theme_list #

Total comments: 14

Patch Set 20 : commenting, updated theme_list with Susan's patch #

Total comments: 2

Patch Set 21 : synced, use for comparison for next patch #

Patch Set 22 : test upload #

Patch Set 23 : modified DEPS for test dependencies #

Unified diffs Side-by-side diffs Delta from patch set Stats (+470 lines, -5 lines) Patch
A chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/android/javatests/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/DistilledPagePrefsTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +42 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/dom_distiller_service_factory_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/dom_distiller_service_factory_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -0 lines 0 comments Download
M components/dom_distiller.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +20 lines, -0 lines 0 comments Download
M components/dom_distiller/android/component_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -1 line 0 comments Download
A components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DistilledPagePrefs.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +37 lines, -0 lines 0 comments Download
A components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/DomDistillerService.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +38 lines, -0 lines 0 comments Download
A components/dom_distiller/android/java/src/org/chromium/components/dom_distiller/core/Theme.template View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +37 lines, -0 lines 0 comments Download
M components/dom_distiller/core/distilled_page_prefs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -4 lines 0 comments Download
A components/dom_distiller/core/distilled_page_prefs_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +35 lines, -0 lines 0 comments Download
A components/dom_distiller/core/distilled_page_prefs_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +45 lines, -0 lines 0 comments Download
A components/dom_distiller/core/dom_distiller_service_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +41 lines, -0 lines 0 comments Download
A components/dom_distiller/core/dom_distiller_service_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +38 lines, -0 lines 0 comments Download
A components/dom_distiller/core/theme_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +17 lines, -0 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
sunangel
6 years, 6 months ago (2014-06-20 15:56:03 UTC) #1
robliao
https://codereview.chromium.org/340403004/diff/40001/components/dom_distiller/core/profile_utils_android.cc File components/dom_distiller/core/profile_utils_android.cc (right): https://codereview.chromium.org/340403004/diff/40001/components/dom_distiller/core/profile_utils_android.cc#newcode17 components/dom_distiller/core/profile_utils_android.cc:17: void SetHighContrastMode(JNIEnv* env, jobject obj, jlong ptr, Apply 80 ...
6 years, 6 months ago (2014-06-20 21:13:45 UTC) #2
sunangel
See new patch. FYI, "profile_utils_android.cc" name changed into "reader_mode_preferences_android.cc" https://codereview.chromium.org/340403004/diff/40001/components/dom_distiller/core/profile_utils_android.cc File components/dom_distiller/core/profile_utils_android.cc (right): https://codereview.chromium.org/340403004/diff/40001/components/dom_distiller/core/profile_utils_android.cc#newcode17 components/dom_distiller/core/profile_utils_android.cc:17: ...
6 years, 6 months ago (2014-06-24 00:03:43 UTC) #3
sunangel
PTAL
6 years, 6 months ago (2014-06-26 18:30:11 UTC) #4
robliao
https://codereview.chromium.org/340403004/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode11 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:11: /** Add one linebreak above here. https://codereview.chromium.org/340403004/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode19 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:19: public ...
6 years, 6 months ago (2014-06-26 18:42:16 UTC) #5
sunangel
PLAT, review is good to go. https://codereview.chromium.org/340403004/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/140001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode11 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:11: /** On 2014/06/26 ...
6 years, 6 months ago (2014-06-26 23:31:36 UTC) #6
sunangel
https://codereview.chromium.org/340403004/diff/140001/chrome/browser/android/chrome_jni_registrar.cc File chrome/browser/android/chrome_jni_registrar.cc (right): https://codereview.chromium.org/340403004/diff/140001/chrome/browser/android/chrome_jni_registrar.cc#newcode131 chrome/browser/android/chrome_jni_registrar.cc:131: { "DomDistillerServiceFactory", RegisterDomDistillerServiceFactory}, On 2014/06/26 18:42:15, robliao wrote: > ...
6 years, 5 months ago (2014-06-27 16:27:26 UTC) #7
robliao
https://codereview.chromium.org/340403004/diff/140001/components/dom_distiller/core/reader_mode_preferences_android.h File components/dom_distiller/core/reader_mode_preferences_android.h (right): https://codereview.chromium.org/340403004/diff/140001/components/dom_distiller/core/reader_mode_preferences_android.h#newcode11 components/dom_distiller/core/reader_mode_preferences_android.h:11: Yes. On 2014/06/27 16:27:26, sunangel wrote: > Do you ...
6 years, 5 months ago (2014-06-27 17:37:12 UTC) #8
sunangel
PTAL. https://codereview.chromium.org/340403004/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/180001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode13 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:13: * Returns Java DomDistillerService. On 2014/06/27 17:37:12, robliao ...
6 years, 5 months ago (2014-06-27 18:00:09 UTC) #9
robliao
https://codereview.chromium.org/340403004/diff/220001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/220001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode18 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:18: new HashMap<Profile, DomDistillerService>(); Does this need to be a ...
6 years, 5 months ago (2014-06-27 18:08:49 UTC) #10
sunangel
https://codereview.chromium.org/340403004/diff/220001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/220001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode18 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:18: new HashMap<Profile, DomDistillerService>(); I don't think so, already asked ...
6 years, 5 months ago (2014-06-27 18:16:29 UTC) #11
sunangel
PTAL. https://codereview.chromium.org/340403004/diff/220001/components/dom_distiller/core/dom_distiller_service_android.h File components/dom_distiller/core/dom_distiller_service_android.h (right): https://codereview.chromium.org/340403004/diff/220001/components/dom_distiller/core/dom_distiller_service_android.h#newcode21 components/dom_distiller/core/dom_distiller_service_android.h:21: On 2014/06/27 18:08:49, robliao wrote: > Remove linebreak ...
6 years, 5 months ago (2014-06-27 18:17:17 UTC) #12
robliao
On 2014/06/27 18:17:17, sunangel wrote: > PTAL. > > https://codereview.chromium.org/340403004/diff/220001/components/dom_distiller/core/dom_distiller_service_android.h > File components/dom_distiller/core/dom_distiller_service_android.h (right): > ...
6 years, 5 months ago (2014-06-27 21:21:59 UTC) #13
sunangel
6 years, 5 months ago (2014-06-27 21:24:56 UTC) #14
nyquist
https://codereview.chromium.org/340403004/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode6 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:6: Nit: Ordering. See https://source.android.com/source/code-style.html#order-import-statements https://codereview.chromium.org/340403004/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode17 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:17: static HashMap<Profile, DomDistillerService> ...
6 years, 5 months ago (2014-06-30 20:33:24 UTC) #15
sunangel
New patch set. https://codereview.chromium.org/340403004/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/240001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode6 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:6: On 2014/06/30 20:33:22, nyquist wrote: > ...
6 years, 5 months ago (2014-07-07 21:21:30 UTC) #16
nyquist
https://codereview.chromium.org/340403004/diff/350001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/350001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode29 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:29: DomDistillerService mDDS = sServiceMap.get(profile); s/mDDS/service/ https://codereview.chromium.org/340403004/diff/350001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode36 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:36: private static ...
6 years, 5 months ago (2014-07-08 01:02:35 UTC) #17
sunangel
When reviewing, please compare patch 14 (base after syncing) with patch 15 (new patch) to ...
6 years, 5 months ago (2014-07-08 20:41:01 UTC) #18
angelasun55
Added test, see new patch.
6 years, 5 months ago (2014-07-09 17:20:44 UTC) #19
nyquist
https://codereview.chromium.org/340403004/diff/570001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/570001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode15 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:15: * DomDistillerServiceFactory maps Profiles to DomDistillerServices. Nit: Maybe "to ...
6 years, 5 months ago (2014-07-09 23:49:05 UTC) #20
sunangel
New patch. https://codereview.chromium.org/340403004/diff/570001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/570001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode15 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:15: * DomDistillerServiceFactory maps Profiles to DomDistillerServices. On ...
6 years, 5 months ago (2014-07-10 14:31:53 UTC) #21
nyquist
https://codereview.chromium.org/340403004/diff/570001/chrome/browser/android/chrome_jni_registrar.cc File chrome/browser/android/chrome_jni_registrar.cc (right): https://codereview.chromium.org/340403004/diff/570001/chrome/browser/android/chrome_jni_registrar.cc#newcode129 chrome/browser/android/chrome_jni_registrar.cc:129: {"DomDistillerServiceFactory", On 2014/07/10 14:31:52, sunangel wrote: > On 2014/07/09 ...
6 years, 5 months ago (2014-07-10 15:59:59 UTC) #22
sunangel
See new patch. https://codereview.chromium.org/340403004/diff/570001/chrome/browser/android/chrome_jni_registrar.cc File chrome/browser/android/chrome_jni_registrar.cc (right): https://codereview.chromium.org/340403004/diff/570001/chrome/browser/android/chrome_jni_registrar.cc#newcode129 chrome/browser/android/chrome_jni_registrar.cc:129: {"DomDistillerServiceFactory", Yes sorry, base was incorrect. ...
6 years, 5 months ago (2014-07-10 20:19:56 UTC) #23
nyquist
Also, please add a more thorough change description. https://codereview.chromium.org/340403004/diff/690001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/690001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode30 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java:30: Profile ...
6 years, 5 months ago (2014-07-11 00:19:03 UTC) #24
sunangel
Not sure if the new change description is good enough... https://codereview.chromium.org/340403004/diff/690001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java (right): https://codereview.chromium.org/340403004/diff/690001/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java#newcode30 ...
6 years, 5 months ago (2014-07-11 15:47:48 UTC) #25
nyquist
https://codereview.chromium.org/340403004/diff/710001/components/dom_distiller/core/dom_distiller_service_android.cc File components/dom_distiller/core/dom_distiller_service_android.cc (right): https://codereview.chromium.org/340403004/diff/710001/components/dom_distiller/core/dom_distiller_service_android.cc#newcode29 components/dom_distiller/core/dom_distiller_service_android.cc:29: * Returns native pointer to native DistilledPagePrefs registered with ...
6 years, 5 months ago (2014-07-14 18:06:25 UTC) #26
nyquist
Could you please rebase this CL as well?
6 years, 5 months ago (2014-07-14 18:09:40 UTC) #27
nyquist
How about something like this for the description? " Java wrapper for DistilledPagePrefs. Adds Java ...
6 years, 5 months ago (2014-07-14 20:11:43 UTC) #28
sunangel
done, see new patch. https://codereview.chromium.org/340403004/diff/710001/components/dom_distiller/core/dom_distiller_service_android.cc File components/dom_distiller/core/dom_distiller_service_android.cc (right): https://codereview.chromium.org/340403004/diff/710001/components/dom_distiller/core/dom_distiller_service_android.cc#newcode29 components/dom_distiller/core/dom_distiller_service_android.cc:29: * Returns native pointer to ...
6 years, 5 months ago (2014-07-15 15:39:51 UTC) #29
nyquist
lgtm
6 years, 5 months ago (2014-07-15 22:39:03 UTC) #30
sunangel
The CQ bit was checked by sunangel@chromium.org
6 years, 5 months ago (2014-07-16 18:36:09 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sunangel@chromium.org/340403004/900001
6 years, 5 months ago (2014-07-16 18:41:31 UTC) #32
commit-bot: I haz the power
6 years, 5 months ago (2014-07-17 10:57:15 UTC) #33
Message was sent while issue was closed.
Change committed as 283742

Powered by Google App Engine
This is Rietveld 408576698