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

Unified Diff: chrome_frame/chrome_launcher_utils.cc

Issue 6355011: When changing Ready Mode state from within an IE process, use chrome_launcher... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome_frame/chrome_launcher_utils.cc
===================================================================
--- chrome_frame/chrome_launcher_utils.cc (revision 72310)
+++ chrome_frame/chrome_launcher_utils.cc (working copy)
@@ -14,16 +14,9 @@
#include "chrome/common/chrome_switches.h"
#include "chrome_frame/chrome_frame_automation.h"
-namespace chrome_launcher {
+namespace {
-const wchar_t kLauncherExeBaseName[] = L"chrome_launcher.exe";
-
-CommandLine* CreateLaunchCommandLine() {
- // Shortcut for OS versions that don't need the integrity broker.
- if (base::win::GetVersion() < base::win::VERSION_VISTA) {
- return new CommandLine(GetChromeExecutablePath());
- }
-
+CommandLine* CreateChromeLauncherCommandLine() {
// The launcher EXE will be in the same directory as the Chrome Frame DLL,
// so create a full path to it based on this assumption. Since our unit
// tests also use this function, and live in the directory above, we test
@@ -32,12 +25,13 @@
FilePath module_path;
if (PathService::Get(base::FILE_MODULE, &module_path)) {
FilePath current_dir = module_path.DirName();
- FilePath same_dir_path = current_dir.Append(kLauncherExeBaseName);
+ FilePath same_dir_path = current_dir.Append(
+ chrome_launcher::kLauncherExeBaseName);
if (file_util::PathExists(same_dir_path)) {
return new CommandLine(same_dir_path);
} else {
- FilePath servers_path =
- current_dir.Append(L"servers").Append(kLauncherExeBaseName);
+ FilePath servers_path = current_dir.Append(L"servers").Append(
+ chrome_launcher::kLauncherExeBaseName);
DCHECK(file_util::PathExists(servers_path)) <<
"What module is this? It's not in 'servers' or main output dir.";
return new CommandLine(servers_path);
@@ -48,6 +42,34 @@
}
}
+} // namespace
+
+namespace chrome_launcher {
+
+const wchar_t kLauncherExeBaseName[] = L"chrome_launcher.exe";
robertshield 2011/01/24 15:08:42 This is only used in the anonymous namespace above
erikwright (departed) 2011/01/24 17:17:14 Done.
+
+const char kUpdateCommandFlag[] = "--update-cmd";
+
+CommandLine* CreateUpdateCommandLine(const std::wstring& update_command) {
+ CommandLine* command_line = CreateChromeLauncherCommandLine();
+
+ if (command_line) {
+ command_line->AppendArg(kUpdateCommandFlag);
+ command_line->AppendArg(WideToASCII(update_command));
+ }
+
+ return command_line;
+}
+
+CommandLine* CreateLaunchCommandLine() {
+ // Shortcut for OS versions that don't need the integrity broker.
+ if (base::win::GetVersion() < base::win::VERSION_VISTA) {
+ return new CommandLine(GetChromeExecutablePath());
+ }
+
+ return CreateChromeLauncherCommandLine();
+}
+
FilePath GetChromeExecutablePath() {
FilePath cur_path;
PathService::Get(base::DIR_MODULE, &cur_path);

Powered by Google App Engine
This is Rietveld 408576698