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

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

Issue 8587017: [Sync] Add version info to about:sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add client id, modify version format 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
Index: chrome/browser/sync/sync_ui_util.cc
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 7264b48addc47d9d5180c074389d9cfa0e5baca4..81194a364f02ae619255e0d15ada015bd8217fc8 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -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,16 @@ void ConstructAboutInformation(ProfileSyncService* service,
ProfileSyncService::BuildSyncStatusSummaryText(
full_status.summary));
+ // Build a version string that matches MakeUserAgentForSyncApi with the
+ // addition of channel info and proper OS names.
+ chrome::VersionInfo chrome_version;
akalin 2011/11/17 04:12:43 Maybe a special string if VersionInfo is invalid
Nicolas Zea 2011/11/17 04:58:10 Done.
+ std::string version_modifier =
akalin 2011/11/17 04:12:43 Can you decomp the string-building logic into a se
Nicolas Zea 2011/11/17 04:58:10 Done.
+ " " + chrome::VersionInfo::GetVersionStringModifier();
akalin 2011/11/17 04:12:43 Hmm docs for GetVersionStringModifier() say that i
Nicolas Zea 2011/11/17 04:58:10 Good catch. Done.
+ if (version_modifier == " ") // Not set for unofficial builds.
+ version_modifier = "-devel";
+ strings->SetString("version", chrome_version.Name() + " " +
+ chrome_version.OSType() + " " + chrome_version.Version() + " (" +
+ chrome_version.LastChange() + ")" + version_modifier);
strings->Set("authenticated",
new base::FundamentalValue(full_status.authenticated));
strings->SetString("auth_problem",
@@ -505,6 +516,10 @@ void ConstructAboutInformation(ProfileSyncService* service,
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 == "" ? "none" : full_status.unique_id);
akalin 2011/11/17 04:12:43 unique_id.empty()
Nicolas Zea 2011/11/17 04:58:10 Done.
sync_ui_util::AddBoolSyncDetail(details,
"Server Up",
full_status.server_up);

Powered by Google App Engine
This is Rietveld 408576698