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

Issue 566933005: Do not display lock for hosted domains (Closed)

Created:
6 years, 3 months ago by Mike Lerman
Modified:
6 years, 2 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, tfarina, rginda+watch_chromium.org, yoshiki+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Do not display lock for hosted domains BUG=413685 R=noms@chromium.org TEST=Sign in to a profile with an @gmail.com or @google.com account, lock should be available. Sign in with another other domain (such as chromium.org) and lock will not be available. Committed: https://crrev.com/f3a2e5bda7e28493a9c013722cf9cc77c0bfc52b Cr-Commit-Position: refs/heads/master@{#297839}

Patch Set 1 #

Total comments: 18

Patch Set 2 : Undo edit on service flag fetcher #

Patch Set 3 : Monica's initial comments #

Patch Set 4 : Unit tests #

Total comments: 16

Patch Set 5 : Small patch for unit tests #

Patch Set 6 : Improved tests, more comments #

Total comments: 8

Patch Set 7 : Remove trim #

Patch Set 8 : Hide rather than disable lock for hd users #

Total comments: 10

Patch Set 9 : noms nits #

Patch Set 10 : Roger's Yak #

Patch Set 11 : Change to a hosted domain preference. Fix unit tests. #

Total comments: 4

Patch Set 12 : Move preference into signin component; remove version pref #

Patch Set 13 : Handle a null in unit tests #

Total comments: 21

Patch Set 14 : msw comments #

Patch Set 15 : Handle a unit test null; better OS ifdefs #

Patch Set 16 : ChromeOS tests #

Patch Set 17 : ChromeOS test - part deux #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -145 lines) Patch
M chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/gaia_info_update_service.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/profiles/gaia_info_update_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +30 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_downloader.h View 1 2 3 4 5 6 7 8 9 6 chunks +17 lines, -4 lines 0 comments Download
M chrome/browser/profiles/profile_downloader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +86 lines, -89 lines 0 comments Download
M chrome/browser/profiles/profile_downloader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +73 lines, -30 lines 0 comments Download
M chrome/browser/profiles/profile_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_window.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profiles_state.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profiles_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +19 lines, -3 lines 0 comments Download
M chrome/browser/signin/signin_manager_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/profiles/profile_chooser_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +58 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/profiles/profile_chooser_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M components/signin/core/browser/signin_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/signin/core/common/signin_pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/signin/core/common/signin_pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (4 generated)
Mike Lerman
Hey Monica, Here's the review for disabling lock for hosted domain users (googlers exempt). Please ...
6 years, 3 months ago (2014-09-12 19:16:18 UTC) #1
noms (inactive)
Oh man, before I even start reviewing this: this needs some tests :)
6 years, 3 months ago (2014-09-12 19:18:12 UTC) #2
noms (inactive)
Some initial comments https://codereview.chromium.org/566933005/diff/1/chrome/browser/profiles/gaia_info_update_service.cc File chrome/browser/profiles/gaia_info_update_service.cc (right): https://codereview.chromium.org/566933005/diff/1/chrome/browser/profiles/gaia_info_update_service.cc#newcode142 chrome/browser/profiles/gaia_info_update_service.cc:142: profile_->GetPrefs()->SetInteger(prefs::kProfileIsLockableVersion, You should add a comment ...
6 years, 3 months ago (2014-09-12 19:33:26 UTC) #3
Mike Lerman
Tests coming soon - stay tuned! https://codereview.chromium.org/566933005/diff/1/chrome/browser/profiles/gaia_info_update_service.cc File chrome/browser/profiles/gaia_info_update_service.cc (right): https://codereview.chromium.org/566933005/diff/1/chrome/browser/profiles/gaia_info_update_service.cc#newcode142 chrome/browser/profiles/gaia_info_update_service.cc:142: profile_->GetPrefs()->SetInteger(prefs::kProfileIsLockableVersion, On 2014/09/12 ...
6 years, 3 months ago (2014-09-15 14:08:56 UTC) #4
Mike Lerman
Here are the tests!
6 years, 3 months ago (2014-09-15 18:07:38 UTC) #5
Mike Lerman
Hi Mike, Disabling lock again, this time with different logic :) Can you review the ...
6 years, 3 months ago (2014-09-15 18:09:02 UTC) #7
msw
Please get Monica's approval, then I'll take a look.
6 years, 3 months ago (2014-09-15 18:16:57 UTC) #8
noms (inactive)
https://codereview.chromium.org/566933005/diff/1/chrome/browser/profiles/gaia_info_update_service.cc File chrome/browser/profiles/gaia_info_update_service.cc (right): https://codereview.chromium.org/566933005/diff/1/chrome/browser/profiles/gaia_info_update_service.cc#newcode142 chrome/browser/profiles/gaia_info_update_service.cc:142: profile_->GetPrefs()->SetInteger(prefs::kProfileIsLockableVersion, Hmm, but the comment would be useful here ...
6 years, 3 months ago (2014-09-15 18:52:41 UTC) #9
Mike Lerman
https://codereview.chromium.org/566933005/diff/1/chrome/browser/profiles/gaia_info_update_service.cc File chrome/browser/profiles/gaia_info_update_service.cc (right): https://codereview.chromium.org/566933005/diff/1/chrome/browser/profiles/gaia_info_update_service.cc#newcode142 chrome/browser/profiles/gaia_info_update_service.cc:142: profile_->GetPrefs()->SetInteger(prefs::kProfileIsLockableVersion, On 2014/09/15 18:52:40, Monica Dinculescu wrote: > Hmm, ...
6 years, 3 months ago (2014-09-15 19:51:42 UTC) #10
noms (inactive)
https://codereview.chromium.org/566933005/diff/100001/chrome/browser/profiles/gaia_info_update_service.cc File chrome/browser/profiles/gaia_info_update_service.cc (right): https://codereview.chromium.org/566933005/diff/100001/chrome/browser/profiles/gaia_info_update_service.cc#newcode141 chrome/browser/profiles/gaia_info_update_service.cc:141: const base::string16& hosted_domain = downloader->GetProfileHostedDomain(); Oh, you don't need ...
6 years, 3 months ago (2014-09-15 20:24:39 UTC) #11
Mike Lerman
https://codereview.chromium.org/566933005/diff/100001/chrome/browser/profiles/gaia_info_update_service.cc File chrome/browser/profiles/gaia_info_update_service.cc (right): https://codereview.chromium.org/566933005/diff/100001/chrome/browser/profiles/gaia_info_update_service.cc#newcode141 chrome/browser/profiles/gaia_info_update_service.cc:141: const base::string16& hosted_domain = downloader->GetProfileHostedDomain(); On 2014/09/15 20:24:39, Monica ...
6 years, 3 months ago (2014-09-15 20:41:09 UTC) #12
Mike Lerman
Updated this CL with the PM-sanctioned decision that Lock will be hidden rather than disabled ...
6 years, 3 months ago (2014-09-16 18:54:57 UTC) #13
Mike Lerman
Hi Roger, Monica asked me to add you as a reviewer. Can you please review ...
6 years, 3 months ago (2014-09-17 19:08:02 UTC) #15
noms (inactive)
I think this is lgtm with nits for me. I'd get a review from Roger ...
6 years, 3 months ago (2014-09-17 19:12:06 UTC) #16
Mike Lerman
https://codereview.chromium.org/566933005/diff/140001/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm File chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm (right): https://codereview.chromium.org/566933005/diff/140001/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm#newcode1183 chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm:1183: browser_->profile()->GetPrefs()->GetBoolean( On 2014/09/17 19:12:05, Monica Dinculescu wrote: > nit: ...
6 years, 3 months ago (2014-09-17 19:45:37 UTC) #17
Roger Tawa OOO till Jul 10th
https://codereview.chromium.org/566933005/diff/140001/chrome/browser/profiles/profile_downloader.cc File chrome/browser/profiles/profile_downloader.cc (right): https://codereview.chromium.org/566933005/diff/140001/chrome/browser/profiles/profile_downloader.cc#newcode292 chrome/browser/profiles/profile_downloader.cc:292: GURL(kUserEntryURL), net::URLFetcher::GET, this)); Please use gaia::GaiaOAuthClient to fetch user ...
6 years, 3 months ago (2014-09-17 21:11:01 UTC) #18
Mike Lerman
Your yak, sir. https://codereview.chromium.org/566933005/diff/140001/chrome/browser/profiles/profile_downloader.cc File chrome/browser/profiles/profile_downloader.cc (right): https://codereview.chromium.org/566933005/diff/140001/chrome/browser/profiles/profile_downloader.cc#newcode292 chrome/browser/profiles/profile_downloader.cc:292: GURL(kUserEntryURL), net::URLFetcher::GET, this)); On 2014/09/17 21:11:00, ...
6 years, 3 months ago (2014-09-18 16:00:29 UTC) #19
Roger Tawa OOO till Jul 10th
lgtm Thanks Mike!
6 years, 3 months ago (2014-09-18 20:59:22 UTC) #20
Mike Lerman
Updated this CL. The preference no longer tracks whether lock is available, but rather what ...
6 years, 3 months ago (2014-09-19 15:40:44 UTC) #21
Roger Tawa OOO till Jul 10th
lgtm with comments below https://codereview.chromium.org/566933005/diff/200001/chrome/common/pref_names.cc File chrome/common/pref_names.cc (right): https://codereview.chromium.org/566933005/diff/200001/chrome/common/pref_names.cc#newcode45 chrome/common/pref_names.cc:45: const char kProfileHostedDomain[] = "profile.hosted_domain"; ...
6 years, 3 months ago (2014-09-19 16:03:43 UTC) #22
noms (inactive)
lgtm with nits https://codereview.chromium.org/566933005/diff/200001/chrome/browser/profiles/profile.h File chrome/browser/profiles/profile.h (right): https://codereview.chromium.org/566933005/diff/200001/chrome/browser/profiles/profile.h#newcode148 chrome/browser/profiles/profile.h:148: // Null value for the kProfileHostedDomain ...
6 years, 3 months ago (2014-09-19 17:23:57 UTC) #23
Mike Lerman
https://codereview.chromium.org/566933005/diff/200001/chrome/browser/profiles/profile.h File chrome/browser/profiles/profile.h (right): https://codereview.chromium.org/566933005/diff/200001/chrome/browser/profiles/profile.h#newcode148 chrome/browser/profiles/profile.h:148: // Null value for the kProfileHostedDomain preference. On 2014/09/19 ...
6 years, 3 months ago (2014-09-19 18:51:41 UTC) #24
Mike Lerman
Hi Mike, Other reviews have provided their feedback. Over to you now - thanks! Mike
6 years, 3 months ago (2014-09-19 19:56:59 UTC) #25
msw
https://codereview.chromium.org/566933005/diff/240001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): https://codereview.chromium.org/566933005/diff/240001/chrome/browser/profiles/profile_manager.cc#newcode798 chrome/browser/profiles/profile_manager.cc:798: #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) This will include ...
6 years, 3 months ago (2014-09-19 21:47:40 UTC) #26
Mike Lerman
https://codereview.chromium.org/566933005/diff/240001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): https://codereview.chromium.org/566933005/diff/240001/chrome/browser/profiles/profile_manager.cc#newcode798 chrome/browser/profiles/profile_manager.cc:798: #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) On 2014/09/19 21:47:40, ...
6 years, 3 months ago (2014-09-21 00:19:36 UTC) #27
Mike Lerman
Also, made a small patch to handle a null from unit tests. https://codereview.chromium.org/566933005/diff/240001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc ...
6 years, 3 months ago (2014-09-22 13:18:56 UTC) #28
msw
lgtm https://codereview.chromium.org/566933005/diff/240001/chrome/browser/profiles/profile_manager.cc File chrome/browser/profiles/profile_manager.cc (right): https://codereview.chromium.org/566933005/diff/240001/chrome/browser/profiles/profile_manager.cc#newcode798 chrome/browser/profiles/profile_manager.cc:798: #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) On 2014/09/22 ...
6 years, 3 months ago (2014-09-22 19:58:09 UTC) #29
Mike Lerman
Hi Nikita, Can you take a look at my change to the unit test? Thanks! ...
6 years, 2 months ago (2014-09-29 20:43:11 UTC) #31
Nikita (slow)
lgtm
6 years, 2 months ago (2014-10-02 12:35:39 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/566933005/320001
6 years, 2 months ago (2014-10-02 15:27:58 UTC) #34
commit-bot: I haz the power
Committed patchset #17 (id:320001) as b6460455ea0501f8361dfddce885a0aeac0a3d68
6 years, 2 months ago (2014-10-02 15:33:29 UTC) #35
commit-bot: I haz the power
6 years, 2 months ago (2014-10-02 15:34:06 UTC) #36
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/f3a2e5bda7e28493a9c013722cf9cc77c0bfc52b
Cr-Commit-Position: refs/heads/master@{#297839}

Powered by Google App Engine
This is Rietveld 408576698