| Index: ui/base/x/x11_util.h
|
| diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h
|
| index ffcf8461c75613fe43ba39aeec23b08db6c298ed..36d7f40824be6658372cd1e4551e22a197a9d597 100644
|
| --- a/ui/base/x/x11_util.h
|
| +++ b/ui/base/x/x11_util.h
|
| @@ -301,8 +301,7 @@ UI_BASE_EXPORT bool WmSupportsHint(XAtom atom);
|
| // X11 allocator when done.
|
| class UI_BASE_EXPORT XRefcountedMemory : public base::RefCountedMemory {
|
| public:
|
| - XRefcountedMemory(unsigned char* x11_data, size_t length)
|
| - : x11_data_(length ? x11_data : NULL), length_(length) {}
|
| + XRefcountedMemory(unsigned char* x11_data, size_t length);
|
|
|
| // Overridden from RefCountedMemory:
|
| const unsigned char* front() const override;
|
| @@ -311,27 +310,12 @@ class UI_BASE_EXPORT XRefcountedMemory : public base::RefCountedMemory {
|
| private:
|
| ~XRefcountedMemory() override;
|
|
|
| - unsigned char* x11_data_;
|
| + gfx::XScopedPtr<unsigned char> x11_data_;
|
| size_t length_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(XRefcountedMemory);
|
| };
|
|
|
| -// Keeps track of a string returned by an X function (e.g. XGetAtomName) and
|
| -// makes sure it's XFree'd.
|
| -class UI_BASE_EXPORT XScopedString {
|
| - public:
|
| - explicit XScopedString(char* str) : string_(str) {}
|
| - ~XScopedString();
|
| -
|
| - const char* string() const { return string_; }
|
| -
|
| - private:
|
| - char* string_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(XScopedString);
|
| -};
|
| -
|
| // Keeps track of an image returned by an X function (e.g. XGetImage) and
|
| // makes sure it's XDestroyImage'd.
|
| class UI_BASE_EXPORT XScopedImage {
|
|
|