summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-22 21:05:54 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-22 21:05:54 +0000
commit234e826c700087b3bb68b364286b07e318f5e1aa (patch)
tree0a247bcb6e46e3c8202b1809bdfb061974f70146
parent8db351a4f3543c4f70f8c04c1a8bab4efbad066a (diff)
downloadchromium_src-234e826c700087b3bb68b364286b07e318f5e1aa.zip
chromium_src-234e826c700087b3bb68b364286b07e318f5e1aa.tar.gz
chromium_src-234e826c700087b3bb68b364286b07e318f5e1aa.tar.bz2
Cleanup: Make "uploads.log" a constant.
BUG=none TEST=none Review URL: http://codereview.chromium.org/9432015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123104 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/breakpad_linux.cc4
-rw-r--r--chrome/browser/crash_upload_list.cc7
-rw-r--r--chrome/browser/crash_upload_list.h12
3 files changed, 16 insertions, 7 deletions
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc
index 99f5491..b61efbd 100644
--- a/chrome/app/breakpad_linux.cc
+++ b/chrome/app/breakpad_linux.cc
@@ -31,6 +31,7 @@
#include "breakpad/src/client/linux/minidump_writer/directory_reader.h"
#include "breakpad/src/common/linux/linux_libc_support.h"
#include "breakpad/src/common/memory.h"
+#include "chrome/browser/crash_upload_list.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -781,7 +782,8 @@ void EnableCrashDumping(const bool unattended) {
FilePath dumps_path(tmp_path);
if (PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path)) {
- FilePath logfile = dumps_path.AppendASCII("uploads.log");
+ FilePath logfile =
+ dumps_path.AppendASCII(CrashUploadList::kReporterLogFilename);
std::string logfile_str = logfile.value();
const size_t crash_log_path_len = logfile_str.size() + 1;
g_crash_log_path = new char[crash_log_path_len];
diff --git a/chrome/browser/crash_upload_list.cc b/chrome/browser/crash_upload_list.cc
index 30c04f8..f19265c 100644
--- a/chrome/browser/crash_upload_list.cc
+++ b/chrome/browser/crash_upload_list.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/crash_upload_list.h"
-#include <iterator>
+#include <algorithm>
#include "base/bind.h"
#include "base/file_path.h"
@@ -34,6 +34,9 @@ CrashUploadList* CrashUploadList::Create(Delegate* delegate) {
#endif
}
+// static
+const char* CrashUploadList::kReporterLogFilename = "uploads.log";
+
CrashUploadList::CrashUploadList(Delegate* delegate) : delegate_(delegate) {}
CrashUploadList::~CrashUploadList() {}
diff --git a/chrome/browser/crash_upload_list.h b/chrome/browser/crash_upload_list.h
index c8b30d1..9446f8f 100644
--- a/chrome/browser/crash_upload_list.h
+++ b/chrome/browser/crash_upload_list.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,12 +6,12 @@
#define CHROME_BROWSER_CRASH_UPLOAD_LIST_H_
#pragma once
-#include "base/memory/ref_counted.h"
-#include "base/time.h"
-
#include <string>
#include <vector>
+#include "base/memory/ref_counted.h"
+#include "base/time.h"
+
class CrashUploadList : public base::RefCountedThreadSafe<CrashUploadList> {
public:
struct CrashInfo {
@@ -36,6 +36,10 @@ class CrashUploadList : public base::RefCountedThreadSafe<CrashUploadList> {
// of the crash upload list with the given callback delegate.
static CrashUploadList* Create(Delegate* delegate);
+ // Should match kReporterLogFilename in
+ // breakpad/src/client/apple/Framework/BreakpadDefines.h.
+ static const char* kReporterLogFilename;
+
// Creates a new crash upload list with the given callback delegate.
explicit CrashUploadList(Delegate* delegate);