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

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: Fix max_count logic. 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..8206faedbb28adbf5dc6f8a341ee3ed3232b1501 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,19 +53,27 @@ class CrashUploadList : public base::RefCountedThreadSafe<CrashUploadList> {
void GetUploadedCrashes(unsigned int max_count,
std::vector<CrashInfo>* crashes);
- private:
- friend class base::RefCountedThreadSafe<CrashUploadList>;
+ protected:
virtual ~CrashUploadList();
// Reads the upload log and stores the lines in log_entries_.
- void LoadUploadLog();
+ virtual void LoadUploadLog();
// Calls the delegate's callback method, if there is a delegate.
- void InformDelegateOfCompletion();
+ void InformDelegateOfCompletionAsynchronously();
+
+ // Returns a reference to the list of log entries.
+ std::vector<std::string>& log_entries();
+
+ private:
+ friend class base::RefCountedThreadSafe<CrashUploadList>;
std::vector<std::string> log_entries_;
Delegate* delegate_;
+ // Calls the delegate's callback method, if there is a delegate.
+ void InformDelegateOfCompletion();
+
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