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

Side by Side Diff: chrome_frame/chrome_launcher.cc

Issue 1343004: 3rd try. *sigh*... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « chrome_frame/chrome_frame_plugin.h ('k') | chrome_frame/delete_chrome_history.h » ('j') | 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"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 } 81 }
82 82
83 bool SanitizeAndLaunchChrome(const wchar_t* command_line) { 83 bool SanitizeAndLaunchChrome(const wchar_t* command_line) {
84 std::wstring command_line_with_program(L"dummy.exe "); 84 std::wstring command_line_with_program(L"dummy.exe ");
85 command_line_with_program += command_line; 85 command_line_with_program += command_line;
86 CommandLine original = CommandLine::FromString(command_line_with_program); 86 CommandLine original = CommandLine::FromString(command_line_with_program);
87 CommandLine sanitized(GetChromeExecutablePath()); 87 CommandLine sanitized(GetChromeExecutablePath());
88 SanitizeCommandLine(original, &sanitized); 88 SanitizeCommandLine(original, &sanitized);
89 89
90 DLOG(INFO) << sanitized.command_line_string();
91 sanitized.AppendSwitchWithValue("log-level", "0");
92
90 return base::LaunchApp(sanitized.command_line_string(), false, false, NULL); 93 return base::LaunchApp(sanitized.command_line_string(), false, false, NULL);
91 } 94 }
92 95
93 FilePath GetChromeExecutablePath() { 96 FilePath GetChromeExecutablePath() {
94 FilePath cur_path; 97 FilePath cur_path;
95 PathService::Get(base::DIR_MODULE, &cur_path); 98 PathService::Get(base::DIR_MODULE, &cur_path);
96 cur_path = cur_path.Append(chrome::kBrowserProcessExecutableName); 99 cur_path = cur_path.Append(chrome::kBrowserProcessExecutableName);
97 100
98 // The installation model for Chrome places the DLLs in a versioned 101 // The installation model for Chrome places the DLLs in a versioned
99 // sub-folder one down from the Chrome executable. If we fail to find 102 // sub-folder one down from the Chrome executable. If we fail to find
(...skipping 17 matching lines...) Expand all
117 return ERROR_OPEN_FAILED; 120 return ERROR_OPEN_FAILED;
118 } 121 }
119 } 122 }
120 123
121 // Compile-time check to see that the type CfLaunchChromeProc is correct. 124 // Compile-time check to see that the type CfLaunchChromeProc is correct.
122 #ifndef NODEBUG 125 #ifndef NODEBUG
123 namespace { 126 namespace {
124 chrome_launcher::CfLaunchChromeProc cf_launch_chrome = CfLaunchChrome; 127 chrome_launcher::CfLaunchChromeProc cf_launch_chrome = CfLaunchChrome;
125 } // namespace 128 } // namespace
126 #endif // NODEBUG 129 #endif // NODEBUG
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame_plugin.h ('k') | chrome_frame/delete_chrome_history.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698