Merge branch 'master' into chrome52

This commit is contained in:
Cheng Zhao 2016-07-21 05:34:36 -06:00
commit b57665330c
203 changed files with 2352 additions and 1220 deletions

View file

@ -63,10 +63,10 @@ float GetScaleFactorFromPath(const base::FilePath& path) {
// We don't try to convert string to float here because it is very very
// expensive.
for (unsigned i = 0; i < node::arraysize(kScaleFactorPairs); ++i) {
if (base::EndsWith(filename, kScaleFactorPairs[i].name,
for (const auto& kScaleFactorPair : kScaleFactorPairs) {
if (base::EndsWith(filename, kScaleFactorPair.name,
base::CompareCase::INSENSITIVE_ASCII))
return kScaleFactorPairs[i].scale;
return kScaleFactorPair.scale;
}
return 1.0f;

View file

@ -7,12 +7,19 @@
#include "atom/common/platform_util.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/node_includes.h"
#include "native_mate/dictionary.h"
namespace {
bool OpenExternal(const GURL& url, mate::Arguments* args) {
bool OpenExternal(
#if defined(OS_WIN)
const base::string16& url,
#else
const GURL& url,
#endif
mate::Arguments* args) {
bool activate = true;
if (args->Length() == 2) {
mate::Dictionary options;

View file

@ -25,7 +25,7 @@ namespace {
struct DummyClass { bool crash; };
void Crash() {
static_cast<DummyClass*>(NULL)->crash = true;
static_cast<DummyClass*>(nullptr)->crash = true;
}
void Hang() {