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

Unified Diff: chrome/browser/notifications/message_center_settings_controller.cc

Issue 24188002: Fix a memory leak in message_center_settings_controller.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/notifications/message_center_settings_controller.cc
===================================================================
--- chrome/browser/notifications/message_center_settings_controller.cc (revision 222257)
+++ chrome/browser/notifications/message_center_settings_controller.cc (working copy)
@@ -371,15 +371,14 @@
const size_t count = profile_info_cache_->GetNumberOfProfiles();
for (size_t i = 0; i < count; ++i) {
- message_center::ProfileNotifierGroup* group =
+ scoped_ptr<message_center::ProfileNotifierGroup> group(
new message_center::ProfileNotifierGroup(
profile_info_cache_->GetAvatarIconOfProfileAtIndex(i),
profile_info_cache_->GetNameOfProfileAtIndex(i),
profile_info_cache_->GetUserNameOfProfileAtIndex(i),
i,
- profile_info_cache_->GetPathOfProfileAtIndex(i));
- if (group->profile() != NULL) {
- notifier_groups_.push_back(group);
- }
+ profile_info_cache_->GetPathOfProfileAtIndex(i)));
+ if (group->profile() != NULL)
+ notifier_groups_.push_back(group.release());
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698