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

Side by Side Diff: ui/message_center/message_center_impl.cc

Issue 1123373007: Substitued pattern push_back(ptr.release()) with push_back(ptr.Pass()) in directory src/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed the review comments Created 5 years, 7 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
« no previous file with comments | « ui/app_list/search_provider.cc ('k') | ui/ozone/demo/ozone_demo.cc » ('j') | 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 "ui/message_center/message_center_impl.h" 5 #include "ui/message_center/message_center_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 NOTREACHED(); 244 NOTREACHED();
245 } 245 }
246 } 246 }
247 247
248 void ChangeQueue::EraseNotification(const std::string& id, bool by_user) { 248 void ChangeQueue::EraseNotification(const std::string& id, bool by_user) {
249 ScopedVector<Change>::reverse_iterator iter = 249 ScopedVector<Change>::reverse_iterator iter =
250 std::find_if(changes_.rbegin(), changes_.rend(), ChangeFinder(id)); 250 std::find_if(changes_.rbegin(), changes_.rend(), ChangeFinder(id));
251 if (iter == changes_.rend()) { 251 if (iter == changes_.rend()) {
252 scoped_ptr<Change> change(new Change(CHANGE_TYPE_DELETE, id, nullptr)); 252 scoped_ptr<Change> change(new Change(CHANGE_TYPE_DELETE, id, nullptr));
253 change->set_by_user(by_user); 253 change->set_by_user(by_user);
254 changes_.push_back(change.release()); 254 changes_.push_back(change.Pass());
255 return; 255 return;
256 } 256 }
257 257
258 Change* change = *iter; 258 Change* change = *iter;
259 switch (change->type()) { 259 switch (change->type()) {
260 case CHANGE_TYPE_ADD: 260 case CHANGE_TYPE_ADD:
261 // ADD -> DELETE. Just removes both. 261 // ADD -> DELETE. Just removes both.
262 changes_.erase(--(iter.base())); 262 changes_.erase(--(iter.base()));
263 break; 263 break;
264 case CHANGE_TYPE_UPDATE: 264 case CHANGE_TYPE_UPDATE:
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 void MessageCenterImpl::PausePopupTimers() { 939 void MessageCenterImpl::PausePopupTimers() {
940 if (popup_timers_controller_) 940 if (popup_timers_controller_)
941 popup_timers_controller_->PauseAll(); 941 popup_timers_controller_->PauseAll();
942 } 942 }
943 943
944 void MessageCenterImpl::DisableTimersForTest() { 944 void MessageCenterImpl::DisableTimersForTest() {
945 popup_timers_controller_.reset(); 945 popup_timers_controller_.reset();
946 } 946 }
947 947
948 } // namespace message_center 948 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/app_list/search_provider.cc ('k') | ui/ozone/demo/ozone_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698