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

Side by Side Diff: chrome/browser/browsing_data/cookies_tree_model.cc

Issue 1782963002: Remove std::mem_fun uses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browsing_data/cookies_tree_model.h" 5 #include "chrome/browser/browsing_data/cookies_tree_model.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 const std::string& flash_lso_domain) { 283 const std::string& flash_lso_domain) {
284 Init(TYPE_FLASH_LSO); 284 Init(TYPE_FLASH_LSO);
285 this->flash_lso_domain = flash_lso_domain; 285 this->flash_lso_domain = flash_lso_domain;
286 return *this; 286 return *this;
287 } 287 }
288 288
289 /////////////////////////////////////////////////////////////////////////////// 289 ///////////////////////////////////////////////////////////////////////////////
290 // CookieTreeNode, public: 290 // CookieTreeNode, public:
291 291
292 void CookieTreeNode::DeleteStoredObjects() { 292 void CookieTreeNode::DeleteStoredObjects() {
293 std::for_each(children().begin(), 293 for (auto* child : children())
294 children().end(), 294 child->DeleteStoredObjects();
Nico 2016/03/10 22:23:18 \o/
295 std::mem_fun(&CookieTreeNode::DeleteStoredObjects));
296 } 295 }
297 296
298 CookiesTreeModel* CookieTreeNode::GetModel() const { 297 CookiesTreeModel* CookieTreeNode::GetModel() const {
299 if (parent()) 298 if (parent())
300 return parent()->GetModel(); 299 return parent()->GetModel();
301 return nullptr; 300 return nullptr;
302 } 301 }
303 302
304 /////////////////////////////////////////////////////////////////////////////// 303 ///////////////////////////////////////////////////////////////////////////////
305 // CookieTreeCookieNode, public: 304 // CookieTreeCookieNode, public:
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 void CookiesTreeModel::MaybeNotifyBatchesEnded() { 1547 void CookiesTreeModel::MaybeNotifyBatchesEnded() {
1549 // Only notify the observers if this is the outermost call to EndBatch() if 1548 // Only notify the observers if this is the outermost call to EndBatch() if
1550 // called in a nested manner. 1549 // called in a nested manner.
1551 if (batches_ended_ == batches_started_ && 1550 if (batches_ended_ == batches_started_ &&
1552 batches_seen_ == batches_expected_) { 1551 batches_seen_ == batches_expected_) {
1553 FOR_EACH_OBSERVER(Observer, 1552 FOR_EACH_OBSERVER(Observer,
1554 cookies_observer_list_, 1553 cookies_observer_list_,
1555 TreeModelEndBatch(this)); 1554 TreeModelEndBatch(this));
1556 } 1555 }
1557 } 1556 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.cc » ('j') | chromeos/dbus/services/service_provider_test_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698