crash_upload_list.cc revision eb525c5499e34cc9c4b825d6d9e75bb07cc06ace
1// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/crash_upload_list.h"
6
7#include "base/files/file_path.h"
8#include "base/path_service.h"
9#include "chrome/common/chrome_paths.h"
10#if defined(OS_WIN)
11#include "chrome/browser/crash_upload_list_win.h"
12#endif
13
14// static
15const char* CrashUploadList::kReporterLogFilename = "uploads.log";
16
17// static
18CrashUploadList* CrashUploadList::Create(Delegate* delegate) {
19  base::FilePath crash_dir_path;
20  PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dir_path);
21  base::FilePath upload_log_path =
22      crash_dir_path.AppendASCII(kReporterLogFilename);
23#if defined(OS_WIN)
24  return new CrashUploadListWin(delegate, upload_log_path);
25#else
26  return new CrashUploadList(delegate, upload_log_path);
27#endif
28}
29
30CrashUploadList::CrashUploadList(Delegate* delegate,
31                                 const base::FilePath& upload_log_path)
32    : UploadList(delegate, upload_log_path) {}
33
34CrashUploadList::~CrashUploadList() {}
35