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

Issue 437053: In-application Keystone ticket promotion (Closed)

Created:
11 years ago by Mark Mentovai
Modified:
9 years, 7 months ago
Reviewers:
TVL
CC:
chromium-reviews_googlegroups.com, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org, Mark Dalrymple
Visibility:
Public.

Description

In-application Keystone ticket promotion. The concept of "ticket promotion" is added to the application when Keystone is in use. Ticket promotion is used to turn a user Keystone ticket, which Chrome normally establishes when it launches, into a system Keystone ticket, after successful user authentication and authorization. Having a system Keystone with a system ticket means that updates are applied with root privileges instead of user privileges, essentially eliminating the possibility that a user will fall off of the auto-update train because they can read and execute but not write the application. Two principles of promotion apply: - An application on a user ticket NEEDS promotion if it determines that it doesn't have permission to write to itself. Being on a user ticket, an update attempt would fail. - An application on a user ticket WANTS promotion if it already NEEDS promotion. Additionally, if it is installed in a system-wide location such as /Applications, it will WANT promotion, even if it does not NEED it. If promotion is needed, an info bar will show up on launch requesting it. This info bar works similarly to the default browser info bar: it has a "don't bother me again" button, it will only show up after the first launch, it won't disappear on navigation if the navigation happens very quickly, and it won't show itself if another info bar is up. This means that if both the default browser info bar and the promotion info bar have a shot at showing, only one will win. In my experience, each wins about half of the time. If promotion is needed, the update UI in the About window will be hidden. Checking for updates and offering to apply them doesn't make much sense when the update won't be able to install successfully. All of the auto-update machinery is still working in the background, but the About window UI is hidden. If promotion is wanted, the About window will contain a new button allowing the user to enter promotion. This gives access to the same promotion routine as the promotion info bar. It can be used even from an administrative account that is able to update the application without promotion. It's intended to be used by the system administrator of the family without requiring them to switch to one of the kids' accounts. BUG=16360 TEST=Exhaustively, please. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=33241

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 24

Patch Set 8 : '' #

Total comments: 2

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2557 lines, -1049 lines) Patch
M build/common.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/app/generated_resources.grd View 2 3 4 5 6 7 8 9 10 1 chunk +21 lines, -0 lines 0 comments Download
D chrome/app/keystone_glue.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -118 lines 0 comments Download
D chrome/app/keystone_glue.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -389 lines 0 comments Download
D chrome/app/keystone_glue_unittest.mm View 3 4 5 6 7 8 9 10 1 chunk +0 lines, -182 lines 0 comments Download
M chrome/app/nibs/About.xib View 2 3 4 5 6 7 8 9 10 33 chunks +1086 lines, -228 lines 0 comments Download
M chrome/browser/app_controller_mac.mm View 3 4 5 6 7 8 9 10 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/browser.cc View 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/browser_init.cc View 7 8 9 10 2 chunks +16 lines, -4 lines 0 comments Download
M chrome/browser/browser_main_mac.mm View 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/cocoa/about_window_controller.h View 2 3 4 5 6 7 8 9 10 2 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/about_window_controller.mm View 1 2 3 4 5 6 7 8 9 10 12 chunks +339 lines, -50 lines 0 comments Download
M chrome/browser/cocoa/about_window_controller_unittest.mm View 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/cocoa/authorization_util.h View 9 10 11 12 1 chunk +58 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/authorization_util.cc View 1 chunk +118 lines, -0 lines 0 comments Download
A + chrome/browser/cocoa/keystone_glue.h View 3 4 5 6 7 5 chunks +62 lines, -17 lines 0 comments Download
A + chrome/browser/cocoa/keystone_glue.mm View 3 4 5 6 7 8 9 10 11 12 13 12 chunks +378 lines, -39 lines 0 comments Download
A + chrome/browser/cocoa/keystone_glue_unittest.mm View 3 4 5 6 7 8 3 chunks +5 lines, -3 lines 0 comments Download
A chrome/browser/cocoa/keystone_infobar.h View 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/keystone_infobar.mm View 1 chunk +211 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/keystone_promote_postflight.sh View 10 11 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/keystone_promote_preflight.sh View 10 11 1 chunk +59 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/scoped_authorizationref.h View 1 chunk +78 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 3 4 5 6 7 8 9 10 11 12 10 chunks +29 lines, -12 lines 0 comments Download
M chrome/common/pref_names.h View 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Mark Mentovai
I'm probably 80% done with this. I still need to write the info bar nag ...
11 years ago (2009-11-27 06:33:07 UTC) #1
TVL
> I'm sending it out now so you've got a little more time to be ...
11 years ago (2009-11-28 01:23:53 UTC) #2
TVL
http://codereview.chromium.org/437053/diff/22/9001 File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/437053/diff/22/9001#newcode3322 chrome/app/generated_resources.grd:3322: <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> will set up automatic updates for ...
11 years ago (2009-11-28 02:43:57 UTC) #3
Mark Mentovai
Comments addressed (anything not specifically responded to here has been addressed, and most of the ...
11 years ago (2009-11-28 04:56:03 UTC) #4
TVL
lg™ http://codereview.chromium.org/437053/diff/7004/8016 File chrome/browser/cocoa/keystone_glue.mm (right): http://codereview.chromium.org/437053/diff/7004/8016#newcode510 chrome/browser/cocoa/keystone_glue.mm:510: NSString* executablePath = [[NSBundle mainBundle] executablePath]; s/[NSBundle mainBundle]/appPath_/ ...
11 years ago (2009-11-28 17:04:30 UTC) #5
Mark Mentovai
11 years ago (2009-11-28 17:08:14 UTC) #6
http://codereview.chromium.org/437053/diff/7004/8016
File chrome/browser/cocoa/keystone_glue.mm (right):

http://codereview.chromium.org/437053/diff/7004/8016#newcode510
chrome/browser/cocoa/keystone_glue.mm:510: NSString* executablePath = [[NSBundle
mainBundle] executablePath];
TVL wrote:
> s/[NSBundle mainBundle]/appPath_/ ? wantsPromotion uses appPath_

I use appPath_ here also.

appPath_ is GC.app.

executablePath is GC.app/Contents/MacOS/GC.

I want to check that both are writable.

Powered by Google App Engine
This is Rietveld 408576698