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

Issue 10386218: mac gcapi: Add LaunchGoogleChrome() function. (Closed)

Created:
8 years, 7 months ago by Nico
Modified:
8 years, 7 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews, grt+watch_chromium.org
Visibility:
Public.

Description

mac gcapi: Add LaunchGoogleChrome() function. BUG=128462 TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=137921

Patch Set 1 #

Patch Set 2 : . #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -0 lines) Patch
M chrome/installer/gcapi_mac/gcapi.h View 1 chunk +3 lines, -0 lines 2 comments Download
M chrome/installer/gcapi_mac/gcapi.mm View 1 1 chunk +7 lines, -0 lines 2 comments Download
M chrome/installer/gcapi_mac/gcapi_example_client.mm View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Nico
8 years, 7 months ago (2012-05-18 19:06:24 UTC) #1
Mark Mentovai
LGTM https://chromiumcodereview.appspot.com/10386218/diff/2001/chrome/installer/gcapi_mac/gcapi.h File chrome/installer/gcapi_mac/gcapi.h (right): https://chromiumcodereview.appspot.com/10386218/diff/2001/chrome/installer/gcapi_mac/gcapi.h#newcode34 chrome/installer/gcapi_mac/gcapi.h:34: // This function launches Google Chrome after a ...
8 years, 7 months ago (2012-05-18 19:15:06 UTC) #2
Nico
8 years, 7 months ago (2012-05-18 19:21:24 UTC) #3
Thanks!

https://chromiumcodereview.appspot.com/10386218/diff/2001/chrome/installer/gc...
File chrome/installer/gcapi_mac/gcapi.h (right):

https://chromiumcodereview.appspot.com/10386218/diff/2001/chrome/installer/gc...
chrome/installer/gcapi_mac/gcapi.h:34: // This function launches Google Chrome
after a successful install.
On 2012/05/18 19:15:06, Mark Mentovai wrote:
> I guess this can be done after the “install” part is written, but…
> 
> …it might be useful to have the “install” function return a handle (via some
> opaque type) that can then be passed to the “launch” function. This could
help
> the “launch” function find the copy of Chrome that was just installed.

This is an excellent suggestion, wil do.

https://chromiumcodereview.appspot.com/10386218/diff/2001/chrome/installer/gc...
File chrome/installer/gcapi_mac/gcapi.mm (right):

https://chromiumcodereview.appspot.com/10386218/diff/2001/chrome/installer/gc...
chrome/installer/gcapi_mac/gcapi.mm:127: @autoreleasepool {
On 2012/05/18 19:15:06, Mark Mentovai wrote:
> You used an explicit NSAutoreleasePool in GoogleChromeCompatibilityCheck, but
> @autoreleasepool here.

In GCCC, @autoreleasepool would indent the whole function and it doesn't help
much. Here I'd have to add a `int result = ` variable so that i can drain before
returning, so it's more useful in this function.

> Does @autoreleasepool work as far back as 10.5 at runtime?

As far as I understand, @autoreleasepool is just compiled into normal
NSAutoreleasePool calls when building without -fobjc-arc. I checked that a
simple test program using @autoreleasepool runs fine on 10.5. (arc does need
some support functions, but i believe those are statically linked into the
resulting binary, so even with arc it should run fine on 10.5. I haven't checked
that part though.)

Powered by Google App Engine
This is Rietveld 408576698