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