OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_frame/chrome_launcher.h" | 5 #include "chrome_frame/chrome_launcher.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <shlwapi.h> | 9 #include <shlwapi.h> |
10 | 10 |
11 // Herein lies stuff selectively stolen from Chrome. We don't pull it in | 11 // Herein lies stuff selectively stolen from Chrome. We don't pull it in |
12 // directly because all of it results in many things we don't want being | 12 // directly because all of it results in many things we don't want being |
13 // included as well. | 13 // included as well. |
14 namespace { | 14 namespace { |
15 | 15 |
16 // These are the switches we will allow (along with their values) in the | 16 // These are the switches we will allow (along with their values) in the |
17 // safe-for-Low-Integrity version of the Chrome command line. | 17 // safe-for-Low-Integrity version of the Chrome command line. |
18 // Including the chrome switch files pulls in a bunch of dependencies sadly, so | 18 // Including the chrome switch files pulls in a bunch of dependencies sadly, so |
19 // we redefine things here: | 19 // we redefine things here: |
20 const wchar_t* kAllowedSwitches[] = { | 20 const wchar_t* kAllowedSwitches[] = { |
21 L"automation-channel", | 21 L"automation-channel", |
22 L"chrome-frame", | 22 L"chrome-frame", |
| 23 L"chrome-version", |
23 L"disable-renderer-accessibility", | 24 L"disable-renderer-accessibility", |
24 L"enable-experimental-extension-apis", | 25 L"enable-experimental-extension-apis", |
25 L"force-renderer-accessibility", | 26 L"force-renderer-accessibility", |
26 L"lang", | 27 L"lang", |
27 L"no-default-browser-check", | 28 L"no-default-browser-check", |
28 L"noerrdialogs", | 29 L"noerrdialogs", |
29 L"no-first-run", | 30 L"no-first-run", |
30 L"user-data-dir", | 31 L"user-data-dir", |
31 L"disable-popup-blocking", | 32 L"disable-popup-blocking", |
32 L"full-memory-crash-report", | 33 L"full-memory-crash-report", |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 if (PathFileExists(cur_path)) { | 194 if (PathFileExists(cur_path)) { |
194 *chrome_path = cur_path; | 195 *chrome_path = cur_path; |
195 success = true; | 196 success = true; |
196 } | 197 } |
197 } | 198 } |
198 | 199 |
199 return success; | 200 return success; |
200 } | 201 } |
201 | 202 |
202 } // namespace chrome_launcher | 203 } // namespace chrome_launcher |
OLD | NEW |