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

Unified Diff: ash/desktop_background/desktop_background_widget_controller.h

Issue 10854153: Fix memory leak on Chromium OS Heapcheck and Chromium OS (valgrind) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use scoped ptr to manage ownership Created 8 years, 4 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
Index: ash/desktop_background/desktop_background_widget_controller.h
diff --git a/ash/desktop_background/desktop_background_widget_controller.h b/ash/desktop_background/desktop_background_widget_controller.h
index c50c4fa580c21507b90c96b9ea4213efd2b4502f..302e822375fcd5b80b40932eb66868acda59a09c 100644
--- a/ash/desktop_background/desktop_background_widget_controller.h
+++ b/ash/desktop_background/desktop_background_widget_controller.h
@@ -58,10 +58,13 @@ class ComponentWrapper {
explicit ComponentWrapper(
DesktopBackgroundWidgetController* component);
~ComponentWrapper() {}
- DesktopBackgroundWidgetController* component() { return component_; }
+
+ // Gets the wrapped DesktopBackgroundWidgetController pointer. Caller should
+ // take ownership of the pointer if |pass_ownership| is true.
+ DesktopBackgroundWidgetController* GetComponent(bool pass_ownership);
private:
- DesktopBackgroundWidgetController* component_;
+ scoped_ptr<DesktopBackgroundWidgetController> component_;
DISALLOW_COPY_AND_ASSIGN(ComponentWrapper);
};

Powered by Google App Engine
This is Rietveld 408576698