Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: chrome/installer/util/installer_state.cc

Issue 300593002: Make omaha, gcapi and uninstall registry accesses use Wow6432Node on 64-bit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move the uninstall registry access to 32-bit Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/installer/util/installer_state.h" 5 #include "chrome/installer/util/installer_state.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 return; 736 return;
737 } 737 }
738 738
739 // Update the "ap" value for the product being installed/updated. We get the 739 // Update the "ap" value for the product being installed/updated. We get the
740 // current value from the registry since the InstallationState instance used 740 // current value from the registry since the InstallationState instance used
741 // by the bulk of the installer does not track changes made by UpdateStage. 741 // by the bulk of the installer does not track changes made by UpdateStage.
742 // Create the app's ClientState key if it doesn't exist. 742 // Create the app's ClientState key if it doesn't exist.
743 ChannelInfo channel_info; 743 ChannelInfo channel_info;
744 base::win::RegKey state_key; 744 base::win::RegKey state_key;
745 LONG result = state_key.Create(root_key_, state_key_.c_str(), 745 LONG result = state_key.Create(root_key_, state_key_.c_str(),
746 KEY_QUERY_VALUE | KEY_SET_VALUE); 746 KEY_QUERY_VALUE | KEY_SET_VALUE | KEY_WOW64_32KEY);
747 if (result == ERROR_SUCCESS) { 747 if (result == ERROR_SUCCESS) {
748 channel_info.Initialize(state_key); 748 channel_info.Initialize(state_key);
749 749
750 // This is a multi-install product. 750 // This is a multi-install product.
751 bool modified = channel_info.SetMultiInstall(true); 751 bool modified = channel_info.SetMultiInstall(true);
752 752
753 // Add the appropriate modifiers for all products and their options. 753 // Add the appropriate modifiers for all products and their options.
754 modified |= SetChannelFlags(true, &channel_info); 754 modified |= SetChannelFlags(true, &channel_info);
755 755
756 VLOG(1) << "ap: " << channel_info.value(); 756 VLOG(1) << "ap: " << channel_info.value();
(...skipping 19 matching lines...) Expand all
776 if (i == BrowserDistribution::CHROME_BINARIES) { 776 if (i == BrowserDistribution::CHROME_BINARIES) {
777 dist = multi_package_distribution_; 777 dist = multi_package_distribution_;
778 } else { 778 } else {
779 const Product* product = FindProduct(type); 779 const Product* product = FindProduct(type);
780 // Skip this one if it's for a product we're not operating on. 780 // Skip this one if it's for a product we're not operating on.
781 if (product == NULL) 781 if (product == NULL)
782 continue; 782 continue;
783 dist = product->distribution(); 783 dist = product->distribution();
784 } 784 }
785 result = state_key.Create(root_key_, dist->GetStateKey().c_str(), 785 result = state_key.Create(root_key_, dist->GetStateKey().c_str(),
786 KEY_QUERY_VALUE | KEY_SET_VALUE); 786 KEY_QUERY_VALUE | KEY_SET_VALUE | KEY_WOW64_32KEY);
787 if (result == ERROR_SUCCESS) { 787 if (result == ERROR_SUCCESS) {
788 other_info.Initialize(state_key); 788 other_info.Initialize(state_key);
789 if (!other_info.Equals(channel_info)) 789 if (!other_info.Equals(channel_info))
790 channel_info.Write(&state_key); 790 channel_info.Write(&state_key);
791 } else { 791 } else {
792 LOG(ERROR) << "Failed opening key " << dist->GetStateKey() 792 LOG(ERROR) << "Failed opening key " << dist->GetStateKey()
793 << " to update app channels; result: " << result; 793 << " to update app channels; result: " << result;
794 } 794 }
795 } 795 }
796 } else { 796 } else {
(...skipping 26 matching lines...) Expand all
823 } 823 }
824 if (!install_list->Do()) 824 if (!install_list->Do())
825 LOG(ERROR) << "Failed to record installer error information in registry."; 825 LOG(ERROR) << "Failed to record installer error information in registry.";
826 } 826 }
827 827
828 bool InstallerState::RequiresActiveSetup() const { 828 bool InstallerState::RequiresActiveSetup() const {
829 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER); 829 return system_install() && FindProduct(BrowserDistribution::CHROME_BROWSER);
830 } 830 }
831 831
832 } // namespace installer 832 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698