win: Fix compilation errors for chrome35.

This commit is contained in:
Cheng Zhao 2014-07-11 12:19:01 +08:00
parent 497174bbe4
commit 8d4211bd3a
17 changed files with 44 additions and 60 deletions

View file

@ -1,14 +1,14 @@
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// This file is generated by script/bootstrap.py, you should never modify it
// by hand.
#ifndef ATOM_COMMON_CHROME_VERSION_H_
#define ATOM_COMMON_CHROME_VERSION_H_
#define CHROME_VERSION_STRING "35.0.1916.153"
#define CHROME_VERSION "v" CHROME_VERSION_STRING
#endif // ATOM_COMMON_CHROME_VERSION_H_
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// This file is generated by script/bootstrap.py, you should never modify it
// by hand.
#ifndef ATOM_COMMON_CHROME_VERSION_H_
#define ATOM_COMMON_CHROME_VERSION_H_
#define CHROME_VERSION_STRING "35.0.1916.153"
#define CHROME_VERSION "v" CHROME_VERSION_STRING
#endif // ATOM_COMMON_CHROME_VERSION_H_

View file

@ -40,14 +40,13 @@ void CrashReporterWin::InitBreakpad(const std::string& product_name,
skip_system_crash_handler_ = skip_system_crash_handler;
base::FilePath temp_dir;
if (!file_util::GetTempDir(&temp_dir)) {
if (!base::GetTempDir(&temp_dir)) {
LOG(ERROR) << "Cannot get temp directory";
return;
}
base::string16 pipe_name = ReplaceStringPlaceholders(kPipeNameFormat,
UTF8ToUTF16(product_name),
NULL);
base::string16 pipe_name = ReplaceStringPlaceholders(
kPipeNameFormat, base::UTF8ToUTF16(product_name), NULL);
// Wait until the crash service is started.
HANDLE waiting_event =
@ -104,13 +103,13 @@ google_breakpad::CustomClientInfo* CrashReporterWin::GetCustomInfo(
custom_info_entries_.push_back(google_breakpad::CustomInfoEntry(
L"prod", L"Atom-Shell"));
custom_info_entries_.push_back(google_breakpad::CustomInfoEntry(
L"ver", UTF8ToWide(version).c_str()));
L"ver", base::UTF8ToWide(version).c_str()));
for (StringMap::const_iterator iter = upload_parameters_.begin();
iter != upload_parameters_.end(); ++iter) {
custom_info_entries_.push_back(google_breakpad::CustomInfoEntry(
UTF8ToWide(iter->first).c_str(),
UTF8ToWide(iter->second).c_str()));
base::UTF8ToWide(iter->first).c_str(),
base::UTF8ToWide(iter->second).c_str()));
}
custom_info_.entries = &custom_info_entries_.front();

View file

@ -347,7 +347,7 @@ void CrashService::OnClientDumpRequest(void* context,
CrashMap::const_iterator it = map.find(L"breakpad-dump-location");
if (it != map.end()) {
base::FilePath alternate_dump_location = base::FilePath(it->second);
file_util::CreateDirectoryW(alternate_dump_location);
base::CreateDirectoryW(alternate_dump_location);
alternate_dump_location = alternate_dump_location.Append(
dump_location.BaseName());
base::Move(dump_location, alternate_dump_location);

View file

@ -23,11 +23,11 @@ const wchar_t kStandardLogFile[] = L"operation_log.txt";
bool GetCrashServiceDirectory(const std::wstring& application_name,
base::FilePath* dir) {
base::FilePath temp_dir;
if (!file_util::GetTempDir(&temp_dir))
if (!base::GetTempDir(&temp_dir))
return false;
temp_dir = temp_dir.Append(application_name + L" Crashes");
if (!base::PathExists(temp_dir)) {
if (!file_util::CreateDirectory(temp_dir))
if (!base::CreateDirectory(temp_dir))
return false;
}
*dir = temp_dir;

View file

@ -33,14 +33,9 @@ void SetupProcessObject(Environment*, int, const char* const*, int,
// Force all builtin modules to be referenced so they can actually run their
// DSO constructors, see http://git.io/DRIqCg.
#if defined(OS_WIN)
#define REFERENCE_MODULE(name) \
__pragma(comment(linker, "/export:_register_" #name))
#else
#define REFERENCE_MODULE(name) \
extern "C" void _register_ ## name(void); \
void (*fp_register_ ## name)(void) = _register_ ## name
#endif
// Node's builtin modules.
REFERENCE_MODULE(cares_wrap);
REFERENCE_MODULE(fs_event_wrap);
@ -103,11 +98,11 @@ scoped_ptr<const char*[]> StringVectorToArgArray(
#if defined(OS_WIN)
std::vector<std::string> String16VectorToStringVector(
const std::vector<string16>& vector) {
const std::vector<base::string16>& vector) {
std::vector<std::string> utf8_vector;
utf8_vector.reserve(vector.size());
for (size_t i = 0; i < vector.size(); ++i)
utf8_vector.push_back(UTF16ToUTF8(vector[i]));
utf8_vector.push_back(base::UTF16ToUTF8(vector[i]));
return utf8_vector;
}
#endif

View file

@ -29,7 +29,7 @@ namespace {
// is empty. This function tells if it is.
bool ValidateShellCommandForScheme(const std::string& scheme) {
base::win::RegKey key;
std::wstring registry_path = ASCIIToWide(scheme) +
std::wstring registry_path = base::ASCIIToWide(scheme) +
L"\\shell\\open\\command";
key.Open(HKEY_CLASSES_ROOT, registry_path.c_str(), KEY_READ);
if (!key.Valid())