Chromium Code Reviews| 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..540916af2d492558cbbfd6f48b3969f95570b632 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,28 @@ 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_. |
|
stuartmorgan
2011/03/30 16:28:10
s/log_entries_/crashes_/
Alexei Svitkine (slow)
2011/03/30 18:54:37
Done.
|
| - void LoadUploadLog(); |
| + virtual void LoadCrashList(); |
| - // Calls the delegate's callback method, if there is a delegate. |
| - void InformDelegateOfCompletion(); |
| + // Returns a reference to the list of log entries. |
|
stuartmorgan
2011/03/30 16:28:10
s/log entries/crashes/
Alexei Svitkine (slow)
2011/03/30 18:54:37
Done.
|
| + std::vector<CrashInfo>& crashes(); |
| + |
| + private: |
| + friend class base::RefCountedThreadSafe<CrashUploadList>; |
| - std::vector<std::string> log_entries_; |
| + std::vector<CrashInfo> crashes_; |
| Delegate* delegate_; |
|
stuartmorgan
2011/03/30 16:28:10
Variables should be after functions.
Alexei Svitkine (slow)
2011/03/30 18:54:37
Done.
|
| + // Calls LoadCrashList() followed by InformDelegateOfCompletion() |
| + // asynchronously. |
|
stuartmorgan
2011/03/30 16:28:10
Too much implementation detail for the header; how
Alexei Svitkine (slow)
2011/03/30 18:54:37
Done.
|
| + void LoadCrashListAndInformDelegateOfCompletion(); |
| + |
| + // Calls the delegate's callback method, if there is a delegate. |
| + void InformDelegateOfCompletion(); |
| + |
| DISALLOW_COPY_AND_ASSIGN(CrashUploadList); |
| }; |