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

Unified Diff: chrome/install_static/install_util.cc

Issue 2459583002: Use InstallDetails in setup. (Closed)
Patch Set: another doc comment Created 3 years, 10 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 | « chrome/install_static/install_util.h ('k') | chrome/install_static/install_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/install_util.cc
diff --git a/chrome/install_static/install_util.cc b/chrome/install_static/install_util.cc
index 633e8e0ac73ebb5797f91180cd84c895acd6c2d2..6101f59ecf4cb2bdf02e49104cd5419d34b6f1c9 100644
--- a/chrome/install_static/install_util.cc
+++ b/chrome/install_static/install_util.cc
@@ -10,6 +10,7 @@
#include <string.h>
#include <algorithm>
+#include <limits>
#include <memory>
#include <sstream>
@@ -259,7 +260,8 @@ std::vector<StringType> TokenizeStringT(
}
std::wstring ChannelFromAdditionalParameters(const InstallConstants& mode,
- bool system_level) {
+ bool system_level,
+ bool from_binaries) {
assert(kUseGoogleUpdateIntegration);
// InitChannelInfo in google_update_settings.cc only reports a failure when
// Chrome's ClientState key exists but that the "ap" value therein cannot be
@@ -268,8 +270,10 @@ std::wstring ChannelFromAdditionalParameters(const InstallConstants& mode,
// any error whatsoever here.
std::wstring value;
nt::QueryRegValueSZ(system_level ? nt::HKLM : nt::HKCU, nt::WOW6432,
- GetClientStateKeyPath(mode.app_guid).c_str(), kRegValueAp,
- &value);
+ from_binaries
+ ? GetBinariesClientStateKeyPath().c_str()
+ : GetClientStateKeyPath(mode.app_guid).c_str(),
+ kRegValueAp, &value);
static constexpr wchar_t kChromeChannelBetaPattern[] = L"1?1-*";
static constexpr wchar_t kChromeChannelBetaX64Pattern[] = L"*x64-beta*";
@@ -737,7 +741,9 @@ bool RecursiveDirectoryCreate(const std::wstring& full_path) {
// This function takes these inputs rather than accessing the module's
// InstallDetails instance since it is used to bootstrap InstallDetails.
-std::wstring DetermineChannel(const InstallConstants& mode, bool system_level) {
+std::wstring DetermineChannel(const InstallConstants& mode,
+ bool system_level,
+ bool from_binaries) {
if (!kUseGoogleUpdateIntegration)
return std::wstring();
@@ -746,7 +752,7 @@ std::wstring DetermineChannel(const InstallConstants& mode, bool system_level) {
assert(false);
break;
case ChannelStrategy::ADDITIONAL_PARAMETERS:
- return ChannelFromAdditionalParameters(mode, system_level);
+ return ChannelFromAdditionalParameters(mode, system_level, from_binaries);
case ChannelStrategy::FIXED:
return mode.default_channel_name;
}
« no previous file with comments | « chrome/install_static/install_util.h ('k') | chrome/install_static/install_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698