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

Side by Side Diff: components/upload_list/upload_list.cc

Issue 2301943003: Show not uploaded crashes for Android. (Closed)
Patch Set: rebase Created 4 years, 3 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 | « components/upload_list/upload_list.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/upload_list/upload_list.h" 5 #include "components/upload_list/upload_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 if (base::PathExists(upload_log_path_)) { 71 if (base::PathExists(upload_log_path_)) {
72 std::string contents; 72 std::string contents;
73 base::ReadFileToString(upload_log_path_, &contents); 73 base::ReadFileToString(upload_log_path_, &contents);
74 std::vector<std::string> log_entries = base::SplitString( 74 std::vector<std::string> log_entries = base::SplitString(
75 contents, base::kWhitespaceASCII, base::KEEP_WHITESPACE, 75 contents, base::kWhitespaceASCII, base::KEEP_WHITESPACE,
76 base::SPLIT_WANT_NONEMPTY); 76 base::SPLIT_WANT_NONEMPTY);
77 ParseLogEntries(log_entries, uploads); 77 ParseLogEntries(log_entries, uploads);
78 } 78 }
79 } 79 }
80 80
81 const base::FilePath& UploadList::upload_log_path() const {
82 return upload_log_path_;
83 }
84
81 void UploadList::ParseLogEntries( 85 void UploadList::ParseLogEntries(
82 const std::vector<std::string>& log_entries, 86 const std::vector<std::string>& log_entries,
83 std::vector<UploadInfo>* uploads) { 87 std::vector<UploadInfo>* uploads) {
84 std::vector<std::string>::const_reverse_iterator i; 88 std::vector<std::string>::const_reverse_iterator i;
85 for (i = log_entries.rbegin(); i != log_entries.rend(); ++i) { 89 for (i = log_entries.rbegin(); i != log_entries.rend(); ++i) {
86 std::vector<std::string> components = base::SplitString( 90 std::vector<std::string> components = base::SplitString(
87 *i, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 91 *i, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
88 // Skip any blank (or corrupted) lines. 92 // Skip any blank (or corrupted) lines.
89 if (components.size() < 2 || components.size() > 5) 93 if (components.size() < 2 || components.size() > 5)
90 continue; 94 continue;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 FROM_HERE, 145 FROM_HERE,
142 base::Bind(&UploadList::RequestSingleCrashUpload, this, local_id)); 146 base::Bind(&UploadList::RequestSingleCrashUpload, this, local_id));
143 #endif 147 #endif
144 } 148 }
145 149
146 void UploadList::RequestSingleCrashUpload(const std::string& local_id) { 150 void UploadList::RequestSingleCrashUpload(const std::string& local_id) {
147 // Manual uploads for not uploaded crash reports are not available for non 151 // Manual uploads for not uploaded crash reports are not available for non
148 // crashpad systems. 152 // crashpad systems.
149 NOTREACHED(); 153 NOTREACHED();
150 } 154 }
OLDNEW
« no previous file with comments | « components/upload_list/upload_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698