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

Unified Diff: chrome/common/sync_util.cc

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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/sync_util.h ('k') | chrome/common/sync_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/sync_util.cc
diff --git a/chrome/common/sync_util.cc b/chrome/common/sync_util.cc
index 736670c6fc672daaa5afafb005ab53e4fe873ab3..cd2f7e26ff76c7ec98b5bb3ba4db4ae33db26dba 100644
--- a/chrome/common/sync_util.cc
+++ b/chrome/common/sync_util.cc
@@ -6,8 +6,9 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/chrome_version_info.h"
+#include "components/version_info/version_info.h"
#include "url/gurl.h"
namespace {
@@ -45,7 +46,7 @@ GURL GetSyncServiceURL(const base::CommandLine& command_line) {
// will go to the standard sync servers.
GURL result(internal::kSyncDevServerUrl);
- version_info::Channel channel = chrome::VersionInfo::GetChannel();
+ version_info::Channel channel = chrome::GetChannel();
if (channel == version_info::Channel::STABLE ||
channel == version_info::Channel::BETA) {
result = GURL(internal::kSyncServerUrl);
@@ -69,8 +70,7 @@ GURL GetSyncServiceURL(const base::CommandLine& command_line) {
return result;
}
-std::string MakeDesktopUserAgentForSync(
- const chrome::VersionInfo& version_info) {
+std::string MakeDesktopUserAgentForSync() {
std::string system = "";
#if defined(OS_WIN)
system = "WIN ";
@@ -83,21 +83,19 @@ std::string MakeDesktopUserAgentForSync(
#elif defined(OS_MACOSX)
system = "MAC ";
#endif
- return MakeUserAgentForSync(version_info, system);
+ return MakeUserAgentForSync(system);
}
-std::string MakeUserAgentForSync(const chrome::VersionInfo& version_info,
- const std::string& system) {
+std::string MakeUserAgentForSync(const std::string& system) {
std::string user_agent;
user_agent = "Chrome ";
user_agent += system;
- user_agent += version_info.Version();
- user_agent += " (" + version_info.LastChange() + ")";
- if (!version_info.IsOfficialBuild()) {
+ user_agent += version_info::GetVersionNumber();
+ user_agent += " (" + version_info::GetLastChange() + ")";
+ if (!version_info::IsOfficialBuild()) {
user_agent += "-devel";
} else {
- user_agent +=
- " channel(" + ChannelToString(version_info.GetChannel()) + ")";
+ user_agent += " channel(" + ChannelToString(chrome::GetChannel()) + ")";
}
return user_agent;
}
« no previous file with comments | « chrome/common/sync_util.h ('k') | chrome/common/sync_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698