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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/environment_data_collection.cc

Issue 634583003: Simplify VersionInfo code, avoid hitting sandbox IPC constantly on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 2 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
Index: chrome/browser/safe_browsing/incident_reporting/environment_data_collection.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/environment_data_collection.cc b/chrome/browser/safe_browsing/incident_reporting/environment_data_collection.cc
index 77608340e4e04d501b0166845c7af2d7d6d7f796..0075ce010dd25eb78bd45aa76718167d747e5a47 100644
--- a/chrome/browser/safe_browsing/incident_reporting/environment_data_collection.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/environment_data_collection.cc
@@ -41,17 +41,15 @@ ClientIncidentReport_EnvironmentData_Process_Channel MapChannelToProtobuf(
// Populates |process| with data related to the chrome browser process.
void CollectProcessData(ClientIncidentReport_EnvironmentData_Process* process) {
chrome::VersionInfo version_info;
- if (version_info.is_valid()) {
- // TODO(grt): Move this logic into VersionInfo (it also appears in
- // ChromeMetricsServiceClient).
- std::string version(version_info.Version());
+ // TODO(grt): Move this logic into VersionInfo (it also appears in
+ // ChromeMetricsServiceClient).
+ std::string version(version_info.Version());
#if defined(ARCH_CPU_64_BITS)
- version += "-64";
+ version += "-64";
#endif // defined(ARCH_CPU_64_BITS)
- if (!version_info.IsOfficialBuild())
- version += "-devel";
- process->set_version(version);
- }
+ if (!version_info.IsOfficialBuild())
+ version += "-devel";
+ process->set_version(version);
process->set_chrome_update_channel(
MapChannelToProtobuf(chrome::VersionInfo::GetChannel()));

Powered by Google App Engine
This is Rietveld 408576698