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

Unified Diff: chrome/installer/setup/chrome_frame_quick_enable.cc

Issue 7600023: Proper EULA handling for quick-enable. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/chrome_frame_quick_enable.cc
diff --git a/chrome/installer/setup/chrome_frame_quick_enable.cc b/chrome/installer/setup/chrome_frame_quick_enable.cc
index 1df87f1f713289ac481087ffa8b776ebcfef6d40..5255086f282e16cc64f7562abec5fb09d5da3024 100644
--- a/chrome/installer/setup/chrome_frame_quick_enable.cc
+++ b/chrome/installer/setup/chrome_frame_quick_enable.cc
@@ -12,6 +12,7 @@
#include "base/win/registry.h"
#include "chrome/installer/setup/install_worker.h"
#include "chrome/installer/util/google_update_constants.h"
+#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/installation_state.h"
#include "chrome/installer/util/installer_state.h"
@@ -139,6 +140,32 @@ InstallStatus ChromeFrameQuickEnable(const InstallationState& machine_state,
}
}
+ // If quick-enable succeeded, check to see if the EULA has not yet been
+ // accepted for the binaries. If this is the case, we must also flip the
+ // eulaaccepted bit for them. Otherwise, Google Update would not update
+ // Chrome Frame, and that would be bad. Don't flip the EULA bit for Chrome
+ // itself, as it will show the EULA on first-run and mark its acceptance
+ // accordingly.
+ if (!InstallUtil::GetInstallReturnCode(status)) {
+ const bool system_level = installer_state->system_install();
+ const ProductState* binaries =
+ machine_state.GetProductState(system_level,
+ BrowserDistribution::CHROME_BINARIES);
+ DCHECK(binaries);
+ DWORD eula_accepted;
+
+ if (binaries != NULL &&
+ binaries->GetEulaAccepted(&eula_accepted) &&
+ eula_accepted == 0 &&
+ !GoogleUpdateSettings::SetEULAConsent(
+ machine_state,
+ BrowserDistribution::GetSpecificDistribution(
+ BrowserDistribution::CHROME_BINARIES),
+ true)) {
+ LOG(ERROR) << "Failed to set EULA consent for multi-install binaries.";
+ }
+ }
+
return status;
}
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698