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

Unified Diff: chrome/browser/crash_upload_list.h

Issue 6771021: Implement CrashUploadListWin to enable chrome://crashes on Windows. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Less strict crash string parsing. Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/crash_upload_list.cc » ('j') | chrome/browser/crash_upload_list.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/crash_upload_list.h
diff --git a/chrome/browser/crash_upload_list.h b/chrome/browser/crash_upload_list.h
index 9d5d24333e9e4bc626e4a930e7ff30ac38180dc9..c8b30d113f422500780c401e7a62525fe9f7e72d 100644
--- a/chrome/browser/crash_upload_list.h
+++ b/chrome/browser/crash_upload_list.h
@@ -32,6 +32,10 @@ class CrashUploadList : public base::RefCountedThreadSafe<CrashUploadList> {
virtual ~Delegate() {}
};
+ // Static factory method that creates the platform-specific implementation
+ // of the crash upload list with the given callback delegate.
+ static CrashUploadList* Create(Delegate* delegate);
+
// Creates a new crash upload list with the given callback delegate.
explicit CrashUploadList(Delegate* delegate);
@@ -49,17 +53,28 @@ class CrashUploadList : public base::RefCountedThreadSafe<CrashUploadList> {
void GetUploadedCrashes(unsigned int max_count,
std::vector<CrashInfo>* crashes);
+ protected:
+ virtual ~CrashUploadList();
+
+ // Reads the upload log and stores the entries in crashes_.
+ virtual void LoadCrashList();
+
+ // Returns a reference to the list of crashes.
+ std::vector<CrashInfo>& crashes();
+
private:
friend class base::RefCountedThreadSafe<CrashUploadList>;
- virtual ~CrashUploadList();
- // Reads the upload log and stores the lines in log_entries_.
- void LoadUploadLog();
+ // Manages the background thread work for LoadCrashListAsynchronously().
+ void LoadCrashListAndInformDelegateOfCompletion();
// Calls the delegate's callback method, if there is a delegate.
void InformDelegateOfCompletion();
- std::vector<std::string> log_entries_;
+ // Parses crash log lines, converting them to CrashInfo entries.
+ void ParseLogEntries(const std::vector<std::string>& log_entries);
+
+ std::vector<CrashInfo> crashes_;
Delegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(CrashUploadList);
« no previous file with comments | « no previous file | chrome/browser/crash_upload_list.cc » ('j') | chrome/browser/crash_upload_list.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698