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

Side by Side Diff: chrome_frame/chrome_launcher.cc

Issue 354012: Add a switch to the whitelist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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) 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 "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "chrome/common/chrome_constants.h" 12 #include "chrome/common/chrome_constants.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chrome_frame/chrome_frame_automation.h" 14 #include "chrome_frame/chrome_frame_automation.h"
15 15
16 namespace chrome_launcher { 16 namespace chrome_launcher {
17 17
18 const wchar_t kLauncherExeBaseName[] = L"chrome_launcher.exe"; 18 const wchar_t kLauncherExeBaseName[] = L"chrome_launcher.exe";
19 19
20 // These are the switches we will allow (along with their values) in the 20 // These are the switches we will allow (along with their values) in the
21 // safe-for-Low-Integrity version of the Chrome command line. 21 // safe-for-Low-Integrity version of the Chrome command line.
22 const char* kAllowedSwitches[] = { 22 const char* kAllowedSwitches[] = {
23 switches::kAutomationClientChannelID, 23 switches::kAutomationClientChannelID,
24 switches::kDisableMetrics, 24 switches::kDisableMetrics,
25 switches::kEnableRendererAccessibility,
26 switches::kEnableExperimentalExtensionApis,
27 switches::kNoErrorDialogs,
25 switches::kNoFirstRun, 28 switches::kNoFirstRun,
26 switches::kUserDataDir, 29 switches::kUserDataDir,
27 switches::kEnableRendererAccessibility,
28 switches::kNoErrorDialogs,
29 }; 30 };
30 31
31 CommandLine* CreateLaunchCommandLine() { 32 CommandLine* CreateLaunchCommandLine() {
32 // TODO(joi) As optimization, could launch Chrome directly when running at 33 // TODO(joi) As optimization, could launch Chrome directly when running at
33 // medium integrity. (Requires bringing in code to read SIDs, etc.) 34 // medium integrity. (Requires bringing in code to read SIDs, etc.)
34 35
35 // The launcher EXE will be in the same directory as the npchrome_tab DLL, 36 // The launcher EXE will be in the same directory as the npchrome_tab DLL,
36 // so create a full path to it based on this assumption. Since our unit 37 // so create a full path to it based on this assumption. Since our unit
37 // tests also use this function, and live in the directory above, we test 38 // tests also use this function, and live in the directory above, we test
38 // existence of the file and try the path that includes the /servers/ 39 // existence of the file and try the path that includes the /servers/
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return ERROR_OPEN_FAILED; 115 return ERROR_OPEN_FAILED;
115 } 116 }
116 } 117 }
117 118
118 // Compile-time check to see that the type CfLaunchChromeProc is correct. 119 // Compile-time check to see that the type CfLaunchChromeProc is correct.
119 #ifndef NODEBUG 120 #ifndef NODEBUG
120 namespace { 121 namespace {
121 chrome_launcher::CfLaunchChromeProc cf_launch_chrome = CfLaunchChrome; 122 chrome_launcher::CfLaunchChromeProc cf_launch_chrome = CfLaunchChrome;
122 } // namespace 123 } // namespace
123 #endif // NODEBUG 124 #endif // NODEBUG
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