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

Unified Diff: chrome/browser/sync/sync_ui_util.cc

Issue 8585037: Revert the revert. This change was not the cause of the failures, so relanding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/sync_ui_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_ui_util.cc
===================================================================
--- chrome/browser/sync/sync_ui_util.cc (revision 110530)
+++ chrome/browser/sync/sync_ui_util.cc (working copy)
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_version_info.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/url_constants.h"
#include "grit/browser_resources.h"
@@ -491,6 +492,7 @@
ProfileSyncService::BuildSyncStatusSummaryText(
full_status.summary));
+ strings->SetString("version", GetVersionString());
strings->Set("authenticated",
new base::FundamentalValue(full_status.authenticated));
strings->SetString("auth_problem",
@@ -505,6 +507,10 @@
service->sync_initialized());
sync_ui_util::AddBoolSyncDetail(details, "Sync Setup Has Completed",
service->HasSyncSetupCompleted());
+ sync_ui_util::AddStringSyncDetails(
+ details,
+ "Client ID",
+ full_status.unique_id.empty() ? "none" : full_status.unique_id);
sync_ui_util::AddBoolSyncDetail(details,
"Server Up",
full_status.server_up);
@@ -663,4 +669,28 @@
}
}
+std::string GetVersionString() {
+ // Build a version string that matches MakeUserAgentForSyncApi with the
+ // addition of channel info and proper OS names.
+ chrome::VersionInfo chrome_version;
+ if (!chrome_version.is_valid())
+ return "invalid";
+ // GetVersionStringModifier returns empty string for stable channel or
+ // unofficial builds, the channel string otherwise. We want to have "-devel"
+ // for unofficial builds only.
+ std::string version_modifier =
+ chrome::VersionInfo::GetVersionStringModifier();
+ if (version_modifier.empty()) {
+ if (chrome::VersionInfo::GetChannel() !=
+ chrome::VersionInfo::CHANNEL_STABLE) {
+ version_modifier = "-devel";
+ }
+ } else {
+ version_modifier = " " + version_modifier;
+ }
+ return chrome_version.Name() + " " + chrome_version.OSType() + " " +
+ chrome_version.Version() + " (" + chrome_version.LastChange() + ")" +
+ version_modifier;
+}
+
} // namespace sync_ui_util
« no previous file with comments | « chrome/browser/sync/sync_ui_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698