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

Side by Side Diff: chrome/installer/setup/main.cc

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 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 unified diff | Download patch
« no previous file with comments | « chrome/common/temp_scaffolding_stubs.cpp ('k') | chrome/installer/setup/setup.cc » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 5 #include <string>
6 #include <windows.h> 6 #include <windows.h>
7 #include <msi.h> 7 #include <msi.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 dlg.ShowModal(); 450 dlg.ShowModal();
451 return false; 451 return false;
452 } 452 }
453 453
454 } // namespace 454 } // namespace
455 455
456 int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance, 456 int WINAPI wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
457 wchar_t* command_line, int show_command) { 457 wchar_t* command_line, int show_command) {
458 // The exit manager is in charge of calling the dtors of singletons. 458 // The exit manager is in charge of calling the dtors of singletons.
459 base::AtExitManager exit_manager; 459 base::AtExitManager exit_manager;
460 CommandLine parsed_command_line; 460 CommandLine::Init(0, NULL);
461 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
461 installer::InitInstallerLogging(parsed_command_line); 462 installer::InitInstallerLogging(parsed_command_line);
462 int options = GetInstallOptions(parsed_command_line); 463 int options = GetInstallOptions(parsed_command_line);
463 if (options & installer_util::VERBOSE_LOGGING) 464 if (options & installer_util::VERBOSE_LOGGING)
464 logging::SetMinLogLevel(logging::LOG_INFO); 465 logging::SetMinLogLevel(logging::LOG_INFO);
465 466
466 bool system_install = (options & installer_util::SYSTEM_LEVEL) != 0; 467 bool system_install = (options & installer_util::SYSTEM_LEVEL) != 0;
467 LOG(INFO) << "system install is " << system_install; 468 LOG(INFO) << "system install is " << system_install;
468 469
469 if (!HandleEULADialog(parsed_command_line)) 470 if (!HandleEULADialog(parsed_command_line))
470 return 0; 471 return 0;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 560
560 install_status = InstallChrome(parsed_command_line, 561 install_status = InstallChrome(parsed_command_line,
561 installed_version.get(), 562 installed_version.get(),
562 options); 563 options);
563 } 564 }
564 565
565 CoUninitialize(); 566 CoUninitialize();
566 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 567 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
567 return dist->GetInstallReturnCode(install_status); 568 return dist->GetInstallReturnCode(install_status);
568 } 569 }
OLDNEW
« no previous file with comments | « chrome/common/temp_scaffolding_stubs.cpp ('k') | chrome/installer/setup/setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698