OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |