| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
| 6 #include "chrome/browser/browser_main_win.h" | 6 #include "chrome/browser/browser_main_win.h" |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <shellapi.h> | 9 #include <shellapi.h> |
| 10 | 10 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); | 192 FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); |
| 193 if (FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { | 193 if (FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { |
| 194 const std::wstring text = | 194 const std::wstring text = |
| 195 l10n_util::GetString(IDS_MACHINE_LEVEL_INSTALL_CONFLICT); | 195 l10n_util::GetString(IDS_MACHINE_LEVEL_INSTALL_CONFLICT); |
| 196 const std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME); | 196 const std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME); |
| 197 const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST; | 197 const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST; |
| 198 win_util::MessageBox(NULL, text, caption, flags); | 198 win_util::MessageBox(NULL, text, caption, flags); |
| 199 FilePath uninstall_path(InstallUtil::GetChromeUninstallCmd(false, dist)); | 199 FilePath uninstall_path(InstallUtil::GetChromeUninstallCmd(false, dist)); |
| 200 CommandLine uninstall_cmd(uninstall_path); | 200 CommandLine uninstall_cmd(uninstall_path); |
| 201 if (!uninstall_cmd.GetProgram().value().empty()) { | 201 if (!uninstall_cmd.GetProgram().value().empty()) { |
| 202 uninstall_cmd.AppendSwitch(installer_util::switches::kForceUninstall); | 202 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall); |
| 203 uninstall_cmd.AppendSwitch( | 203 uninstall_cmd.AppendSwitch( |
| 204 installer_util::switches::kDoNotRemoveSharedItems); | 204 installer::switches::kDoNotRemoveSharedItems); |
| 205 base::LaunchApp(uninstall_cmd, false, false, NULL); | 205 base::LaunchApp(uninstall_cmd, false, false, NULL); |
| 206 } | 206 } |
| 207 return true; | 207 return true; |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 return false; | 210 return false; |
| 211 } | 211 } |
| 212 | 212 |
| 213 // BrowserMainPartsWin --------------------------------------------------------- | 213 // BrowserMainPartsWin --------------------------------------------------------- |
| 214 | 214 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 } | 251 } |
| 252 #endif | 252 #endif |
| 253 } | 253 } |
| 254 }; | 254 }; |
| 255 | 255 |
| 256 // static | 256 // static |
| 257 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( | 257 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( |
| 258 const MainFunctionParams& parameters) { | 258 const MainFunctionParams& parameters) { |
| 259 return new BrowserMainPartsWin(parameters); | 259 return new BrowserMainPartsWin(parameters); |
| 260 } | 260 } |
| OLD | NEW |