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

Side by Side Diff: chrome/installer/gcapi_mac/gcapi_example_client.mm

Issue 10832297: gcapi example: Add --criteria-check longform for -c (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/gcapi_mac/gcapi.h" 5 #include "chrome/installer/gcapi_mac/gcapi.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 #include <getopt.h> 8 #include <getopt.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 void Usage() { 12 void Usage() {
13 fprintf(stderr, 13 fprintf(stderr,
14 "usage: gcapi_example [options]\n" 14 "usage: gcapi_example [options]\n"
15 "\n" 15 "\n"
16 "options:\n" 16 "options:\n"
17 " --criteria-check exit after criteria check\n" 17 " --criteria-check exit after criteria check\n"
18 " --force-reinstall delete Google Chrome from Applications first\n" 18 " --force-reinstall delete Google Chrome from Applications first\n"
19 " --install <path> copy <path> to /Applications/Google Chrome.app, set up\n" 19 " --install <path> copy <path> to /Applications/Google Chrome.app, set up\n"
20 " --brand <CODE> set brandcode to <CODE> during installation\n" 20 " --brand <CODE> set brandcode to <CODE> during installation\n"
21 " --launch launch Google Chrome when all is done\n" 21 " --launch launch Google Chrome when all is done\n"
22 " --help print this message\n" 22 " --help print this message\n"
23 ); 23 );
24 } 24 }
25 25
26 int main(int argc, char* argv[]) { 26 int main(int argc, char* argv[]) {
27 const option kLongOptions[] = { 27 const option kLongOptions[] = {
28 { "criteria-check", no_argument, NULL, 'c' },
28 { "force-reinstall", no_argument, NULL, 'r' }, 29 { "force-reinstall", no_argument, NULL, 'r' },
29 { "install", required_argument, NULL, 'i' }, 30 { "install", required_argument, NULL, 'i' },
30 { "brand", required_argument, NULL, 'b' }, 31 { "brand", required_argument, NULL, 'b' },
31 { "launch", no_argument, NULL, 'l' }, 32 { "launch", no_argument, NULL, 'l' },
32 { "help", no_argument, NULL, 'h' }, 33 { "help", no_argument, NULL, 'h' },
33 { NULL, 0, NULL, 0 } 34 { NULL, 0, NULL, 0 }
34 }; 35 };
35 36
36 std::string source_path; 37 std::string source_path;
37 std::string brand_code; 38 std::string brand_code;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 int install_result = InstallGoogleChrome( 80 int install_result = InstallGoogleChrome(
80 source_path.c_str(), 81 source_path.c_str(),
81 brand_code.empty() ? NULL : brand_code.c_str(), 82 brand_code.empty() ? NULL : brand_code.c_str(),
82 NULL, 0); 83 NULL, 0);
83 NSLog(@"install result: %d", install_result); 84 NSLog(@"install result: %d", install_result);
84 } 85 }
85 86
86 if (launch) 87 if (launch)
87 LaunchGoogleChrome(); 88 LaunchGoogleChrome();
88 } 89 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698