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

Side by Side Diff: components/update_client/utils.cc

Issue 2506523002: Report Windows build and patch number in the component updater checks. (Closed)
Patch Set: static constexpr Created 4 years, 1 month 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
« no previous file with comments | « base/win/windows_version.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/update_client/utils.h" 5 #include "components/update_client/utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 } 66 }
67 67
68 DCHECK(crx_file::id_util::IdIsValid(id)); 68 DCHECK(crx_file::id_util::IdIsValid(id));
69 69
70 return id; 70 return id;
71 } 71 }
72 72
73 std::string GetOSVersion() { 73 std::string GetOSVersion() {
74 #if defined(OS_WIN) 74 #if defined(OS_WIN)
75 int32_t major = 0; 75 const auto ver = base::win::OSInfo::GetInstance()->version_number();
76 int32_t minor = 0; 76 return base::StringPrintf("%d.%d.%d.%d", ver.major, ver.minor, ver.build,
77 int32_t bugfix = 0; 77 ver.patch);
78 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
79 return base::StringPrintf("%d.%d.%d", major, minor, bugfix);
80 #else 78 #else
81 return base::SysInfo().OperatingSystemVersion(); 79 return base::SysInfo().OperatingSystemVersion();
82 #endif 80 #endif
83 } 81 }
84 82
85 std::string GetServicePack() { 83 std::string GetServicePack() {
86 #if defined(OS_WIN) 84 #if defined(OS_WIN)
87 return base::win::OSInfo::GetInstance()->service_pack_str(); 85 return base::win::OSInfo::GetInstance()->service_pack_str();
88 #else 86 #else
89 return std::string(); 87 return std::string();
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 [](const GURL& url) { return !url.SchemeIsCryptographic(); }), 333 [](const GURL& url) { return !url.SchemeIsCryptographic(); }),
336 urls->end()); 334 urls->end());
337 } 335 }
338 336
339 CrxInstaller::Result InstallFunctionWrapper(base::Callback<bool()> callback) { 337 CrxInstaller::Result InstallFunctionWrapper(base::Callback<bool()> callback) {
340 return CrxInstaller::Result(callback.Run() ? InstallError::NONE 338 return CrxInstaller::Result(callback.Run() ? InstallError::NONE
341 : InstallError::GENERIC_ERROR); 339 : InstallError::GENERIC_ERROR);
342 } 340 }
343 341
344 } // namespace update_client 342 } // namespace update_client
OLDNEW
« no previous file with comments | « base/win/windows_version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698