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

Issue 10912096: C++ reability review for gab. (Closed)

Created:
8 years, 3 months ago by gab
Modified:
8 years, 3 months ago
Reviewers:
dominich, robertshield
CC:
chromium-reviews, grt+watch_chromium.org, grt (UTC plus 2), tommi (sloooow) - chröme
Visibility:
Public.

Description

C++ reability review for gab. Added class ScopedTokenPrivilege in setup_util.[h|cc] to allow elevation of a process' privilege in the current scope while making sure we don't keep the privilege later (as these powerful privileges should be held for as little time as possible). This class is used in uninstall.cc and tested in setup_util_unittest.cc; I left the other files around for you to understand where this all hooks up. Original review: https://chromiumcodereview.appspot.com/10810021/ I added an illegal (no space after //) comment to each file for them to be picked up. I will remove at the end (and the CQ will also make sure I do as this currently fails presubmit checks). BUG=146850 (taking on this team refactoring task as part of this readability review). Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=155941

Patch Set 1 #

Total comments: 24

Patch Set 2 : rebase on top of http://codereview.chromium.org/10914126/ #

Patch Set 3 : Fix method interfaces in install_worker.(cc|h). #

Patch Set 4 : addressing code nits #

Patch Set 5 : propagate readbility fixes across all files #

Total comments: 1

Patch Set 6 : Fix up last backward if else block found with regex('if \(.* != .*\) \{(\n[^}]*)*\} else') #

Total comments: 14

Patch Set 7 : nits #

Patch Set 8 : Fix install_worker_unittest.cc compile #

Patch Set 9 : Remove dummy comment used to pickup files for readbility #

Patch Set 10 : Fix compile errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -242 lines) Patch
M chrome/installer/setup/chrome_frame_quick_enable.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/installer/setup/chrome_frame_ready_mode.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/installer/setup/install.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/installer/setup/install_worker.h View 1 2 3 4 5 6 7 8 6 chunks +16 lines, -16 lines 0 comments Download
M chrome/installer/setup/install_worker.cc View 1 2 3 4 5 6 7 8 32 chunks +89 lines, -113 lines 0 comments Download
M chrome/installer/setup/install_worker_unittest.cc View 1 2 3 4 5 6 7 12 chunks +23 lines, -23 lines 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 3 4 5 6 7 8 9 24 chunks +78 lines, -67 lines 0 comments Download
M chrome/installer/setup/setup_util.cc View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -6 lines 0 comments Download
M chrome/installer/setup/uninstall.cc View 1 2 3 4 5 6 7 8 4 chunks +16 lines, -11 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
gab
dominich: C++ readability reviewer CC: tommi: original reviewer grt, robertshield: FYI
8 years, 3 months ago (2012-09-06 02:39:45 UTC) #1
dominich
http://codereview.chromium.org/10912096/diff/1/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): http://codereview.chromium.org/10912096/diff/1/chrome/installer/setup/install_worker.cc#newcode297 chrome/installer/setup/install_worker.cc:297: if (installer_state.operation() != InstallerState::UNINSTALL) { Consider swapping these conditionals ...
8 years, 3 months ago (2012-09-06 17:26:12 UTC) #2
dominich
Some comments may be more detailed than you're used to from usual code review comments. ...
8 years, 3 months ago (2012-09-06 17:27:51 UTC) #3
gab
PTAL. I tried to split everything in independent patch sets for the changes to be ...
8 years, 3 months ago (2012-09-07 20:56:44 UTC) #4
dominich
Getting very close. http://codereview.chromium.org/10912096/diff/5018/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): http://codereview.chromium.org/10912096/diff/5018/chrome/installer/setup/install_worker.cc#newcode730 chrome/installer/setup/install_worker.cc:730: // Mirror eulaaccepted the first time ...
8 years, 3 months ago (2012-09-10 15:40:42 UTC) #5
gab
Done. http://codereview.chromium.org/10912096/diff/5018/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): http://codereview.chromium.org/10912096/diff/5018/chrome/installer/setup/install_worker.cc#newcode730 chrome/installer/setup/install_worker.cc:730: // Mirror eulaaccepted the first time anything is ...
8 years, 3 months ago (2012-09-10 19:14:04 UTC) #6
grt (UTC plus 2)
http://codereview.chromium.org/10912096/diff/5018/chrome/installer/setup/install_worker.cc File chrome/installer/setup/install_worker.cc (right): http://codereview.chromium.org/10912096/diff/5018/chrome/installer/setup/install_worker.cc#newcode730 chrome/installer/setup/install_worker.cc:730: // Mirror eulaaccepted the first time anything is installed ...
8 years, 3 months ago (2012-09-10 19:59:30 UTC) #7
dominich
LGTM One attempt at convincing grt below, but I'm not going to push. You've answered ...
8 years, 3 months ago (2012-09-10 20:33:46 UTC) #8
gab
I'm an owner of this code, but for double-checking purposes, Robert can you take a ...
8 years, 3 months ago (2012-09-10 20:53:57 UTC) #9
robertshield
LGTM On 2012/09/10 20:53:57, gab wrote: > I'm an owner of this code, but for ...
8 years, 3 months ago (2012-09-10 21:08:16 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/10912096/12010
8 years, 3 months ago (2012-09-10 21:12:08 UTC) #11
commit-bot: I haz the power
Try job failure for 10912096-12010 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 3 months ago (2012-09-10 22:52:53 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/10912096/8057
8 years, 3 months ago (2012-09-10 22:52:57 UTC) #13
commit-bot: I haz the power
8 years, 3 months ago (2012-09-11 03:39:05 UTC) #14
Change committed as 155941

Powered by Google App Engine
This is Rietveld 408576698