| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 use_cookie_source_(use_cookie_source) { | 627 use_cookie_source_(use_cookie_source) { |
| 628 DCHECK(cookie_helper_); | 628 DCHECK(cookie_helper_); |
| 629 cookie_helper_->StartFetching( | 629 cookie_helper_->StartFetching( |
| 630 base::Bind(&CookiesTreeModel::OnCookiesModelInfoLoaded, | 630 base::Bind(&CookiesTreeModel::OnCookiesModelInfoLoaded, |
| 631 base::Unretained(this))); | 631 base::Unretained(this))); |
| 632 DCHECK(database_helper_); | 632 DCHECK(database_helper_); |
| 633 database_helper_->StartFetching( | 633 database_helper_->StartFetching( |
| 634 base::Bind(&CookiesTreeModel::OnDatabaseModelInfoLoaded, | 634 base::Bind(&CookiesTreeModel::OnDatabaseModelInfoLoaded, |
| 635 base::Unretained(this))); | 635 base::Unretained(this))); |
| 636 DCHECK(local_storage_helper_); | 636 DCHECK(local_storage_helper_); |
| 637 local_storage_helper_->StartFetching(NewCallback( | 637 local_storage_helper_->StartFetching( |
| 638 this, &CookiesTreeModel::OnLocalStorageModelInfoLoaded)); | 638 base::Bind(&CookiesTreeModel::OnLocalStorageModelInfoLoaded, |
| 639 base::Unretained(this))); |
| 639 if (session_storage_helper_) { | 640 if (session_storage_helper_) { |
| 640 session_storage_helper_->StartFetching(NewCallback( | 641 session_storage_helper_->StartFetching( |
| 641 this, &CookiesTreeModel::OnSessionStorageModelInfoLoaded)); | 642 base::Bind(&CookiesTreeModel::OnSessionStorageModelInfoLoaded, |
| 643 base::Unretained(this))); |
| 642 } | 644 } |
| 643 | 645 |
| 644 // TODO(michaeln): When all of the UI implementations have been updated, make | 646 // TODO(michaeln): When all of the UI implementations have been updated, make |
| 645 // this a required parameter. | 647 // this a required parameter. |
| 646 if (appcache_helper_) { | 648 if (appcache_helper_) { |
| 647 appcache_helper_->StartFetching( | 649 appcache_helper_->StartFetching( |
| 648 base::Bind(&CookiesTreeModel::OnAppCacheModelInfoLoaded, | 650 base::Bind(&CookiesTreeModel::OnAppCacheModelInfoLoaded, |
| 649 base::Unretained(this))); | 651 base::Unretained(this))); |
| 650 } | 652 } |
| 651 | 653 |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 | 1075 |
| 1074 void CookiesTreeModel::NotifyObserverEndBatch() { | 1076 void CookiesTreeModel::NotifyObserverEndBatch() { |
| 1075 // Only notify the observers if this is the outermost call to EndBatch() if | 1077 // Only notify the observers if this is the outermost call to EndBatch() if |
| 1076 // called in a nested manner. | 1078 // called in a nested manner. |
| 1077 if (--batch_update_ == 0) { | 1079 if (--batch_update_ == 0) { |
| 1078 FOR_EACH_OBSERVER(Observer, | 1080 FOR_EACH_OBSERVER(Observer, |
| 1079 cookies_observer_list_, | 1081 cookies_observer_list_, |
| 1080 TreeModelEndBatch(this)); | 1082 TreeModelEndBatch(this)); |
| 1081 } | 1083 } |
| 1082 } | 1084 } |
| OLD | NEW |