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 <vector> | 10 #include <vector> |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 key.append(L"\\"); | 539 key.append(L"\\"); |
540 key.append(product_guid()); | 540 key.append(product_guid()); |
541 return key; | 541 return key; |
542 } | 542 } |
543 | 543 |
544 bool GoogleChromeDistribution::GetDelegateExecuteHandlerData( | 544 bool GoogleChromeDistribution::GetDelegateExecuteHandlerData( |
545 string16* handler_class_uuid, | 545 string16* handler_class_uuid, |
546 string16* type_lib_uuid, | 546 string16* type_lib_uuid, |
547 string16* type_lib_version, | 547 string16* type_lib_version, |
548 string16* interface_uuid) { | 548 string16* interface_uuid) { |
549 // Chrome's DelegateExecute verb handler is only used for Windows 8 and up. | 549 if (handler_class_uuid) |
550 if (base::win::GetVersion() >= base::win::VERSION_WIN8) { | 550 *handler_class_uuid = kCommandExecuteImplUuid; |
551 if (handler_class_uuid) | 551 if (type_lib_uuid) |
552 *handler_class_uuid = kCommandExecuteImplUuid; | 552 *type_lib_uuid = kDelegateExecuteLibUuid; |
553 if (type_lib_uuid) | 553 if (type_lib_version) |
554 *type_lib_uuid = kDelegateExecuteLibUuid; | 554 *type_lib_version = kDelegateExecuteLibVersion; |
555 if (type_lib_version) | 555 if (interface_uuid) |
556 *type_lib_version = kDelegateExecuteLibVersion; | 556 *interface_uuid = kICommandExecuteImplUuid; |
557 if (interface_uuid) | 557 return true; |
558 *interface_uuid = kICommandExecuteImplUuid; | |
559 return true; | |
560 } | |
561 return false; | |
562 } | 558 } |
563 | 559 |
564 // This method checks if we need to change "ap" key in Google Update to try | 560 // This method checks if we need to change "ap" key in Google Update to try |
565 // full installer as fall back method in case incremental installer fails. | 561 // full installer as fall back method in case incremental installer fails. |
566 // - If incremental installer fails we append a magic string ("-full"), if | 562 // - If incremental installer fails we append a magic string ("-full"), if |
567 // it is not present already, so that Google Update server next time will send | 563 // it is not present already, so that Google Update server next time will send |
568 // full installer to update Chrome on the local machine | 564 // full installer to update Chrome on the local machine |
569 // - If we are currently running full installer, we remove this magic | 565 // - If we are currently running full installer, we remove this magic |
570 // string (if it is present) regardless of whether installer failed or not. | 566 // string (if it is present) regardless of whether installer failed or not. |
571 // There is no fall-back for full installer :) | 567 // There is no fall-back for full installer :) |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 // we waited for chrome to exit so the uninstall would not detect chrome | 850 // we waited for chrome to exit so the uninstall would not detect chrome |
855 // running. | 851 // running. |
856 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( | 852 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( |
857 installer::switches::kSystemLevelToast); | 853 installer::switches::kSystemLevelToast); |
858 | 854 |
859 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, | 855 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, |
860 GetType())); | 856 GetType())); |
861 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 857 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
862 } | 858 } |
863 #endif | 859 #endif |
OLD | NEW |