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

Issue 12313075: [sync] Upstream the Android ProfileSyncService (Closed)

Created:
7 years, 10 months ago by nyquist
Modified:
7 years, 9 months ago
CC:
chromium-reviews, Raghu Simha, haitaol1, akalin, shashi
Visibility:
Public.

Description

[sync] Upstream the Android ProfileSyncService This creates a Java-layer ProfileSyncService that is the only class that should be used from downstream Chrome for Android. The native counterparts should not be used. In the process, a hashing utility and also, some identity code and their respective tests had to be upstreamed. No functional changes have been made to them. BUG=159203 TBR=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186798

Patch Set 1 #

Total comments: 64

Patch Set 2 : Addressed comments #

Total comments: 11

Patch Set 3 : Addressed some extra comments #

Patch Set 4 : Rebased which required moving strings to GRD. Removed unused imports and fixed a long line. #

Total comments: 18

Patch Set 5 : Addressed most comments #

Patch Set 6 : Rebased #

Patch Set 7 : Rebase #

Patch Set 8 : Added bitmask for model type selection #

Total comments: 2

Patch Set 9 : Addressed hashing comments, and added findbugs exception #

Patch Set 10 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1923 lines, -16 lines) Patch
M build/android/findbugs_filter/findbugs_known_bugs.txt View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/java/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/android/java/ModelTypeSelection.template View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/identity/SettingsSecureBasedIdentificationGenerator.java View 1 2 3 4 5 6 7 8 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/identity/UniqueIdentificationGenerator.java View 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/identity/UniqueIdentificationGeneratorFactory.java View 1 chunk +69 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/sync/GoogleServiceAuthError.java View 1 chunk +88 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java View 1 2 3 4 5 6 7 1 chunk +537 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/util/HashUtil.java View 1 2 3 4 5 6 7 8 1 chunk +62 lines, -0 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/identity/SettingsSecureBasedIdentificationGeneratorTest.java View 1 2 3 4 5 6 7 8 1 chunk +78 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/identity/UniqueIdentificationGeneratorFactoryTest.java View 1 chunk +59 lines, -0 lines 0 comments Download
A chrome/android/javatests/src/org/chromium/chrome/browser/util/HashUtilTest.java View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/sync/glue/session_model_associator.cc View 1 2 3 4 5 6 7 4 chunks +3 lines, -13 lines 0 comments Download
A chrome/browser/sync/profile_sync_service_android.h View 1 2 3 4 5 6 7 1 chunk +220 lines, -0 lines 0 comments Download
A chrome/browser/sync/profile_sync_service_android.cc View 1 2 3 4 5 6 7 1 chunk +542 lines, -0 lines 0 comments Download
A chrome/browser/sync/profile_sync_service_model_type_selection_android.h View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/sync/sync_prefs.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/sync/sync_prefs.cc View 1 2 3 4 5 6 7 2 chunks +16 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 3 chunks +16 lines, -0 lines 0 comments Download
A sync/android/java/src/org/chromium/sync/internal_api/pub/SyncDecryptionPassphraseType.java View 1 chunk +68 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
nyquist
yfriedman: chrome/android/java[tests], chrome/browser/android, sync/android/java atwilson/tim: chrome/browser/sync, sync/android/java
7 years, 10 months ago (2013-02-22 21:42:09 UTC) #1
Yaron
didn't get through all of pssa.cc but here's initial comments. https://codereview.chromium.org/12313075/diff/1/chrome/android/java/res/values/strings.xml File chrome/android/java/res/values/strings.xml (right): https://codereview.chromium.org/12313075/diff/1/chrome/android/java/res/values/strings.xml#newcode43 ...
7 years, 10 months ago (2013-02-23 01:38:49 UTC) #2
Andrew T Wilson (Slow)
Overall LG, but some nits. https://codereview.chromium.org/12313075/diff/1/chrome/browser/sync/profile_sync_service_android.cc File chrome/browser/sync/profile_sync_service_android.cc (right): https://codereview.chromium.org/12313075/diff/1/chrome/browser/sync/profile_sync_service_android.cc#newcode59 chrome/browser/sync/profile_sync_service_android.cc:59: LOG(ERROR) << "Browser process ...
7 years, 9 months ago (2013-02-25 16:23:35 UTC) #3
nyquist
Addressed comments. PTAL https://codereview.chromium.org/12313075/diff/1/chrome/android/java/res/values/strings.xml File chrome/android/java/res/values/strings.xml (right): https://codereview.chromium.org/12313075/diff/1/chrome/android/java/res/values/strings.xml#newcode43 chrome/android/java/res/values/strings.xml:43: <!-- Sync error string for generic ...
7 years, 9 months ago (2013-02-27 05:19:16 UTC) #4
Andrew T Wilson (Slow)
https://codereview.chromium.org/12313075/diff/1/chrome/browser/sync/profile_sync_service_android.h File chrome/browser/sync/profile_sync_service_android.h (right): https://codereview.chromium.org/12313075/diff/1/chrome/browser/sync/profile_sync_service_android.h#newcode43 chrome/browser/sync/profile_sync_service_android.h:43: // |auth_token| is empty, a new |auth_token| is requested ...
7 years, 9 months ago (2013-02-27 12:02:35 UTC) #5
Yaron
lgtm https://codereview.chromium.org/12313075/diff/1018/chrome/browser/sync/profile_sync_service_android.cc File chrome/browser/sync/profile_sync_service_android.cc (right): https://codereview.chromium.org/12313075/diff/1018/chrome/browser/sync/profile_sync_service_android.cc#newcode72 chrome/browser/sync/profile_sync_service_android.cc:72: if (!sync_service_->HasObserver(this)) { only called in ctor, remove ...
7 years, 9 months ago (2013-02-27 23:10:25 UTC) #6
nyquist
https://codereview.chromium.org/12313075/diff/1018/chrome/browser/sync/profile_sync_service_android.cc File chrome/browser/sync/profile_sync_service_android.cc (right): https://codereview.chromium.org/12313075/diff/1018/chrome/browser/sync/profile_sync_service_android.cc#newcode72 chrome/browser/sync/profile_sync_service_android.cc:72: if (!sync_service_->HasObserver(this)) { On 2013/02/27 23:10:25, Yaron wrote: > ...
7 years, 9 months ago (2013-02-28 22:38:50 UTC) #7
nyquist
tim/drew: PTAL. All comments should have been addressed by now.
7 years, 9 months ago (2013-03-01 00:56:43 UTC) #8
tim (not reviewing)
Some comments! https://codereview.chromium.org/12313075/diff/22001/chrome/browser/sync/profile_sync_service_android.cc File chrome/browser/sync/profile_sync_service_android.cc (right): https://codereview.chromium.org/12313075/diff/22001/chrome/browser/sync/profile_sync_service_android.cc#newcode80 chrome/browser/sync/profile_sync_service_android.cc:80: InvalidateAuthToken(); Is there a good reason we're ...
7 years, 9 months ago (2013-03-01 08:09:15 UTC) #9
nyquist
tim: PTAL. Addressed all comments. https://codereview.chromium.org/12313075/diff/22001/chrome/browser/sync/profile_sync_service_android.cc File chrome/browser/sync/profile_sync_service_android.cc (right): https://codereview.chromium.org/12313075/diff/22001/chrome/browser/sync/profile_sync_service_android.cc#newcode80 chrome/browser/sync/profile_sync_service_android.cc:80: InvalidateAuthToken(); On 2013/03/01 08:09:16, ...
7 years, 9 months ago (2013-03-07 18:33:16 UTC) #10
nyquist
dfalcantara: PTAL at chrome/android/java[tests]/src/org/chromium/chrome/browser/identity/ and chrome/android/java[tests]/src/org/chromium/chrome/browser/util/HashUtil[Test].java
7 years, 9 months ago (2013-03-07 18:42:18 UTC) #11
gone
On 2013/03/07 18:42:18, nyquist wrote: > dfalcantara: PTAL at > chrome/android/java[tests]/src/org/chromium/chrome/browser/identity/ and > chrome/android/java[tests]/src/org/chromium/chrome/browser/util/HashUtil[Test].java
7 years, 9 months ago (2013-03-07 19:17:45 UTC) #12
gone
LGTM for the parts you asked me to look at https://codereview.chromium.org/12313075/diff/37001/chrome/android/java/src/org/chromium/chrome/browser/util/HashUtil.java File chrome/android/java/src/org/chromium/chrome/browser/util/HashUtil.java (right): https://codereview.chromium.org/12313075/diff/37001/chrome/android/java/src/org/chromium/chrome/browser/util/HashUtil.java#newcode24 ...
7 years, 9 months ago (2013-03-07 19:19:59 UTC) #13
nyquist
dfalcantara: Addressed the params-concern you had. Feel free to take a look. https://codereview.chromium.org/12313075/diff/37001/chrome/android/java/src/org/chromium/chrome/browser/util/HashUtil.java File chrome/android/java/src/org/chromium/chrome/browser/util/HashUtil.java ...
7 years, 9 months ago (2013-03-07 21:19:57 UTC) #14
gone
lgtm Thanks!
7 years, 9 months ago (2013-03-07 21:22:14 UTC) #15
tim (not reviewing)
On 2013/03/07 21:22:14, dfalcantara wrote: > lgtm > > Thanks! LGTM, thanks
7 years, 9 months ago (2013-03-07 21:35:13 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/12313075/43001
7 years, 9 months ago (2013-03-07 21:48:22 UTC) #17
commit-bot: I haz the power
Presubmit check for 12313075-43001 failed and returned exit status 1. INFO:root:Found 24 file(s). INFO:PRESUBMIT:Skipping pylint: ...
7 years, 9 months ago (2013-03-07 21:48:41 UTC) #18
nyquist
sky: TBRing for trivial gyp changes.
7 years, 9 months ago (2013-03-07 21:52:07 UTC) #19
nyquist
Committed patchset #10 manually as r186798.
7 years, 9 months ago (2013-03-07 22:22:21 UTC) #20
Yaron
https://codereview.chromium.org/12313075/diff/1/chrome/browser/sync/profile_sync_service_android.cc File chrome/browser/sync/profile_sync_service_android.cc (right): https://codereview.chromium.org/12313075/diff/1/chrome/browser/sync/profile_sync_service_android.cc#newcode218 chrome/browser/sync/profile_sync_service_android.cc:218: profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, name); On 2013/02/27 05:19:16, nyquist wrote: > On ...
7 years, 9 months ago (2013-03-12 02:26:49 UTC) #21
Yaron
https://codereview.chromium.org/12313075/diff/1/chrome/browser/sync/profile_sync_service_android.cc File chrome/browser/sync/profile_sync_service_android.cc (right): https://codereview.chromium.org/12313075/diff/1/chrome/browser/sync/profile_sync_service_android.cc#newcode218 chrome/browser/sync/profile_sync_service_android.cc:218: profile_->GetPrefs()->SetString(prefs::kGoogleServicesUsername, name); On 2013/03/12 02:26:50, Yaron wrote: > On ...
7 years, 9 months ago (2013-03-12 02:31:14 UTC) #22
Andrew T Wilson (Slow)
On 2013/03/12 02:31:14, Yaron wrote: > > It seems like this causes us to only ...
7 years, 9 months ago (2013-03-12 08:43:11 UTC) #23
tim (not reviewing)
7 years, 9 months ago (2013-03-12 17:37:00 UTC) #24
Message was sent while issue was closed.
On 2013/03/12 08:43:11, Andrew T Wilson wrote:
> On 2013/03/12 02:31:14, Yaron wrote:
> > > It seems like this causes us to only save kGoogleServicesLastUserName and
> not
> > > kGoogleServicesUserName. At least, the code before set
> kGoogleServicesUserName
> > > and SetAuthenticatedUsername only sets kGoogleServicesLastUserName. Where
is
> > > kGoogleServicesUserName supposed to be set?
> > 
> > It looks like it's set down in UnsuppressAndStart so this might be a red
> herring
> 
> Sigh. I thought SetAuthenticatedUsername() set that pref, but it doesn't. So
you
> have to set it manually.
> 
> I blame Tim, who refactored the code to create Get/SetAuthenticatedUsername(),
> but never actually went the final step to make those the only interfaces to
> kGoogleServicesUsername. TIIIIIIMMMMMMM!!!!!!

It is kinda my fault, I agree :( Some folks were unhappy with that proposal
though, because you can always set it via prefs:: even though you're not
"supposed to"; I still think it makes sense, but it seems hard to prevent
situations exactly like what the initial version of this patch here tried to do
:/  In any case, I'll see what I can do.

Powered by Google App Engine
This is Rietveld 408576698