| 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 "components/sync/driver/about_sync_util.h" | 5 #include "components/sync/driver/about_sync_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 StringSyncStat next_token_request(section_credentials, "Next Token Request"); | 276 StringSyncStat next_token_request(section_credentials, "Next Token Request"); |
| 277 | 277 |
| 278 base::ListValue* section_local = AddSection(stats_list, "Local State"); | 278 base::ListValue* section_local = AddSection(stats_list, "Local State"); |
| 279 StringSyncStat server_connection(section_local, "Server Connection"); | 279 StringSyncStat server_connection(section_local, "Server Connection"); |
| 280 StringSyncStat last_synced(section_local, "Last Synced"); | 280 StringSyncStat last_synced(section_local, "Last Synced"); |
| 281 BoolSyncStat is_setup_complete(section_local, | 281 BoolSyncStat is_setup_complete(section_local, |
| 282 "Sync First-Time Setup Complete"); | 282 "Sync First-Time Setup Complete"); |
| 283 StringSyncStat backend_initialization(section_local, | 283 StringSyncStat backend_initialization(section_local, |
| 284 "Sync Backend Initialization"); | 284 "Sync Backend Initialization"); |
| 285 BoolSyncStat is_syncing(section_local, "Syncing"); | 285 BoolSyncStat is_syncing(section_local, "Syncing"); |
| 286 BoolSyncStat is_local_sync_enabled(section_local, |
| 287 "Local sync backend enabled"); |
| 288 StringSyncStat local_backend_path(section_local, "Local backend path"); |
| 286 | 289 |
| 287 base::ListValue* section_network = AddSection(stats_list, "Network"); | 290 base::ListValue* section_network = AddSection(stats_list, "Network"); |
| 288 BoolSyncStat is_throttled(section_network, "Throttled"); | 291 BoolSyncStat is_throttled(section_network, "Throttled"); |
| 289 StringSyncStat retry_time(section_network, "Retry time (maybe stale)"); | 292 StringSyncStat retry_time(section_network, "Retry time (maybe stale)"); |
| 290 BoolSyncStat are_notifications_enabled(section_network, | 293 BoolSyncStat are_notifications_enabled(section_network, |
| 291 "Notifications Enabled"); | 294 "Notifications Enabled"); |
| 292 | 295 |
| 293 base::ListValue* section_encryption = AddSection(stats_list, "Encryption"); | 296 base::ListValue* section_encryption = AddSection(stats_list, "Encryption"); |
| 294 BoolSyncStat is_using_explicit_passphrase(section_encryption, | 297 BoolSyncStat is_using_explicit_passphrase(section_encryption, |
| 295 "Explicit Passphrase"); | 298 "Explicit Passphrase"); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 GetTimeStr(token_status.token_request_time, "n/a")); | 384 GetTimeStr(token_status.token_request_time, "n/a")); |
| 382 receive_token_time.SetValue( | 385 receive_token_time.SetValue( |
| 383 GetTimeStr(token_status.token_receive_time, "n/a")); | 386 GetTimeStr(token_status.token_receive_time, "n/a")); |
| 384 std::string err = token_status.last_get_token_error.error_message(); | 387 std::string err = token_status.last_get_token_error.error_message(); |
| 385 token_request_status.SetValue(err.empty() ? "OK" : err); | 388 token_request_status.SetValue(err.empty() ? "OK" : err); |
| 386 next_token_request.SetValue( | 389 next_token_request.SetValue( |
| 387 GetTimeStr(token_status.next_token_request_time, "not scheduled")); | 390 GetTimeStr(token_status.next_token_request_time, "not scheduled")); |
| 388 | 391 |
| 389 last_synced.SetValue(service->GetLastSyncedTimeString()); | 392 last_synced.SetValue(service->GetLastSyncedTimeString()); |
| 390 is_setup_complete.SetValue(service->IsFirstSetupComplete()); | 393 is_setup_complete.SetValue(service->IsFirstSetupComplete()); |
| 394 is_local_sync_enabled.SetValue(service->IsLocalSyncEnabled()); |
| 395 if (service->IsLocalSyncEnabled() && is_status_valid) { |
| 396 local_backend_path.SetValue(full_status.local_sync_folder); |
| 397 } |
| 391 backend_initialization.SetValue( | 398 backend_initialization.SetValue( |
| 392 service->GetEngineInitializationStateString()); | 399 service->GetEngineInitializationStateString()); |
| 393 if (is_status_valid) { | 400 if (is_status_valid) { |
| 394 is_syncing.SetValue(full_status.syncing); | 401 is_syncing.SetValue(full_status.syncing); |
| 395 retry_time.SetValue(GetTimeStr(full_status.retry_time, | 402 retry_time.SetValue(GetTimeStr(full_status.retry_time, |
| 396 "Scheduler is not in backoff or throttled")); | 403 "Scheduler is not in backoff or throttled")); |
| 397 } | 404 } |
| 398 | 405 |
| 399 if (snapshot.is_initialized()) | 406 if (snapshot.is_initialized()) |
| 400 is_throttled.SetValue(snapshot.is_silenced()); | 407 is_throttled.SetValue(snapshot.is_silenced()); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 } | 522 } |
| 516 | 523 |
| 517 about_info->Set("type_status", service->GetTypeStatusMap()); | 524 about_info->Set("type_status", service->GetTypeStatusMap()); |
| 518 | 525 |
| 519 return about_info; | 526 return about_info; |
| 520 } | 527 } |
| 521 | 528 |
| 522 } // namespace sync_ui_util | 529 } // namespace sync_ui_util |
| 523 | 530 |
| 524 } // namespace syncer | 531 } // namespace syncer |
| OLD | NEW |