| 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 <windows.h> | 7 #include <windows.h> |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 } | 500 } |
| 501 // We don't hide icons so we shouldn't do anything special to show them | 501 // We don't hide icons so we shouldn't do anything special to show them |
| 502 return chrome::RESULT_CODE_UNSUPPORTED_PARAM; | 502 return chrome::RESULT_CODE_UNSUPPORTED_PARAM; |
| 503 } | 503 } |
| 504 | 504 |
| 505 // static | 505 // static |
| 506 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() { | 506 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() { |
| 507 // TODO(tommi): Check if using the default distribution is always the right | 507 // TODO(tommi): Check if using the default distribution is always the right |
| 508 // thing to do. | 508 // thing to do. |
| 509 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 509 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 510 base::Version version; | 510 Version version; |
| 511 InstallUtil::GetChromeVersion(dist, true, &version); | 511 InstallUtil::GetChromeVersion(dist, true, &version); |
| 512 if (version.IsValid()) { | 512 if (version.IsValid()) { |
| 513 base::FilePath exe_path; | 513 base::FilePath exe_path; |
| 514 PathService::Get(base::DIR_EXE, &exe_path); | 514 PathService::Get(base::DIR_EXE, &exe_path); |
| 515 std::wstring exe = exe_path.value(); | 515 std::wstring exe = exe_path.value(); |
| 516 base::FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); | 516 base::FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); |
| 517 if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { | 517 if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { |
| 518 bool is_metro = base::win::IsMetroProcess(); | 518 bool is_metro = base::win::IsMetroProcess(); |
| 519 if (!is_metro) { | 519 if (!is_metro) { |
| 520 // The dialog cannot be shown in Win8 Metro as doing so hangs Chrome on | 520 // The dialog cannot be shown in Win8 Metro as doing so hangs Chrome on |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 if (resource_id) | 586 if (resource_id) |
| 587 return l10n_util::GetStringUTF16(resource_id); | 587 return l10n_util::GetStringUTF16(resource_id); |
| 588 return base::string16(); | 588 return base::string16(); |
| 589 } | 589 } |
| 590 | 590 |
| 591 // static | 591 // static |
| 592 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 592 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 593 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 593 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 594 installer::SetTranslationDelegate(&delegate); | 594 installer::SetTranslationDelegate(&delegate); |
| 595 } | 595 } |
| OLD | NEW |