OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 full_status.initial_sync_ended); | 635 full_status.initial_sync_ended); |
636 AddBoolSyncDetail(details, L"Syncer Stuck", full_status.syncer_stuck); | 636 AddBoolSyncDetail(details, L"Syncer Stuck", full_status.syncer_stuck); |
637 AddIntSyncDetail(details, L"Updates Available", | 637 AddIntSyncDetail(details, L"Updates Available", |
638 full_status.updates_available); | 638 full_status.updates_available); |
639 AddIntSyncDetail(details, L"Updates Received", | 639 AddIntSyncDetail(details, L"Updates Received", |
640 full_status.updates_received); | 640 full_status.updates_received); |
641 AddBoolSyncDetail(details, L"Disk Full", full_status.disk_full); | 641 AddBoolSyncDetail(details, L"Disk Full", full_status.disk_full); |
642 AddBoolSyncDetail(details, L"Invalid Store", full_status.invalid_store); | 642 AddBoolSyncDetail(details, L"Invalid Store", full_status.invalid_store); |
643 AddIntSyncDetail(details, L"Max Consecutive Errors", | 643 AddIntSyncDetail(details, L"Max Consecutive Errors", |
644 full_status.max_consecutive_errors); | 644 full_status.max_consecutive_errors); |
| 645 |
| 646 if (service->unrecoverable_error_detected()) { |
| 647 strings.Set(L"unrecoverable_error_detected", new FundamentalValue(true)); |
| 648 strings.SetString(L"unrecoverable_error_message", |
| 649 service->unrecoverable_error_message()); |
| 650 tracked_objects::Location loc(service->unrecoverable_error_location()); |
| 651 std::string location_str; |
| 652 loc.Write(true, true, &location_str); |
| 653 strings.SetString(L"unrecoverable_error_location", location_str); |
| 654 } |
| 655 |
| 656 browser_sync::ModelSafeRoutingInfo routes; |
| 657 service->backend()->GetModelSafeRoutingInfo(&routes); |
| 658 ListValue* routing_info = new ListValue(); |
| 659 strings.Set(L"routing_info", routing_info); |
| 660 browser_sync::ModelSafeRoutingInfo::const_iterator it = routes.begin(); |
| 661 for (; it != routes.end(); ++it) { |
| 662 DictionaryValue* val = new DictionaryValue; |
| 663 val->SetString(L"model_type", ModelTypeToString(it->first)); |
| 664 val->SetString(L"group", ModelSafeGroupToString(it->second)); |
| 665 routing_info->Append(val); |
| 666 } |
645 } | 667 } |
646 | 668 |
647 static const base::StringPiece sync_html( | 669 static const base::StringPiece sync_html( |
648 ResourceBundle::GetSharedInstance().GetRawDataResource( | 670 ResourceBundle::GetSharedInstance().GetRawDataResource( |
649 IDR_ABOUT_SYNC_HTML)); | 671 IDR_ABOUT_SYNC_HTML)); |
650 | 672 |
651 return jstemplate_builder::GetTemplateHtml( | 673 return jstemplate_builder::GetTemplateHtml( |
652 sync_html, &strings , "t" /* template root node id */); | 674 sync_html, &strings , "t" /* template root node id */); |
653 } | 675 } |
654 | 676 |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1043 // Run the dialog. This will re-use the existing one if it's already up. | 1065 // Run the dialog. This will re-use the existing one if it's already up. |
1044 AboutIPCDialog::RunDialog(); | 1066 AboutIPCDialog::RunDialog(); |
1045 return true; | 1067 return true; |
1046 } | 1068 } |
1047 #endif | 1069 #endif |
1048 | 1070 |
1049 #endif // OFFICIAL_BUILD | 1071 #endif // OFFICIAL_BUILD |
1050 | 1072 |
1051 return false; | 1073 return false; |
1052 } | 1074 } |
OLD | NEW |