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/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 // Populate all the fields we declared above. | 317 // Populate all the fields we declared above. |
318 client_version.SetValue(GetVersionString()); | 318 client_version.SetValue(GetVersionString()); |
319 | 319 |
320 if (!service) { | 320 if (!service) { |
321 summary_string.SetValue("Sync service does not exist"); | 321 summary_string.SetValue("Sync service does not exist"); |
322 return about_info.Pass(); | 322 return about_info.Pass(); |
323 } | 323 } |
324 | 324 |
325 syncer::SyncStatus full_status; | 325 syncer::SyncStatus full_status; |
326 bool is_status_valid = service->QueryDetailedSyncStatus(&full_status); | 326 bool is_status_valid = service->QueryDetailedSyncStatus(&full_status); |
327 bool sync_active = service->SyncActive(); | 327 bool sync_active = service->IsSyncActive(); |
328 const syncer::sessions::SyncSessionSnapshot& snapshot = | 328 const syncer::sessions::SyncSessionSnapshot& snapshot = |
329 service->GetLastSessionSnapshot(); | 329 service->GetLastSessionSnapshot(); |
330 | 330 |
331 if (is_status_valid) | 331 if (is_status_valid) |
332 summary_string.SetValue(service->QuerySyncStatusSummaryString()); | 332 summary_string.SetValue(service->QuerySyncStatusSummaryString()); |
333 | 333 |
334 server_url.SetValue(service->sync_service_url().spec()); | 334 server_url.SetValue(service->sync_service_url().spec()); |
335 | 335 |
336 if (is_status_valid && !full_status.sync_id.empty()) | 336 if (is_status_valid && !full_status.sync_id.empty()) |
337 sync_id.SetValue(full_status.sync_id); | 337 sync_id.SetValue(full_status.sync_id); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 about_info->SetString("unrecoverable_error_message", | 484 about_info->SetString("unrecoverable_error_message", |
485 unrecoverable_error_message); | 485 unrecoverable_error_message); |
486 } | 486 } |
487 | 487 |
488 about_info->Set("type_status", service->GetTypeStatusMap()); | 488 about_info->Set("type_status", service->GetTypeStatusMap()); |
489 | 489 |
490 return about_info.Pass(); | 490 return about_info.Pass(); |
491 } | 491 } |
492 | 492 |
493 } // namespace sync_ui_util | 493 } // namespace sync_ui_util |
OLD | NEW |