commit
6aec1e6949
145 changed files with 642 additions and 585 deletions
|
@ -27,12 +27,12 @@ class Archive : public mate::Wrappable {
|
|||
scoped_ptr<asar::Archive> archive(new asar::Archive(path));
|
||||
if (!archive->Init())
|
||||
return v8::False(isolate);
|
||||
return (new Archive(archive.Pass()))->GetWrapper(isolate);
|
||||
return (new Archive(std::move(archive)))->GetWrapper(isolate);
|
||||
}
|
||||
|
||||
protected:
|
||||
explicit Archive(scoped_ptr<asar::Archive> archive)
|
||||
: archive_(archive.Pass()) {}
|
||||
: archive_(std::move(archive)) {}
|
||||
|
||||
// Reads the offset and size of file.
|
||||
v8::Local<v8::Value> GetFileInfo(v8::Isolate* isolate,
|
||||
|
|
|
@ -109,8 +109,8 @@ base::string16 ReadHtml(mate::Arguments* args) {
|
|||
base::string16 data;
|
||||
base::string16 html;
|
||||
std::string url;
|
||||
uint32 start;
|
||||
uint32 end;
|
||||
uint32_t start;
|
||||
uint32_t end;
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
clipboard->ReadHTML(GetClipboardType(args), &html, &url, &start, &end);
|
||||
data = html.substr(start, end - start);
|
||||
|
|
|
@ -158,11 +158,11 @@ bool ReadImageSkiaFromICO(gfx::ImageSkia* image, const base::FilePath& path) {
|
|||
base::win::ScopedHICON icon(static_cast<HICON>(
|
||||
LoadImage(NULL, image_path.value().c_str(), IMAGE_ICON, 0, 0,
|
||||
LR_DEFAULTSIZE | LR_LOADFROMFILE)));
|
||||
if (!icon)
|
||||
if (!icon.get())
|
||||
return false;
|
||||
|
||||
// Convert the icon from the Windows specific HICON to gfx::ImageSkia.
|
||||
scoped_ptr<SkBitmap> bitmap(IconUtil::CreateSkBitmapFromHICON(icon));
|
||||
scoped_ptr<SkBitmap> bitmap(IconUtil:: CreateSkBitmapFromHICON(icon.get()));
|
||||
image->AddRepresentation(gfx::ImageSkiaRep(*bitmap, 1.0f));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <list>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "v8/include/v8.h"
|
||||
#include "vendor/node/deps/uv/include/uv.h"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef ATOM_COMMON_API_OBJECT_LIFE_MONITOR_H_
|
||||
#define ATOM_COMMON_API_OBJECT_LIFE_MONITOR_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
|
|
|
@ -90,12 +90,12 @@ bool GetNodeFromPath(std::string path,
|
|||
}
|
||||
|
||||
bool FillFileInfoWithNode(Archive::FileInfo* info,
|
||||
uint32 header_size,
|
||||
uint32_t header_size,
|
||||
const base::DictionaryValue* node) {
|
||||
int size;
|
||||
if (!node->GetInteger("size", &size))
|
||||
return false;
|
||||
info->size = static_cast<uint32>(size);
|
||||
info->size = static_cast<uint32_t>(size);
|
||||
|
||||
if (node->GetBoolean("unpacked", &info->unpacked) && info->unpacked)
|
||||
return true;
|
||||
|
@ -157,7 +157,7 @@ bool Archive::Init() {
|
|||
return false;
|
||||
}
|
||||
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
if (!base::PickleIterator(base::Pickle(buf.data(), buf.size())).ReadUInt32(
|
||||
&size)) {
|
||||
LOG(ERROR) << "Failed to parse header size from " << path_.value();
|
||||
|
@ -296,7 +296,7 @@ bool Archive::CopyFileOut(const base::FilePath& path, base::FilePath* out) {
|
|||
#endif
|
||||
|
||||
*out = temp_file->path();
|
||||
external_files_.set(path, temp_file.Pass());
|
||||
external_files_.set(path, std::move(temp_file));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ class Archive {
|
|||
FileInfo() : unpacked(false), executable(false), size(0), offset(0) {}
|
||||
bool unpacked;
|
||||
bool executable;
|
||||
uint32 size;
|
||||
uint64 offset;
|
||||
uint32_t size;
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
struct Stats : public FileInfo {
|
||||
|
@ -71,7 +71,7 @@ class Archive {
|
|||
base::FilePath path_;
|
||||
base::File file_;
|
||||
int fd_;
|
||||
uint32 header_size_;
|
||||
uint32_t header_size_;
|
||||
scoped_ptr<base::DictionaryValue> header_;
|
||||
|
||||
// Cached external temporary files.
|
||||
|
|
|
@ -51,7 +51,7 @@ bool ScopedTemporaryFile::Init(const base::FilePath::StringType& ext) {
|
|||
|
||||
bool ScopedTemporaryFile::InitFromFile(base::File* src,
|
||||
const base::FilePath::StringType& ext,
|
||||
uint64 offset, uint64 size) {
|
||||
uint64_t offset, uint64_t size) {
|
||||
if (!src->IsValid())
|
||||
return false;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class ScopedTemporaryFile {
|
|||
// Init an temporary file and fill it with content of |path|.
|
||||
bool InitFromFile(base::File* src,
|
||||
const base::FilePath::StringType& ext,
|
||||
uint64 offset, uint64 size);
|
||||
uint64_t offset, uint64_t size);
|
||||
|
||||
base::FilePath path() const { return path_; }
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#ifndef ATOM_COMMON_CHROME_VERSION_H_
|
||||
#define ATOM_COMMON_CHROME_VERSION_H_
|
||||
|
||||
#define CHROME_VERSION_STRING "47.0.2526.110"
|
||||
#define CHROME_VERSION_STRING "49.0.2623.75"
|
||||
#define CHROME_VERSION "v" CHROME_VERSION_STRING
|
||||
|
||||
#endif // ATOM_COMMON_CHROME_VERSION_H_
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
|
||||
namespace crash_reporter {
|
||||
|
||||
|
|
|
@ -48,7 +48,8 @@ void CrashReporterMac::InitBreakpad(const std::string& product_name,
|
|||
if (crashpad_client.StartHandler(handler_path, database_path,
|
||||
submit_url,
|
||||
StringMap(),
|
||||
std::vector<std::string>())) {
|
||||
std::vector<std::string>(),
|
||||
true)) {
|
||||
crashpad_client.UseHandler();
|
||||
}
|
||||
} // @autoreleasepool
|
||||
|
|
|
@ -6,7 +6,11 @@
|
|||
#ifndef ATOM_COMMON_CRASH_REPORTER_LINUX_CRASH_DUMP_HANDLER_H_
|
||||
#define ATOM_COMMON_CRASH_REPORTER_LINUX_CRASH_DUMP_HANDLER_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "vendor/breakpad/src/common/simple_string_dictionary.h"
|
||||
|
||||
namespace crash_reporter {
|
||||
|
|
|
@ -86,7 +86,7 @@ bool WriteReportIDToFile(const std::wstring& dump_path,
|
|||
if (!file.is_open())
|
||||
return false;
|
||||
|
||||
int64 seconds_since_epoch =
|
||||
int64_t seconds_since_epoch =
|
||||
(base::Time::Now() - base::Time::UnixEpoch()).InSeconds();
|
||||
std::wstring line = base::Int64ToString16(seconds_since_epoch);
|
||||
line += L',';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ v8::Local<v8::Value> Converter<const net::URLRequest*>::ToV8(
|
|||
scoped_ptr<base::ListValue> list(new base::ListValue);
|
||||
atom::GetUploadData(list.get(), val);
|
||||
if (!list->empty())
|
||||
dict->Set("uploadData", list.Pass());
|
||||
dict->Set("uploadData", std::move(list));
|
||||
return mate::ConvertToV8(isolate, *(dict.get()));
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ void GetUploadData(base::ListValue* upload_data_list,
|
|||
const net::UploadDataStream* upload_data = request->get_upload();
|
||||
if (!upload_data)
|
||||
return;
|
||||
const ScopedVector<net::UploadElementReader>* readers =
|
||||
const std::vector<scoped_ptr<net::UploadElementReader>>* readers =
|
||||
upload_data->GetElementReaders();
|
||||
for (const auto& reader : *readers) {
|
||||
scoped_ptr<base::DictionaryValue> upload_data_dict(
|
||||
|
@ -85,14 +85,14 @@ void GetUploadData(base::ListValue* upload_data_list,
|
|||
scoped_ptr<base::Value> bytes(
|
||||
base::BinaryValue::CreateWithCopiedBuffer(bytes_reader->bytes(),
|
||||
bytes_reader->length()));
|
||||
upload_data_dict->Set("bytes", bytes.Pass());
|
||||
upload_data_dict->Set("bytes", std::move(bytes));
|
||||
} else if (reader->AsFileReader()) {
|
||||
const net::UploadFileElementReader* file_reader =
|
||||
reader->AsFileReader();
|
||||
auto file_path = file_reader->path().AsUTF8Unsafe();
|
||||
upload_data_dict->SetStringWithoutPathExpansion("file", file_path);
|
||||
}
|
||||
upload_data_list->Append(upload_data_dict.Pass());
|
||||
upload_data_list->Append(std::move(upload_data_dict));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Array(
|
|||
CHECK(!child_v8.IsEmpty());
|
||||
|
||||
v8::TryCatch try_catch;
|
||||
result->Set(static_cast<uint32>(i), child_v8);
|
||||
result->Set(static_cast<uint32_t>(i), child_v8);
|
||||
if (try_catch.HasCaught())
|
||||
LOG(ERROR) << "Setter for index " << i << " threw an exception.";
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ base::Value* V8ValueConverter::FromV8Array(
|
|||
base::ListValue* result = new base::ListValue();
|
||||
|
||||
// Only fields with integer keys are carried over to the ListValue.
|
||||
for (uint32 i = 0; i < val->Length(); ++i) {
|
||||
for (uint32_t i = 0; i < val->Length(); ++i) {
|
||||
v8::TryCatch try_catch;
|
||||
v8::Local<v8::Value> child_v8 = val->Get(i);
|
||||
if (try_catch.HasCaught()) {
|
||||
|
@ -345,7 +345,7 @@ base::Value* V8ValueConverter::FromV8Object(
|
|||
scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
|
||||
v8::Local<v8::Array> property_names(val->GetOwnPropertyNames());
|
||||
|
||||
for (uint32 i = 0; i < property_names->Length(); ++i) {
|
||||
for (uint32_t i = 0; i < property_names->Length(); ++i) {
|
||||
v8::Local<v8::Value> key(property_names->Get(i));
|
||||
|
||||
// Extend this test to cover more types as necessary and if sensible.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_
|
||||
#define ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ scoped_ptr<const char*[]> StringVectorToArgArray(
|
|||
for (size_t i = 0; i < vector.size(); ++i) {
|
||||
array[i] = vector[i].c_str();
|
||||
}
|
||||
return array.Pass();
|
||||
return array;
|
||||
}
|
||||
|
||||
base::FilePath GetResourcesPath(bool is_browser) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef ATOM_COMMON_NODE_BINDINGS_H_
|
||||
#define ATOM_COMMON_NODE_BINDINGS_H_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "v8/include/v8.h"
|
||||
#include "vendor/node/deps/uv/include/uv.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue