OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync/about_sync_util.h" | 5 #include "chrome/browser/sync/about_sync_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 ListValue* section_encryption = AddSection(stats_list, "Encryption"); | 186 ListValue* section_encryption = AddSection(stats_list, "Encryption"); |
187 BoolSyncStat is_using_explicit_passphrase(section_encryption, | 187 BoolSyncStat is_using_explicit_passphrase(section_encryption, |
188 "Explicit Passphrase"); | 188 "Explicit Passphrase"); |
189 BoolSyncStat is_passphrase_required(section_encryption, | 189 BoolSyncStat is_passphrase_required(section_encryption, |
190 "Passphrase Required"); | 190 "Passphrase Required"); |
191 BoolSyncStat is_cryptographer_ready(section_encryption, | 191 BoolSyncStat is_cryptographer_ready(section_encryption, |
192 "Cryptographer Ready"); | 192 "Cryptographer Ready"); |
193 BoolSyncStat has_pending_keys(section_encryption, | 193 BoolSyncStat has_pending_keys(section_encryption, |
194 "Cryptographer Has Pending Keys"); | 194 "Cryptographer Has Pending Keys"); |
195 StringSyncStat encrypted_types(section_encryption, "Encrypted Types"); | 195 StringSyncStat encrypted_types(section_encryption, "Encrypted Types"); |
196 BoolSyncStat has_keystore_key(section_encryption, "Has Keystore Key"); | |
197 StringSyncStat keystore_migration_time(section_encryption, | |
198 "Keystore Migration Time"); | |
199 StringSyncStat passphrase_type(section_encryption, | |
200 "Passphrase Type"); | |
196 | 201 |
197 ListValue* section_last_session = AddSection( | 202 ListValue* section_last_session = AddSection( |
198 stats_list, "Status from Last Completed Session"); | 203 stats_list, "Status from Last Completed Session"); |
199 StringSyncStat session_source(section_last_session, "Sync Source"); | 204 StringSyncStat session_source(section_last_session, "Sync Source"); |
200 StringSyncStat get_key_result(section_last_session, "GetKey Step Result"); | 205 StringSyncStat get_key_result(section_last_session, "GetKey Step Result"); |
201 StringSyncStat download_result(section_last_session, "Download Step Result"); | 206 StringSyncStat download_result(section_last_session, "Download Step Result"); |
202 StringSyncStat commit_result(section_last_session, "Commit Step Result"); | 207 StringSyncStat commit_result(section_last_session, "Commit Step Result"); |
203 | 208 |
204 ListValue* section_counters = AddSection(stats_list, "Running Totals"); | 209 ListValue* section_counters = AddSection(stats_list, "Running Totals"); |
205 IntSyncStat notifications_received(section_counters, | 210 IntSyncStat notifications_received(section_counters, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 if (sync_initialized) { | 291 if (sync_initialized) { |
287 is_using_explicit_passphrase.SetValue( | 292 is_using_explicit_passphrase.SetValue( |
288 service->IsUsingSecondaryPassphrase()); | 293 service->IsUsingSecondaryPassphrase()); |
289 is_passphrase_required.SetValue(service->IsPassphraseRequired()); | 294 is_passphrase_required.SetValue(service->IsPassphraseRequired()); |
290 } | 295 } |
291 if (is_status_valid) { | 296 if (is_status_valid) { |
292 is_cryptographer_ready.SetValue(full_status.cryptographer_ready); | 297 is_cryptographer_ready.SetValue(full_status.cryptographer_ready); |
293 has_pending_keys.SetValue(full_status.crypto_has_pending_keys); | 298 has_pending_keys.SetValue(full_status.crypto_has_pending_keys); |
294 encrypted_types.SetValue( | 299 encrypted_types.SetValue( |
295 ModelTypeSetToString(full_status.encrypted_types)); | 300 ModelTypeSetToString(full_status.encrypted_types)); |
301 has_keystore_key.SetValue(full_status.has_keystore_key); | |
302 keystore_migration_time.SetValue(full_status.keystore_migration_time); | |
akalin
2012/09/17 18:07:20
yeah, I think the string convs should happen here
Nicolas Zea
2012/09/17 21:00:24
Done.
| |
303 passphrase_type.SetValue(full_status.passphrase_type); | |
296 } | 304 } |
297 | 305 |
298 if (snapshot.is_initialized()) { | 306 if (snapshot.is_initialized()) { |
299 session_source.SetValue( | 307 session_source.SetValue( |
300 syncer::GetUpdatesSourceString(snapshot.source().updates_source)); | 308 syncer::GetUpdatesSourceString(snapshot.source().updates_source)); |
301 get_key_result.SetValue( | 309 get_key_result.SetValue( |
302 GetSyncerErrorString( | 310 GetSyncerErrorString( |
303 snapshot.model_neutral_state().last_get_key_result)); | 311 snapshot.model_neutral_state().last_get_key_result)); |
304 download_result.SetValue( | 312 download_result.SetValue( |
305 GetSyncerErrorString( | 313 GetSyncerErrorString( |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
392 about_info->SetString("unrecoverable_error_message", | 400 about_info->SetString("unrecoverable_error_message", |
393 unrecoverable_error_message); | 401 unrecoverable_error_message); |
394 } | 402 } |
395 | 403 |
396 about_info->Set("type_status", service->GetTypeStatusMap()); | 404 about_info->Set("type_status", service->GetTypeStatusMap()); |
397 | 405 |
398 return about_info.Pass(); | 406 return about_info.Pass(); |
399 } | 407 } |
400 | 408 |
401 } // namespace sync_ui_util | 409 } // namespace sync_ui_util |
OLD | NEW |