| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 } | 348 } |
| 349 // We don't hide icons so we shouldn't do anything special to show them | 349 // We don't hide icons so we shouldn't do anything special to show them |
| 350 return chrome::RESULT_CODE_UNSUPPORTED_PARAM; | 350 return chrome::RESULT_CODE_UNSUPPORTED_PARAM; |
| 351 } | 351 } |
| 352 | 352 |
| 353 // static | 353 // static |
| 354 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() { | 354 bool ChromeBrowserMainPartsWin::CheckMachineLevelInstall() { |
| 355 // TODO(tommi): Check if using the default distribution is always the right | 355 // TODO(tommi): Check if using the default distribution is always the right |
| 356 // thing to do. | 356 // thing to do. |
| 357 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 357 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 358 Version version; | 358 base::Version version; |
| 359 InstallUtil::GetChromeVersion(dist, true, &version); | 359 InstallUtil::GetChromeVersion(dist, true, &version); |
| 360 if (version.IsValid()) { | 360 if (version.IsValid()) { |
| 361 base::FilePath exe_path; | 361 base::FilePath exe_path; |
| 362 PathService::Get(base::DIR_EXE, &exe_path); | 362 PathService::Get(base::DIR_EXE, &exe_path); |
| 363 std::wstring exe = exe_path.value(); | 363 std::wstring exe = exe_path.value(); |
| 364 base::FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); | 364 base::FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); |
| 365 if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { | 365 if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { |
| 366 bool is_metro = base::win::IsMetroProcess(); | 366 bool is_metro = base::win::IsMetroProcess(); |
| 367 if (!is_metro) { | 367 if (!is_metro) { |
| 368 // The dialog cannot be shown in Win8 Metro as doing so hangs Chrome on | 368 // The dialog cannot be shown in Win8 Metro as doing so hangs Chrome on |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 if (resource_id) | 423 if (resource_id) |
| 424 return l10n_util::GetStringUTF16(resource_id); | 424 return l10n_util::GetStringUTF16(resource_id); |
| 425 return base::string16(); | 425 return base::string16(); |
| 426 } | 426 } |
| 427 | 427 |
| 428 // static | 428 // static |
| 429 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 429 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 430 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 430 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 431 installer::SetTranslationDelegate(&delegate); | 431 installer::SetTranslationDelegate(&delegate); |
| 432 } | 432 } |
| OLD | NEW |