| OLD | NEW |
| 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 } | 450 } |
| 451 // We don't hide icons so we shouldn't do anything special to show them | 451 // We don't hide icons so we shouldn't do anything special to show them |
| 452 return chrome::RESULT_CODE_UNSUPPORTED_PARAM; | 452 return chrome::RESULT_CODE_UNSUPPORTED_PARAM; |
| 453 } | 453 } |
| 454 | 454 |
| 455 // static | 455 // static |
| 456 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() { | 456 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() { |
| 457 // TODO(tommi): Check if using the default distribution is always the right | 457 // TODO(tommi): Check if using the default distribution is always the right |
| 458 // thing to do. | 458 // thing to do. |
| 459 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 459 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 460 Version version; | 460 base::Version version; |
| 461 InstallUtil::GetChromeVersion(dist, true, &version); | 461 InstallUtil::GetChromeVersion(dist, true, &version); |
| 462 if (version.IsValid()) { | 462 if (version.IsValid()) { |
| 463 base::FilePath exe_path; | 463 base::FilePath exe_path; |
| 464 PathService::Get(base::DIR_EXE, &exe_path); | 464 PathService::Get(base::DIR_EXE, &exe_path); |
| 465 std::wstring exe = exe_path.value(); | 465 std::wstring exe = exe_path.value(); |
| 466 base::FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); | 466 base::FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); |
| 467 if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { | 467 if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { |
| 468 base::CommandLine uninstall_cmd( | 468 base::CommandLine uninstall_cmd( |
| 469 InstallUtil::GetChromeUninstallCmd(false, dist->GetType())); | 469 InstallUtil::GetChromeUninstallCmd(false, dist->GetType())); |
| 470 if (!uninstall_cmd.GetProgram().empty()) { | 470 if (!uninstall_cmd.GetProgram().empty()) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 if (resource_id) | 519 if (resource_id) |
| 520 return l10n_util::GetStringUTF16(resource_id); | 520 return l10n_util::GetStringUTF16(resource_id); |
| 521 return base::string16(); | 521 return base::string16(); |
| 522 } | 522 } |
| 523 | 523 |
| 524 // static | 524 // static |
| 525 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 525 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 526 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 526 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 527 installer::SetTranslationDelegate(&delegate); | 527 installer::SetTranslationDelegate(&delegate); |
| 528 } | 528 } |
| OLD | NEW |