| 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 // This file defines specific implementation of BrowserDistribution class for | 5 // This file defines specific implementation of BrowserDistribution class for |
| 6 // Google Chrome. | 6 // Google Chrome. |
| 7 | 7 |
| 8 #include "chrome/installer/util/google_chrome_distribution.h" | 8 #include "chrome/installer/util/google_chrome_distribution.h" |
| 9 | 9 |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 key.append(L"\\"); | 531 key.append(L"\\"); |
| 532 key.append(product_guid()); | 532 key.append(product_guid()); |
| 533 return key; | 533 return key; |
| 534 } | 534 } |
| 535 | 535 |
| 536 bool GoogleChromeDistribution::GetDelegateExecuteHandlerData( | 536 bool GoogleChromeDistribution::GetDelegateExecuteHandlerData( |
| 537 string16* handler_class_uuid, | 537 string16* handler_class_uuid, |
| 538 string16* type_lib_uuid, | 538 string16* type_lib_uuid, |
| 539 string16* type_lib_version, | 539 string16* type_lib_version, |
| 540 string16* interface_uuid) { | 540 string16* interface_uuid) { |
| 541 if (handler_class_uuid) | 541 // Chrome's DelegateExecute verb handler is only used for Windows 8 and up. |
| 542 *handler_class_uuid = kCommandExecuteImplUuid; | 542 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { |
| 543 if (type_lib_uuid) | 543 if (handler_class_uuid) |
| 544 *type_lib_uuid = kDelegateExecuteLibUuid; | 544 *handler_class_uuid = kCommandExecuteImplUuid; |
| 545 if (type_lib_version) | 545 if (type_lib_uuid) |
| 546 *type_lib_version = kDelegateExecuteLibVersion; | 546 *type_lib_uuid = kDelegateExecuteLibUuid; |
| 547 if (interface_uuid) | 547 if (type_lib_version) |
| 548 *interface_uuid = kICommandExecuteImplUuid; | 548 *type_lib_version = kDelegateExecuteLibVersion; |
| 549 return true; | 549 if (interface_uuid) |
| 550 *interface_uuid = kICommandExecuteImplUuid; |
| 551 return true; |
| 552 } |
| 553 return false; |
| 550 } | 554 } |
| 551 | 555 |
| 552 // This method checks if we need to change "ap" key in Google Update to try | 556 // This method checks if we need to change "ap" key in Google Update to try |
| 553 // full installer as fall back method in case incremental installer fails. | 557 // full installer as fall back method in case incremental installer fails. |
| 554 // - If incremental installer fails we append a magic string ("-full"), if | 558 // - If incremental installer fails we append a magic string ("-full"), if |
| 555 // it is not present already, so that Google Update server next time will send | 559 // it is not present already, so that Google Update server next time will send |
| 556 // full installer to update Chrome on the local machine | 560 // full installer to update Chrome on the local machine |
| 557 // - If we are currently running full installer, we remove this magic | 561 // - If we are currently running full installer, we remove this magic |
| 558 // string (if it is present) regardless of whether installer failed or not. | 562 // string (if it is present) regardless of whether installer failed or not. |
| 559 // There is no fall-back for full installer :) | 563 // There is no fall-back for full installer :) |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 // we waited for chrome to exit so the uninstall would not detect chrome | 846 // we waited for chrome to exit so the uninstall would not detect chrome |
| 843 // running. | 847 // running. |
| 844 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( | 848 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( |
| 845 installer::switches::kSystemLevelToast); | 849 installer::switches::kSystemLevelToast); |
| 846 | 850 |
| 847 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, | 851 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, |
| 848 GetType())); | 852 GetType())); |
| 849 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 853 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
| 850 } | 854 } |
| 851 #endif | 855 #endif |
| OLD | NEW |