| OLD | NEW |
| 1 // Copyright (c) 2011 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_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"chrome-version", |
| 24 L"disable-background-mode", | 24 L"disable-background-mode", |
| 25 L"disable-popup-blocking", | 25 L"disable-popup-blocking", |
| 26 L"disable-print-preview", |
| 26 L"disable-renderer-accessibility", | 27 L"disable-renderer-accessibility", |
| 27 L"enable-experimental-extension-apis", | 28 L"enable-experimental-extension-apis", |
| 28 L"force-renderer-accessibility", | 29 L"force-renderer-accessibility", |
| 29 L"full-memory-crash-report", | 30 L"full-memory-crash-report", |
| 30 L"lang", | 31 L"lang", |
| 31 L"no-default-browser-check", | 32 L"no-default-browser-check", |
| 32 L"no-first-run", | 33 L"no-first-run", |
| 33 L"noerrdialogs", | 34 L"noerrdialogs", |
| 34 L"user-data-dir", | 35 L"user-data-dir", |
| 35 }; | 36 }; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 if (PathFileExists(cur_path)) { | 202 if (PathFileExists(cur_path)) { |
| 202 *chrome_path = cur_path; | 203 *chrome_path = cur_path; |
| 203 success = true; | 204 success = true; |
| 204 } | 205 } |
| 205 } | 206 } |
| 206 | 207 |
| 207 return success; | 208 return success; |
| 208 } | 209 } |
| 209 | 210 |
| 210 } // namespace chrome_launcher | 211 } // namespace chrome_launcher |
| OLD | NEW |