File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ const char kNoToolbar[] = "no-toolbar";
34
34
// Open specified url
35
35
const char kUrl [] = " url" ;
36
36
37
+ // Specified app location
38
+ const char kAppPath [] = " app-path" ;
39
+
37
40
// Set current working directory.
38
41
const char kWorkingDirectory [] = " working-directory" ;
39
42
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ extern const char kContentShellDataPath[];
18
18
extern const char kDeveloper [];
19
19
extern const char kNoToolbar [];
20
20
extern const char kUrl [];
21
+ extern const char kAppPath [];
21
22
extern const char kWorkingDirectory [];
22
23
extern const char kNodeMain [];
23
24
extern const char kSnapshot [];
Original file line number Diff line number Diff line change @@ -152,7 +152,15 @@ Package::Package()
152
152
return ;
153
153
154
154
// Then see if we have arguments and extract it.
155
- CommandLine* command_line = CommandLine::ForCurrentProcess ();
155
+ // check --app-path first
156
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess ();
157
+ if (command_line->HasSwitch (switches::kAppPath )) {
158
+ path_ = command_line->GetSwitchValuePath (switches::kAppPath );
159
+ }
160
+ if (InitFromPath ())
161
+ return ;
162
+
163
+ // then treat first argument as path
156
164
const CommandLine::StringVector& args = command_line->GetArgs ();
157
165
if (args.size () > 0 ) {
158
166
self_extract_ = false ;
You can’t perform that action at this time.
0 commit comments