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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/notifications/message_center_settings_controller.h" 5 #include "chrome/browser/notifications/message_center_settings_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/string_compare.h" 10 #include "base/i18n/string_compare.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 observers_, 364 observers_,
365 NotifierGroupChanged()); 365 NotifierGroupChanged());
366 } 366 }
367 367
368 void MessageCenterSettingsController::RebuildNotifierGroups() { 368 void MessageCenterSettingsController::RebuildNotifierGroups() {
369 notifier_groups_.clear(); 369 notifier_groups_.clear();
370 current_notifier_group_ = 0; 370 current_notifier_group_ = 0;
371 371
372 const size_t count = profile_info_cache_->GetNumberOfProfiles(); 372 const size_t count = profile_info_cache_->GetNumberOfProfiles();
373 for (size_t i = 0; i < count; ++i) { 373 for (size_t i = 0; i < count; ++i) {
374 message_center::ProfileNotifierGroup* group = 374 scoped_ptr<message_center::ProfileNotifierGroup> group(
375 new message_center::ProfileNotifierGroup( 375 new message_center::ProfileNotifierGroup(
376 profile_info_cache_->GetAvatarIconOfProfileAtIndex(i), 376 profile_info_cache_->GetAvatarIconOfProfileAtIndex(i),
377 profile_info_cache_->GetNameOfProfileAtIndex(i), 377 profile_info_cache_->GetNameOfProfileAtIndex(i),
378 profile_info_cache_->GetUserNameOfProfileAtIndex(i), 378 profile_info_cache_->GetUserNameOfProfileAtIndex(i),
379 i, 379 i,
380 profile_info_cache_->GetPathOfProfileAtIndex(i)); 380 profile_info_cache_->GetPathOfProfileAtIndex(i)));
381 if (group->profile() != NULL) { 381 if (group->profile() != NULL)
382 notifier_groups_.push_back(group); 382 notifier_groups_.push_back(group.release());
383 }
384 } 383 }
385 } 384 }
OLDNEW
« 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