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

Side by Side Diff: chrome/browser/chrome_browser_main_win.cc

Issue 2618583005: Remove support for non-browser products from InstallationState and ProductState. (Closed)
Patch Set: sync to position 442664 Created 3 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 | « no previous file | chrome/installer/setup/install.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) 2012 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/browser/chrome_browser_main_win.h" 5 #include "chrome/browser/chrome_browser_main_win.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 453
454 // Exit as we are not launching the browser. 454 // Exit as we are not launching the browser.
455 return content::RESULT_CODE_NORMAL_EXIT; 455 return content::RESULT_CODE_NORMAL_EXIT;
456 } 456 }
457 // We don't hide icons so we shouldn't do anything special to show them 457 // We don't hide icons so we shouldn't do anything special to show them
458 return chrome::RESULT_CODE_UNSUPPORTED_PARAM; 458 return chrome::RESULT_CODE_UNSUPPORTED_PARAM;
459 } 459 }
460 460
461 // static 461 // static
462 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() { 462 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() {
463 // TODO(tommi): Check if using the default distribution is always the right
464 // thing to do.
465 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 463 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
466 base::Version version; 464 base::Version version;
467 InstallUtil::GetChromeVersion(dist, true, &version); 465 InstallUtil::GetChromeVersion(dist, true, &version);
468 if (version.IsValid()) { 466 if (version.IsValid()) {
469 base::FilePath exe_path; 467 base::FilePath exe_path;
470 PathService::Get(base::DIR_EXE, &exe_path); 468 PathService::Get(base::DIR_EXE, &exe_path);
471 std::wstring exe = exe_path.value(); 469 std::wstring exe = exe_path.value();
472 base::FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); 470 base::FilePath user_exe_path(installer::GetChromeInstallPath(false, dist));
473 if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { 471 if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) {
474 base::CommandLine uninstall_cmd( 472 base::CommandLine uninstall_cmd(
475 InstallUtil::GetChromeUninstallCmd(false, dist->GetType())); 473 InstallUtil::GetChromeUninstallCmd(false));
476 if (!uninstall_cmd.GetProgram().empty()) { 474 if (!uninstall_cmd.GetProgram().empty()) {
477 uninstall_cmd.AppendSwitch(installer::switches::kSelfDestruct); 475 uninstall_cmd.AppendSwitch(installer::switches::kSelfDestruct);
478 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall); 476 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall);
479 uninstall_cmd.AppendSwitch( 477 uninstall_cmd.AppendSwitch(
480 installer::switches::kDoNotRemoveSharedItems); 478 installer::switches::kDoNotRemoveSharedItems);
481 479
482 // Trigger Active Setup for the system-level Chrome to make sure 480 // Trigger Active Setup for the system-level Chrome to make sure
483 // per-user shortcuts to the system-level Chrome are created. Skip this 481 // per-user shortcuts to the system-level Chrome are created. Skip this
484 // if the system-level Chrome will undergo first run anyway, as Active 482 // if the system-level Chrome will undergo first run anyway, as Active
485 // Setup is triggered on system-level Chrome's first run. 483 // Setup is triggered on system-level Chrome's first run.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 if (resource_id) 523 if (resource_id)
526 return l10n_util::GetStringUTF16(resource_id); 524 return l10n_util::GetStringUTF16(resource_id);
527 return base::string16(); 525 return base::string16();
528 } 526 }
529 527
530 // static 528 // static
531 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 529 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
532 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 530 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
533 installer::SetTranslationDelegate(&delegate); 531 installer::SetTranslationDelegate(&delegate);
534 } 532 }
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/setup/install.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698