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

Unified Diff: chrome/common/omaha_query_params.cc

Issue 12928004: Add nacl_arch to data we send in omaha update checks for extensions/components (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing includes to fix windows compile error Created 7 years, 9 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/common/omaha_query_params.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/omaha_query_params.cc
diff --git a/chrome/common/omaha_query_params.cc b/chrome/common/omaha_query_params.cc
index c13aedab0cb7d13aee043598d4c9137e68b36856..482e8c978f2ab21771b75f6837c52f45dcdc1581 100644
--- a/chrome/common/omaha_query_params.cc
+++ b/chrome/common/omaha_query_params.cc
@@ -4,7 +4,9 @@
#include "chrome/common/omaha_query_params.h"
+#include "base/compiler_specific.h"
#include "base/stringprintf.h"
+#include "base/win/windows_version.h"
#include "chrome/common/chrome_version_info.h"
namespace {
@@ -92,12 +94,46 @@ namespace chrome {
std::string OmahaQueryParams::Get(ProdId prod) {
return base::StringPrintf(
- "os=%s&arch=%s&prod=%s&prodchannel=%s&prodversion=%s",
+ "os=%s&arch=%s&nacl_arch=%s&prod=%s&prodchannel=%s&prodversion=%s",
kOs,
kArch,
+ getNaclArch(),
GetProdIdString(prod),
GetChannelString(),
chrome::VersionInfo().Version().c_str());
}
+// static
+const char* OmahaQueryParams::getOS() {
+ return kOs;
+}
+
+// static
+const char* OmahaQueryParams::getArch() {
+ return kArch;
+}
+
+// static
+const char* OmahaQueryParams::getNaclArch() {
+#if defined(ARCH_CPU_X86_FAMILY)
+#if defined(ARCH_CPU_X86_64)
+ return "x86-64";
+#elif defined(OS_WIN)
+ bool x86_64 = (base::win::OSInfo::GetInstance()->wow64_status() ==
+ base::win::OSInfo::WOW64_ENABLED);
+ return x86_64 ? "x86-64" : "x86-32";
+#else
+ return "x86-32";
+#endif
+#elif defined(ARCH_CPU_ARMEL)
+ return "arm";
+#elif defined(ARCH_CPU_MIPSEL)
+ return "mips32";
+#else
+ // NOTE: when adding new values here, please remember to update the
+ // comment in the .h file about possible return values from this function.
+#error "You need to add support for your architecture here"
+#endif
+}
+
} // namespace chrome
« no previous file with comments | « chrome/common/omaha_query_params.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698