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

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

Issue 10073022: Use weak_ptr for OnServerBoundCertModelInfoLoaded callback too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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) 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/cookies_tree_model.h" 5 #include "chrome/browser/cookies_tree_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 690
691 if (quota_helper_) { 691 if (quota_helper_) {
692 quota_helper_->StartFetching( 692 quota_helper_->StartFetching(
693 base::Bind(&CookiesTreeModel::OnQuotaModelInfoLoaded, 693 base::Bind(&CookiesTreeModel::OnQuotaModelInfoLoaded,
694 weak_ptr_factory_.GetWeakPtr())); 694 weak_ptr_factory_.GetWeakPtr()));
695 } 695 }
696 696
697 if (server_bound_cert_helper_) { 697 if (server_bound_cert_helper_) {
698 server_bound_cert_helper_->StartFetching( 698 server_bound_cert_helper_->StartFetching(
699 base::Bind(&CookiesTreeModel::OnServerBoundCertModelInfoLoaded, 699 base::Bind(&CookiesTreeModel::OnServerBoundCertModelInfoLoaded,
700 base::Unretained(this))); 700 weak_ptr_factory_.GetWeakPtr()));
701 } 701 }
702 } 702 }
703 703
704 CookiesTreeModel::~CookiesTreeModel() {} 704 CookiesTreeModel::~CookiesTreeModel() {}
705 705
706 /////////////////////////////////////////////////////////////////////////////// 706 ///////////////////////////////////////////////////////////////////////////////
707 // CookiesTreeModel, TreeModel methods (public): 707 // CookiesTreeModel, TreeModel methods (public):
708 708
709 // TreeModel methods: 709 // TreeModel methods:
710 // Returns the set of icons for the nodes in the tree. You only need override 710 // Returns the set of icons for the nodes in the tree. You only need override
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 1138
1139 void CookiesTreeModel::NotifyObserverEndBatch() { 1139 void CookiesTreeModel::NotifyObserverEndBatch() {
1140 // Only notify the observers if this is the outermost call to EndBatch() if 1140 // Only notify the observers if this is the outermost call to EndBatch() if
1141 // called in a nested manner. 1141 // called in a nested manner.
1142 if (--batch_update_ == 0) { 1142 if (--batch_update_ == 0) {
1143 FOR_EACH_OBSERVER(Observer, 1143 FOR_EACH_OBSERVER(Observer,
1144 cookies_observer_list_, 1144 cookies_observer_list_,
1145 TreeModelEndBatch(this)); 1145 TreeModelEndBatch(this));
1146 } 1146 }
1147 } 1147 }
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