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 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 // This list of sections belongs in the 'details' field of the returned | 351 // This list of sections belongs in the 'details' field of the returned |
352 // message. | 352 // message. |
353 about_info->Set(kDetailsKey, stats_list); | 353 about_info->Set(kDetailsKey, stats_list); |
354 | 354 |
355 // Populate all the fields we declared above. | 355 // Populate all the fields we declared above. |
356 client_version.SetValue(GetVersionString(channel)); | 356 client_version.SetValue(GetVersionString(channel)); |
357 | 357 |
358 if (!service) { | 358 if (!service) { |
359 summary_string.SetValue("Sync service does not exist"); | 359 summary_string.SetValue("Sync service does not exist"); |
360 return about_info.Pass(); | 360 return about_info; |
361 } | 361 } |
362 | 362 |
363 syncer::SyncStatus full_status; | 363 syncer::SyncStatus full_status; |
364 bool is_status_valid = service->QueryDetailedSyncStatus(&full_status); | 364 bool is_status_valid = service->QueryDetailedSyncStatus(&full_status); |
365 bool sync_active = service->IsSyncActive(); | 365 bool sync_active = service->IsSyncActive(); |
366 const syncer::sessions::SyncSessionSnapshot& snapshot = | 366 const syncer::sessions::SyncSessionSnapshot& snapshot = |
367 service->GetLastSessionSnapshot(); | 367 service->GetLastSessionSnapshot(); |
368 | 368 |
369 if (is_status_valid) | 369 if (is_status_valid) |
370 summary_string.SetValue(service->QuerySyncStatusSummaryString()); | 370 summary_string.SetValue(service->QuerySyncStatusSummaryString()); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 loc.Write(true, true, &location_str); | 518 loc.Write(true, true, &location_str); |
519 std::string unrecoverable_error_message = | 519 std::string unrecoverable_error_message = |
520 "Unrecoverable error detected at " + location_str + | 520 "Unrecoverable error detected at " + location_str + |
521 ": " + service->unrecoverable_error_message(); | 521 ": " + service->unrecoverable_error_message(); |
522 about_info->SetString("unrecoverable_error_message", | 522 about_info->SetString("unrecoverable_error_message", |
523 unrecoverable_error_message); | 523 unrecoverable_error_message); |
524 } | 524 } |
525 | 525 |
526 about_info->Set("type_status", service->GetTypeStatusMap()); | 526 about_info->Set("type_status", service->GetTypeStatusMap()); |
527 | 527 |
528 return about_info.Pass(); | 528 return about_info; |
529 } | 529 } |
530 | 530 |
531 } // namespace sync_ui_util | 531 } // namespace sync_ui_util |
532 | 532 |
533 } // namespace sync_driver | 533 } // namespace sync_driver |
OLD | NEW |