| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/crash/core/browser/crashes_ui_util.h" | 5 #include "components/crash/core/browser/crashes_ui_util.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/i18n/time_formatting.h" | 11 #include "base/i18n/time_formatting.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "components/upload_list/upload_list.h" | 14 #include "components/upload_list/upload_list.h" |
| 15 #include "grit/components_chromium_strings.h" | 15 #include "grit/components_chromium_strings.h" |
| 16 #include "grit/components_google_chrome_strings.h" | 16 #include "grit/components_google_chrome_strings.h" |
| 17 #include "grit/components_strings.h" | 17 #include "grit/components_strings.h" |
| 18 | 18 |
| 19 namespace crash { | 19 namespace crash { |
| 20 | 20 |
| 21 const CrashesUILocalizedString kCrashesUILocalizedStrings[] = { | 21 const CrashesUILocalizedString kCrashesUILocalizedStrings[] = { |
| 22 {"bugLinkText", IDS_CRASH_BUG_LINK_LABEL}, | 22 {"bugLinkText", IDS_CRASH_BUG_LINK_LABEL}, |
| 23 {"crashCountFormat", IDS_CRASH_CRASH_COUNT_BANNER_FORMAT}, | 23 {"crashCountFormat", IDS_CRASH_CRASH_COUNT_BANNER_FORMAT}, |
| 24 {"crashHeaderFormat", IDS_CRASH_CRASH_HEADER_FORMAT}, | 24 {"crashHeaderFormat", IDS_CRASH_CRASH_HEADER_FORMAT}, |
| 25 {"crashTimeFormat", IDS_CRASH_CRASH_TIME_FORMAT}, | 25 {"crashTimeFormat", IDS_CRASH_CRASH_TIME_FORMAT}, |
| 26 {"crashNotUploaded", IDS_CRASH_CRASH_NOT_UPLOADED}, |
| 26 {"crashesTitle", IDS_CRASH_TITLE}, | 27 {"crashesTitle", IDS_CRASH_TITLE}, |
| 27 {"disabledHeader", IDS_CRASH_DISABLED_HEADER}, | 28 {"disabledHeader", IDS_CRASH_DISABLED_HEADER}, |
| 28 {"disabledMessage", IDS_CRASH_DISABLED_MESSAGE}, | 29 {"disabledMessage", IDS_CRASH_DISABLED_MESSAGE}, |
| 29 {"noCrashesMessage", IDS_CRASH_NO_CRASHES_MESSAGE}, | 30 {"noCrashesMessage", IDS_CRASH_NO_CRASHES_MESSAGE}, |
| 30 {"uploadCrashesLinkText", IDS_CRASH_UPLOAD_MESSAGE}, | 31 {"uploadCrashesLinkText", IDS_CRASH_UPLOAD_MESSAGE}, |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 const size_t kCrashesUILocalizedStringsCount = | 34 const size_t kCrashesUILocalizedStringsCount = |
| 34 arraysize(kCrashesUILocalizedStrings); | 35 arraysize(kCrashesUILocalizedStrings); |
| 35 | 36 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 47 std::unique_ptr<base::DictionaryValue> crash(new base::DictionaryValue()); | 48 std::unique_ptr<base::DictionaryValue> crash(new base::DictionaryValue()); |
| 48 crash->SetString("id", info.upload_id); | 49 crash->SetString("id", info.upload_id); |
| 49 crash->SetString("time", | 50 crash->SetString("time", |
| 50 base::TimeFormatFriendlyDateAndTime(info.upload_time)); | 51 base::TimeFormatFriendlyDateAndTime(info.upload_time)); |
| 51 crash->SetString("local_id", info.local_id); | 52 crash->SetString("local_id", info.local_id); |
| 52 out_value->Append(std::move(crash)); | 53 out_value->Append(std::move(crash)); |
| 53 } | 54 } |
| 54 } | 55 } |
| 55 | 56 |
| 56 } // namespace crash | 57 } // namespace crash |
| OLD | NEW |