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

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

Issue 10917246: [Sync] Add keystore encryption info to about:sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 3 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 | « no previous file | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/about_sync_util.cc
diff --git a/chrome/browser/sync/about_sync_util.cc b/chrome/browser/sync/about_sync_util.cc
index c0487ad91bc8f8a3779af8d33736d3fab18caac1..5138a3ce5a7d86bf9947fe0e2b8458604a827a9a 100644
--- a/chrome/browser/sync/about_sync_util.cc
+++ b/chrome/browser/sync/about_sync_util.cc
@@ -11,6 +11,8 @@
#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/common/chrome_version_info.h"
+#include "sync/api/time.h"
+#include "sync/internal_api/public/util/sync_string_conversions.h"
#include "sync/protocol/proto_enum_conversions.h"
using base::DictionaryValue;
@@ -141,6 +143,15 @@ std::string GetVersionString() {
version_modifier;
}
+std::string GetKeystoreMigrationTimeStr(base::Time migration_time) {
+ std::string migration_time_str;
+ if (migration_time.is_null())
+ migration_time_str = "Not Migrated";
+ else
+ migration_time_str = syncer::GetTimeDebugString(migration_time);
+ return migration_time_str;
+}
+
} // namespace
namespace sync_ui_util {
@@ -193,6 +204,11 @@ scoped_ptr<DictionaryValue> ConstructAboutInformation(
BoolSyncStat has_pending_keys(section_encryption,
"Cryptographer Has Pending Keys");
StringSyncStat encrypted_types(section_encryption, "Encrypted Types");
+ BoolSyncStat has_keystore_key(section_encryption, "Has Keystore Key");
+ StringSyncStat keystore_migration_time(section_encryption,
+ "Keystore Migration Time");
+ StringSyncStat passphrase_type(section_encryption,
+ "Passphrase Type");
ListValue* section_last_session = AddSection(
stats_list, "Status from Last Completed Session");
@@ -293,6 +309,11 @@ scoped_ptr<DictionaryValue> ConstructAboutInformation(
has_pending_keys.SetValue(full_status.crypto_has_pending_keys);
encrypted_types.SetValue(
ModelTypeSetToString(full_status.encrypted_types));
+ has_keystore_key.SetValue(full_status.has_keystore_key);
+ keystore_migration_time.SetValue(
+ GetKeystoreMigrationTimeStr(full_status.keystore_migration_time));
+ passphrase_type.SetValue(
+ PassphraseTypeToString(full_status.passphrase_type));
}
if (snapshot.is_initialized()) {
« no previous file with comments | « no previous file | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698