Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: components/crash/core/browser/crashes_ui_util.cc

Issue 2601853002: Revert of Fixed a bug where chrome crash omits crash time stamp after it's sent. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/crash/core/browser/resources/crashes.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 void UploadListToValue(UploadList* upload_list, base::ListValue* out_value) { 64 void UploadListToValue(UploadList* upload_list, base::ListValue* out_value) {
65 std::vector<UploadList::UploadInfo> crashes; 65 std::vector<UploadList::UploadInfo> crashes;
66 upload_list->GetUploads(50, &crashes); 66 upload_list->GetUploads(50, &crashes);
67 67
68 for (const auto& info : crashes) { 68 for (const auto& info : crashes) {
69 std::unique_ptr<base::DictionaryValue> crash(new base::DictionaryValue()); 69 std::unique_ptr<base::DictionaryValue> crash(new base::DictionaryValue());
70 crash->SetString("id", info.upload_id); 70 crash->SetString("id", info.upload_id);
71 if (info.state == UploadList::UploadInfo::State::Uploaded) { 71 if (info.state == UploadList::UploadInfo::State::Uploaded) {
72 crash->SetString("upload_time", 72 crash->SetString("time",
73 base::TimeFormatFriendlyDateAndTime(info.upload_time)); 73 base::TimeFormatFriendlyDateAndTime(info.upload_time));
74 } else {
75 crash->SetString("time",
76 base::TimeFormatFriendlyDateAndTime(info.capture_time));
74 } 77 }
75 crash->SetString("time",
76 base::TimeFormatFriendlyDateAndTime(info.capture_time));
77 crash->SetString("local_id", info.local_id); 78 crash->SetString("local_id", info.local_id);
78 crash->SetString("state", UploadInfoStateAsString(info.state)); 79 crash->SetString("state", UploadInfoStateAsString(info.state));
79 crash->SetString("file_size", info.file_size); 80 crash->SetString("file_size", info.file_size);
80 out_value->Append(std::move(crash)); 81 out_value->Append(std::move(crash));
81 } 82 }
82 } 83 }
83 84
84 } // namespace crash 85 } // namespace crash
OLDNEW
« no previous file with comments | « no previous file | components/crash/core/browser/resources/crashes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698