| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 int DoUninstallTasks(bool chrome_still_running) { | 109 int DoUninstallTasks(bool chrome_still_running) { |
| 110 // We want to show a warning to user (and exit) if Chrome is already running | 110 // We want to show a warning to user (and exit) if Chrome is already running |
| 111 // *before* we show the uninstall confirmation dialog box. But while the | 111 // *before* we show the uninstall confirmation dialog box. But while the |
| 112 // uninstall confirmation dialog is up, user might start Chrome, so we | 112 // uninstall confirmation dialog is up, user might start Chrome, so we |
| 113 // check once again after user acknowledges Uninstall dialog. | 113 // check once again after user acknowledges Uninstall dialog. |
| 114 if (chrome_still_running) { | 114 if (chrome_still_running) { |
| 115 ShowCloseBrowserFirstMessageBox(); | 115 ShowCloseBrowserFirstMessageBox(); |
| 116 return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE; | 116 return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE; |
| 117 } | 117 } |
| 118 int result = browser::ShowUninstallBrowserPrompt(); | 118 int result = chrome::ShowUninstallBrowserPrompt(); |
| 119 if (browser_util::IsBrowserAlreadyRunning()) { | 119 if (browser_util::IsBrowserAlreadyRunning()) { |
| 120 ShowCloseBrowserFirstMessageBox(); | 120 ShowCloseBrowserFirstMessageBox(); |
| 121 return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE; | 121 return chrome::RESULT_CODE_UNINSTALL_CHROME_ALIVE; |
| 122 } | 122 } |
| 123 | 123 |
| 124 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { | 124 if (result != chrome::RESULT_CODE_UNINSTALL_USER_CANCEL) { |
| 125 // The following actions are just best effort. | 125 // The following actions are just best effort. |
| 126 VLOG(1) << "Executing uninstall actions"; | 126 VLOG(1) << "Executing uninstall actions"; |
| 127 if (!first_run::RemoveSentinel()) | 127 if (!first_run::RemoveSentinel()) |
| 128 VLOG(1) << "Failed to delete sentinel file."; | 128 VLOG(1) << "Failed to delete sentinel file."; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 if (resource_id) | 339 if (resource_id) |
| 340 return l10n_util::GetStringUTF16(resource_id); | 340 return l10n_util::GetStringUTF16(resource_id); |
| 341 return string16(); | 341 return string16(); |
| 342 } | 342 } |
| 343 | 343 |
| 344 // static | 344 // static |
| 345 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { | 345 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { |
| 346 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); | 346 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); |
| 347 installer::SetTranslationDelegate(&delegate); | 347 installer::SetTranslationDelegate(&delegate); |
| 348 } | 348 } |
| OLD | NEW |