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

Unified Diff: chrome/common/service_process_util.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: linux include 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
« no previous file with comments | « chrome/common/cloud_print/cloud_print_helpers.cc ('k') | chrome/common/service_process_util_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/service_process_util.cc
diff --git a/chrome/common/service_process_util.cc b/chrome/common/service_process_util.cc
index f687a6bd30d7b8767de0717c8edb64d24bf0e6db..6f9844d6e0564c09b9b01e88688fec5af5156796 100644
--- a/chrome/common/service_process_util.cc
+++ b/chrome/common/service_process_util.cc
@@ -78,12 +78,6 @@ ServiceProcessRunningState GetServiceProcessRunningState(
// Get the version of the currently *running* instance of Chrome.
chrome::VersionInfo version_info;
- if (!version_info.is_valid()) {
- NOTREACHED() << "Failed to get current file version";
- // Our own version is invalid. This is an error case. Pretend that we
- // are out of date.
- return SERVICE_NEWER_VERSION_RUNNING;
- }
Version running_version(version_info.Version());
if (!running_version.IsValid()) {
NOTREACHED() << "Failed to parse version info";
@@ -124,7 +118,6 @@ std::string GetServiceProcessScopedVersionedName(
const std::string& append_str) {
std::string versioned_str;
chrome::VersionInfo version_info;
- DCHECK(version_info.is_valid());
versioned_str.append(version_info.Version());
versioned_str.append(append_str);
return GetServiceProcessScopedName(versioned_str);
@@ -242,10 +235,6 @@ bool ServiceProcessState::HandleOtherVersion() {
bool ServiceProcessState::CreateSharedData() {
chrome::VersionInfo version_info;
- if (!version_info.is_valid()) {
- NOTREACHED() << "Failed to get current file version";
- return false;
- }
if (version_info.Version().length() >= kMaxVersionStringLength) {
NOTREACHED() << "Version string length is << " <<
version_info.Version().length() << "which is longer than" <<
« no previous file with comments | « chrome/common/cloud_print/cloud_print_helpers.cc ('k') | chrome/common/service_process_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698