Update to Chromium version 70.0.3516.0 (#581409)

This commit is contained in:
Marshall Greenblatt
2018-08-09 16:18:24 -04:00
parent a659b48fd1
commit ea0e213bef
61 changed files with 315 additions and 280 deletions

View File

@@ -59,6 +59,7 @@ namespace cef_subtle {
class RefCountedBase {
public:
bool HasOneRef() const { return ref_count_ == 1; }
bool HasAtLeastOneRef() const { return ref_count_ >= 1; }
protected:
RefCountedBase()
@@ -109,6 +110,7 @@ class RefCountedBase {
class RefCountedThreadSafeBase {
public:
bool HasOneRef() const;
bool HasAtLeastOneRef() const;
protected:
RefCountedThreadSafeBase();

View File

@@ -69,6 +69,11 @@ typedef struct _cef_base_ref_counted_t {
// Returns true (1) if the current reference count is 1.
///
int(CEF_CALLBACK* has_one_ref)(struct _cef_base_ref_counted_t* self);
///
// Returns true (1) if the current reference count is at least 1.
///
int(CEF_CALLBACK* has_at_least_one_ref)(struct _cef_base_ref_counted_t* self);
} cef_base_ref_counted_t;
///

View File

@@ -68,6 +68,11 @@ class CefBaseRefCounted {
///
virtual bool HasOneRef() const = 0;
///
// Returns true if the reference count is at least 1.
///
virtual bool HasAtLeastOneRef() const = 0;
protected:
virtual ~CefBaseRefCounted() {}
};
@@ -102,6 +107,13 @@ class CefRefCount {
///
bool HasOneRef() const { return base::AtomicRefCountIsOne(&ref_count_); }
///
// Returns true if the reference count is at least 1.
///
bool HasAtLeastOneRef() const {
return !base::AtomicRefCountIsZero(&ref_count_);
}
private:
mutable base::AtomicRefCount ref_count_;
DISALLOW_COPY_AND_ASSIGN(CefRefCount);
@@ -122,6 +134,9 @@ class CefRefCount {
return false; \
} \
bool HasOneRef() const OVERRIDE { return ref_count_.HasOneRef(); } \
bool HasAtLeastOneRef() const OVERRIDE { \
return ref_count_.HasAtLeastOneRef(); \
} \
\
private: \
CefRefCount ref_count_;