Update to API changes of Chrome 47

This commit is contained in:
Cheng Zhao 2015-12-07 19:56:23 +08:00
parent 766bbfcb05
commit 73e7773d84
46 changed files with 113 additions and 239 deletions

View file

@ -48,11 +48,11 @@ CrashReporter::GetUploadedReports(const std::string& path) {
std::vector<CrashReporter::UploadReportResult> result;
if (base::ReadFileToString(base::FilePath::FromUTF8Unsafe(path),
&file_content)) {
std::vector<std::string> reports;
base::SplitString(file_content, '\n', &reports);
std::vector<std::string> reports = base::SplitString(
file_content, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
for (const std::string& report : reports) {
std::vector<std::string> report_item;
base::SplitString(report, ',', &report_item);
std::vector<std::string> report_item = base::SplitString(
report, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
int report_time = 0;
if (report_item.size() >= 2 && base::StringToInt(report_item[0],
&report_time)) {

View file

@ -130,7 +130,7 @@ bool CrashReporterLinux::CrashDone(const MinidumpDescriptor& minidump,
// static
CrashReporterLinux* CrashReporterLinux::GetInstance() {
return Singleton<CrashReporterLinux>::get();
return base::Singleton<CrashReporterLinux>::get();
}
// static

View file

@ -12,7 +12,9 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
namespace base {
template <typename T> struct DefaultSingletonTraits;
}
namespace google_breakpad {
class ExceptionHandler;
@ -34,7 +36,7 @@ class CrashReporterLinux : public CrashReporter {
void SetUploadParameters() override;
private:
friend struct DefaultSingletonTraits<CrashReporterLinux>;
friend struct base::DefaultSingletonTraits<CrashReporterLinux>;
CrashReporterLinux();
virtual ~CrashReporterLinux();

View file

@ -14,7 +14,9 @@
#include "base/strings/string_piece.h"
#include "vendor/crashpad/client/simple_string_dictionary.h"
namespace base {
template <typename T> struct DefaultSingletonTraits;
}
namespace crash_reporter {
@ -31,7 +33,7 @@ class CrashReporterMac : public CrashReporter {
void SetUploadParameters() override;
private:
friend struct DefaultSingletonTraits<CrashReporterMac>;
friend struct base::DefaultSingletonTraits<CrashReporterMac>;
CrashReporterMac();
virtual ~CrashReporterMac();

View file

@ -126,7 +126,7 @@ CrashReporterMac::GetUploadedReports(const std::string& path) {
// static
CrashReporterMac* CrashReporterMac::GetInstance() {
return Singleton<CrashReporterMac>::get();
return base::Singleton<CrashReporterMac>::get();
}
// static

View file

@ -259,7 +259,7 @@ google_breakpad::CustomClientInfo* CrashReporterWin::GetCustomInfo(
// static
CrashReporterWin* CrashReporterWin::GetInstance() {
return Singleton<CrashReporterWin>::get();
return base::Singleton<CrashReporterWin>::get();
}
// static

View file

@ -13,7 +13,9 @@
#include "base/memory/scoped_ptr.h"
#include "vendor/breakpad/src/client/windows/handler/exception_handler.h"
namespace base {
template <typename T> struct DefaultSingletonTraits;
}
namespace crash_reporter {
@ -33,7 +35,7 @@ class CrashReporterWin : public CrashReporter {
int CrashForException(EXCEPTION_POINTERS* info);
private:
friend struct DefaultSingletonTraits<CrashReporterWin>;
friend struct base::DefaultSingletonTraits<CrashReporterWin>;
CrashReporterWin();
virtual ~CrashReporterWin();