Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(970)

Unified Diff: ui/gfx/image/image.h

Issue 1099473003: gfx::Image: AddRepresentation takes a scoped_ptr, not a raw ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base-scopedmap
Patch Set: Fix potential null dereference (use after release). Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gfx/image/image.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image.h
diff --git a/ui/gfx/image/image.h b/ui/gfx/image/image.h
index 19ca93dada9df66aa1db4c5f76f04c4cdb9d282c..87c80834f711191d515ba4927a8455f015268ee2 100644
--- a/ui/gfx/image/image.h
+++ b/ui/gfx/image/image.h
@@ -25,6 +25,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted_memory.h"
+#include "base/memory/scoped_ptr.h"
#include "ui/gfx/gfx_export.h"
#include "ui/gfx/native_widget_types.h"
@@ -186,7 +187,7 @@ class GFX_EXPORT Image {
RepresentationType rep_type, bool must_exist) const;
// Stores a representation into the map.
- void AddRepresentation(internal::ImageRep* rep) const;
+ void AddRepresentation(scoped_ptr<internal::ImageRep> rep) const;
// Internal class that holds all the representations. This allows the Image to
// be cheaply copied.
« no previous file with comments | « no previous file | ui/gfx/image/image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698