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

Issue 465413002: Minor cleanup of EnrollmentHandlerChromeOS. (Closed)

Created:
6 years, 4 months ago by Thiemo Nagel
Modified:
6 years, 3 months ago
Reviewers:
Joao da Silva
CC:
chromium-reviews, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, oshima+watch_chromium.org, nkostylev+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Minor cleanup of EnrollmentHandlerChromeOS. Rename private methods for consistency: Start*() for something that invokes an async operation and Handle*() for something that gets called back by such an operation. That leaves On*() reserved for observers. Also update some comments. Lastly, use the current state key from the parameter passed to HandleStateKeysResult() instead of requesting it again from the broker (line 222). EnrollmentHandlerChromeOS and EnrollmentScreen: Don't report metrics on unreached code paths. Generally, remove some obsolete instances of NOTREACHED() after switches over enums: The compiler ensures that all enum values are covered, there's no need to complicate the code by checking the same thing again. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290841 Committed: https://crrev.com/5376cbf34cac7704894ab5d6955f15063df5ebda Cr-Commit-Position: refs/heads/master@{#293640}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Rebase. #

Patch Set 3 : Address Joao's comments. #

Patch Set 4 : More cleanup. #

Patch Set 5 : Rebase. #

Patch Set 6 : Remove additional obsolete NOTREACHED() calls. #

Patch Set 7 : Use single space at end of sentence. #

Patch Set 8 : Fix compilation for AMD64 Chromium OS. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -98 lines) Patch
M chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/enrollment/enrollment_screen.cc View 1 2 3 4 5 6 7 4 chunks +36 lines, -45 lines 0 comments Download
M chrome/browser/chromeos/policy/auto_enrollment_client.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/enrollment_handler_chromeos.h View 1 2 3 4 1 chunk +14 lines, -15 lines 0 comments Download
M chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc View 1 2 3 4 5 6 12 chunks +32 lines, -33 lines 0 comments Download
M chrome/browser/chromeos/policy/server_backed_state_keys_broker.h View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (1 generated)
Thiemo Nagel
Hi Joao, could you please be so kind to take a look? Many thanks! Thiemo
6 years, 4 months ago (2014-08-13 15:48:00 UTC) #1
Joao da Silva
While some people think that NOTREACHED() shouldn't have any logic around it, I think that ...
6 years, 4 months ago (2014-08-14 12:11:11 UTC) #2
Thiemo Nagel
https://codereview.chromium.org/465413002/diff/1/chrome/browser/chromeos/login/enrollment/enrollment_screen.cc File chrome/browser/chromeos/login/enrollment/enrollment_screen.cc (left): https://codereview.chromium.org/465413002/diff/1/chrome/browser/chromeos/login/enrollment/enrollment_screen.cc#oldcode128 chrome/browser/chromeos/login/enrollment/enrollment_screen.cc:128: UMAFailure(policy::kMetricEnrollmentOtherFailed); It's after a switch on an enum. The ...
6 years, 4 months ago (2014-08-14 14:52:37 UTC) #3
Thiemo Nagel
Hi Joao, I think this is ready now. Could you please take another look? Thank ...
6 years, 4 months ago (2014-08-20 11:45:38 UTC) #4
Joao da Silva
lgtm I'd still favor the single space in the comment for consistency reasons. Since it ...
6 years, 4 months ago (2014-08-20 12:32:58 UTC) #5
Thiemo Nagel
Thank you! https://codereview.chromium.org/465413002/diff/1/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc File chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc (right): https://codereview.chromium.org/465413002/diff/1/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc#newcode237 chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc:237: // Do nothing. StartRegistration() will be called ...
6 years, 4 months ago (2014-08-20 13:26:15 UTC) #6
Thiemo Nagel
The CQ bit was checked by tnagel@chromium.org
6 years, 4 months ago (2014-08-20 13:26:22 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tnagel@chromium.org/465413002/140001
6 years, 4 months ago (2014-08-20 13:27:19 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-20 14:25:40 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-20 14:30:10 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/7502)
6 years, 4 months ago (2014-08-20 14:30:12 UTC) #11
Thiemo Nagel
The CQ bit was checked by tnagel@chromium.org
6 years, 4 months ago (2014-08-20 14:37:26 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tnagel@chromium.org/465413002/140001
6 years, 4 months ago (2014-08-20 14:38:15 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-20 14:43:25 UTC) #14
commit-bot: I haz the power
Committed patchset #7 (140001) as 290841
6 years, 4 months ago (2014-08-20 14:51:39 UTC) #15
jennyz
A revert of this CL (patchset #7) has been created in https://codereview.chromium.org/477243003/ by jennyz@chromium.org. The ...
6 years, 4 months ago (2014-08-20 16:55:34 UTC) #16
Thiemo Nagel
Fixed compile errors, re-landing.
6 years, 3 months ago (2014-09-06 20:31:22 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tnagel@chromium.org/465413002/160001
6 years, 3 months ago (2014-09-06 20:32:42 UTC) #19
commit-bot: I haz the power
Committed patchset #8 (id:160001) as 0d8b901df85e7714335737eecdce443653dcf5e7
6 years, 3 months ago (2014-09-06 22:23:00 UTC) #20
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:43:32 UTC) #21
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/5376cbf34cac7704894ab5d6955f15063df5ebda
Cr-Commit-Position: refs/heads/master@{#293640}

Powered by Google App Engine
This is Rietveld 408576698