| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/crash_upload_list.h" | 5 #include "chrome/browser/crash_upload_list.h" |
| 6 | 6 |
| 7 #include <iterator> | 7 #include <iterator> |
| 8 | 8 |
| 9 #include "base/path_service.h" | |
| 10 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 11 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/path_service.h" |
| 12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
| 13 #include "base/string_split.h" | 13 #include "base/string_split.h" |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 #include "chrome/browser/crash_upload_list_win.h" | 15 #include "chrome/browser/crash_upload_list_win.h" |
| 16 #endif | 16 #endif |
| 17 #include "chrome/common/chrome_paths.h" | 17 #include "chrome/common/chrome_paths.h" |
| 18 #include "content/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
| 19 | 19 |
| 20 CrashUploadList::CrashInfo::CrashInfo(const std::string& c, const base::Time& t) | 20 CrashUploadList::CrashInfo::CrashInfo(const std::string& c, const base::Time& t) |
| 21 : crash_id(c), crash_time(t) {} | 21 : crash_id(c), crash_time(t) {} |
| 22 | 22 |
| 23 CrashUploadList::CrashInfo::~CrashInfo() {} | 23 CrashUploadList::CrashInfo::~CrashInfo() {} |
| 24 | 24 |
| 25 // static | 25 // static |
| 26 CrashUploadList* CrashUploadList::Create(Delegate* delegate) { | 26 CrashUploadList* CrashUploadList::Create(Delegate* delegate) { |
| 27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
| 28 return new CrashUploadListWin(delegate); | 28 return new CrashUploadListWin(delegate); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void CrashUploadList::GetUploadedCrashes(unsigned int max_count, | 92 void CrashUploadList::GetUploadedCrashes(unsigned int max_count, |
| 93 std::vector<CrashInfo>* crashes) { | 93 std::vector<CrashInfo>* crashes) { |
| 94 std::copy(crashes_.begin(), | 94 std::copy(crashes_.begin(), |
| 95 crashes_.begin() + std::min<size_t>(crashes_.size(), max_count), | 95 crashes_.begin() + std::min<size_t>(crashes_.size(), max_count), |
| 96 std::back_inserter(*crashes)); | 96 std::back_inserter(*crashes)); |
| 97 } | 97 } |
| 98 | 98 |
| 99 std::vector<CrashUploadList::CrashInfo>& CrashUploadList::crashes() { | 99 std::vector<CrashUploadList::CrashInfo>& CrashUploadList::crashes() { |
| 100 return crashes_; | 100 return crashes_; |
| 101 } | 101 } |
| OLD | NEW |