| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 FilePath exe_path; | 187 FilePath exe_path; |
| 188 PathService::Get(base::DIR_EXE, &exe_path); | 188 PathService::Get(base::DIR_EXE, &exe_path); |
| 189 std::wstring exe = exe_path.value(); | 189 std::wstring exe = exe_path.value(); |
| 190 FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); | 190 FilePath user_exe_path(installer::GetChromeInstallPath(false, dist)); |
| 191 if (FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { | 191 if (FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) { |
| 192 const string16 text = | 192 const string16 text = |
| 193 l10n_util::GetStringUTF16(IDS_MACHINE_LEVEL_INSTALL_CONFLICT); | 193 l10n_util::GetStringUTF16(IDS_MACHINE_LEVEL_INSTALL_CONFLICT); |
| 194 const string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 194 const string16 caption = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
| 195 const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST; | 195 const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST; |
| 196 ui::MessageBox(NULL, text, caption, flags); | 196 ui::MessageBox(NULL, text, caption, flags); |
| 197 FilePath uninstall_path(InstallUtil::GetChromeUninstallCmd(false, dist)); | 197 CommandLine uninstall_cmd( |
| 198 CommandLine uninstall_cmd(uninstall_path); | 198 InstallUtil::GetChromeUninstallCmd(false, dist->GetType())); |
| 199 if (!uninstall_cmd.GetProgram().value().empty()) { | 199 if (!uninstall_cmd.GetProgram().empty()) { |
| 200 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall); | 200 uninstall_cmd.AppendSwitch(installer::switches::kForceUninstall); |
| 201 uninstall_cmd.AppendSwitch( | 201 uninstall_cmd.AppendSwitch( |
| 202 installer::switches::kDoNotRemoveSharedItems); | 202 installer::switches::kDoNotRemoveSharedItems); |
| 203 base::LaunchApp(uninstall_cmd, false, false, NULL); | 203 base::LaunchApp(uninstall_cmd, false, false, NULL); |
| 204 } | 204 } |
| 205 return true; | 205 return true; |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 return false; | 208 return false; |
| 209 } | 209 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 base::EnsureNSPRInit(); | 245 base::EnsureNSPRInit(); |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 }; | 248 }; |
| 249 | 249 |
| 250 // static | 250 // static |
| 251 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( | 251 BrowserMainParts* BrowserMainParts::CreateBrowserMainParts( |
| 252 const MainFunctionParams& parameters) { | 252 const MainFunctionParams& parameters) { |
| 253 return new BrowserMainPartsWin(parameters); | 253 return new BrowserMainPartsWin(parameters); |
| 254 } | 254 } |
| OLD | NEW |