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

Issue 258743005: Enable Enterprise enrollment on desktop builds. (Closed)

Created:
6 years, 8 months ago by Joao da Silva
Modified:
6 years, 7 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Visibility:
Public.

Description

Enable Enterprise enrollment on desktop builds. This change implements some of the DBus stub methods so that enterprise enrollment works on desktop builds. That will make development of features that depend on enrollment faster for developers that use this workflow (e.g. for kiosk enterprise apps, public accounts, testing some device policies, etc). - Override some of the directories and files involved with the enrollment state - Simple stub implementation of the DBus calls involved - Write a persistent cache of the install attributes - Cleaned up the stub for user cloud policy and made them persistent too - Updated some tests This change doesn't affect production code. TBR=jochen@chromium.org BUG=240269, 367674 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267640

Patch Set 1 #

Patch Set 2 : fixed tests #

Patch Set 3 : cleanups, win linking still broken #

Patch Set 4 : fix linkage visibility of policy protobufs #

Total comments: 4

Patch Set 5 : added arg to PathService::OverrideAndCreateIfNeeded, added test for FakeCryptohomeClient::InstallAt… #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -164 lines) Patch
M base/path_service.h View 1 2 3 4 1 chunk +9 lines, -2 lines 0 comments Download
M base/path_service.cc View 1 2 3 4 2 chunks +10 lines, -5 lines 0 comments Download
M base/path_service_unittest.cc View 1 2 3 4 2 chunks +26 lines, -1 line 0 comments Download
M chrome/app/chrome_main_delegate.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 2 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/chromeos/login/kiosk_browsertest.cc View 1 2 3 3 chunks +7 lines, -11 lines 0 comments Download
M chrome/browser/chromeos/policy/device_policy_cros_browser_test.h View 1 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc View 1 2 4 chunks +20 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/policy/enterprise_install_attributes_unittest.cc View 1 2 3 4 10 chunks +85 lines, -52 lines 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc View 5 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/settings/device_settings_test_helper.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/chromeos/settings/device_settings_test_helper.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_apitest.cc View 1 2 3 4 8 chunks +8 lines, -8 lines 0 comments Download
M chromeos/DEPS View 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/chromeos.gyp View 2 chunks +2 lines, -0 lines 0 comments Download
M chromeos/chromeos_paths.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M chromeos/chromeos_paths.cc View 1 2 3 4 2 chunks +24 lines, -0 lines 0 comments Download
M chromeos/dbus/fake_cryptohome_client.cc View 3 chunks +73 lines, -2 lines 5 comments Download
M chromeos/dbus/fake_session_manager_client.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chromeos/dbus/fake_session_manager_client.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chromeos/dbus/mock_session_manager_client.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chromeos/dbus/session_manager_client.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M chromeos/dbus/session_manager_client.cc View 1 2 3 6 chunks +98 lines, -41 lines 0 comments Download
M chromeos/system/statistics_provider.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M components/policy.gypi View 1 2 3 5 chunks +12 lines, -2 lines 0 comments Download
A components/policy/policy_proto_export.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
Joao da Silva
Please have a look: @Brett: please review base/path_service.cc. I believe you introduced the code that ...
6 years, 7 months ago (2014-04-28 10:22:13 UTC) #1
Nikita (slow)
On 2014/04/28 10:22:13, Joao da Silva wrote: > @Nikita: please review chrome/browser/chromeos [/login] lgtm
6 years, 7 months ago (2014-04-28 10:34:43 UTC) #2
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 7 months ago (2014-04-28 11:24:56 UTC) #3
Joao da Silva
The CQ bit was unchecked by joaodasilva@chromium.org
6 years, 7 months ago (2014-04-28 11:24:57 UTC) #4
pastarmovj
lgtm
6 years, 7 months ago (2014-04-28 13:41:53 UTC) #5
Joao da Silva
This is now ready to go, linking on windows works too. brettw, satorux: friendly ping ...
6 years, 7 months ago (2014-04-29 16:09:04 UTC) #6
brettw
https://codereview.chromium.org/258743005/diff/60001/base/path_service.h File base/path_service.h (right): https://codereview.chromium.org/258743005/diff/60001/base/path_service.h#newcode61 base/path_service.h:61: static void OverrideWithAbsolutePath(int key, const base::FilePath& path); I'd rather ...
6 years, 7 months ago (2014-04-29 22:41:50 UTC) #7
satorux1
https://codereview.chromium.org/258743005/diff/60001/chromeos/dbus/fake_cryptohome_client.cc File chromeos/dbus/fake_cryptohome_client.cc (right): https://codereview.chromium.org/258743005/diff/60001/chromeos/dbus/fake_cryptohome_client.cc#newcode274 chromeos/dbus/fake_cryptohome_client.cc:274: // low-level protobuf API instead to just write the ...
6 years, 7 months ago (2014-04-29 23:50:12 UTC) #8
Joao da Silva
@brettw: please have another look at path_service; I've added a new test for the new ...
6 years, 7 months ago (2014-04-30 13:08:06 UTC) #9
brettw
base lgtm
6 years, 7 months ago (2014-04-30 16:24:34 UTC) #10
satorux1
chromeos/... LGTM
6 years, 7 months ago (2014-05-01 10:23:11 UTC) #11
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 7 months ago (2014-05-01 10:48:12 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/258743005/80001
6 years, 7 months ago (2014-05-01 10:48:29 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-01 11:02:33 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium
6 years, 7 months ago (2014-05-01 11:02:33 UTC) #15
Joao da Silva
Jochen to TBR for the mechanical changes to chrome/app/chrome_main_delegate.cc chrome/browser/extensions/api/file_system/file_system_apitest.cc
6 years, 7 months ago (2014-05-01 11:16:38 UTC) #16
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 7 months ago (2014-05-01 11:16:48 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/258743005/80001
6 years, 7 months ago (2014-05-01 11:16:52 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-01 11:48:37 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium
6 years, 7 months ago (2014-05-01 11:48:37 UTC) #20
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 7 months ago (2014-05-01 12:55:43 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/258743005/80001
6 years, 7 months ago (2014-05-01 12:56:06 UTC) #22
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-01 13:49:43 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium
6 years, 7 months ago (2014-05-01 13:49:43 UTC) #24
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 7 months ago (2014-05-01 15:39:59 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/258743005/80001
6 years, 7 months ago (2014-05-01 15:40:33 UTC) #26
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-01 17:02:59 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium
6 years, 7 months ago (2014-05-01 17:03:00 UTC) #28
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 7 months ago (2014-05-01 17:08:47 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/258743005/80001
6 years, 7 months ago (2014-05-01 17:11:28 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-01 18:16:20 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel on tryserver.chromium
6 years, 7 months ago (2014-05-01 18:16:21 UTC) #32
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 7 months ago (2014-05-01 20:25:50 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/258743005/80001
6 years, 7 months ago (2014-05-01 20:27:45 UTC) #34
commit-bot: I haz the power
Change committed as 267640
6 years, 7 months ago (2014-05-01 21:54:01 UTC) #35
falken
On 2014/05/01 21:54:01, I haz the power (commit-bot) wrote: > Change committed as 267640 Sorry ...
6 years, 7 months ago (2014-05-02 05:21:15 UTC) #36
falken
A revert of this CL has been created in https://codereview.chromium.org/265013002/ by falken@chromium.org. The reason for ...
6 years, 7 months ago (2014-05-02 05:22:20 UTC) #37
Mattias Nissler (ping if slow)
https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_cryptohome_client.cc File chromeos/dbus/fake_cryptohome_client.cc (right): https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_cryptohome_client.cc#newcode274 chromeos/dbus/fake_cryptohome_client.cc:274: // low-level protobuf API instead to just write the ...
6 years, 7 months ago (2014-05-02 08:09:28 UTC) #38
Joao da Silva
https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_cryptohome_client.cc File chromeos/dbus/fake_cryptohome_client.cc (right): https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_cryptohome_client.cc#newcode274 chromeos/dbus/fake_cryptohome_client.cc:274: // low-level protobuf API instead to just write the ...
6 years, 7 months ago (2014-05-02 08:22:09 UTC) #39
Mattias Nissler (ping if slow)
https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_cryptohome_client.cc File chromeos/dbus/fake_cryptohome_client.cc (right): https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_cryptohome_client.cc#newcode274 chromeos/dbus/fake_cryptohome_client.cc:274: // low-level protobuf API instead to just write the ...
6 years, 7 months ago (2014-05-02 08:34:00 UTC) #40
Joao da Silva
https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_cryptohome_client.cc File chromeos/dbus/fake_cryptohome_client.cc (right): https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_cryptohome_client.cc#newcode274 chromeos/dbus/fake_cryptohome_client.cc:274: // low-level protobuf API instead to just write the ...
6 years, 7 months ago (2014-05-02 08:43:28 UTC) #41
Mattias Nissler (ping if slow)
6 years, 7 months ago (2014-05-02 09:32:58 UTC) #42
Message was sent while issue was closed.
https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_crypt...
File chromeos/dbus/fake_cryptohome_client.cc (right):

https://codereview.chromium.org/258743005/diff/80001/chromeos/dbus/fake_crypt...
chromeos/dbus/fake_cryptohome_client.cc:274: // low-level protobuf API instead
to just write the name-value pairs.
On 2014/05/02 08:43:29, Joao da Silva wrote:
> On 2014/05/02 08:34:01, Mattias Nissler wrote:
> > On 2014/05/02 08:22:10, Joao da Silva wrote:
> > > On 2014/05/02 08:09:29, Mattias Nissler wrote:
> > > > Are you serious? Why not just place a copy of the protobuf file or find
a
> > way
> > > to
> > > > make it accessible? This is a big hack.
> > > 
> > > I don't think we want to have a copy that may get out of sync and that may
> be
> > > mistaken for the real file.
> > 
> > Protobufs need to be backward-compatible, so I don't a copy is too bad.
Also,
> > your code here gets out of sync just as well, and is much harder to fix.
> > 
> 
> That's fair.
> 
> > > 
> > > Code at //chromeos can't include files from //chrome, so the only way to
> make
> > it
> > > accessible is to move the protobuf. However that requires creating yet
> another
> > > git mirror and updating the chromeos packages again, and IMO it's not
worth
> > the
> > > hassle.
> > > 
> > > What is it that you find so surprising about this implementation?
> > 
> > Maintenance sucks - you have to understand the details of the protobuf wire
> > format to be able to understand and fix this.
> 
> Indeed, but as you said above it needs to be backwards compatible so I don't
> expect this code to require updates.

That assumes (1) the code is entirely correct in its current form and (2) the
low-level protobuf API is not going to change. Even in the absence of these
points, writing code that is hard to read and maintain is something we try to
avoid :)

> 
> I'll just bite the bullet and file a bug to move the protobuf.

Powered by Google App Engine
This is Rietveld 408576698