| 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 indexed_db_helper_(indexed_db_helper), | 623 indexed_db_helper_(indexed_db_helper), |
| 624 file_system_helper_(file_system_helper), | 624 file_system_helper_(file_system_helper), |
| 625 quota_helper_(quota_helper), | 625 quota_helper_(quota_helper), |
| 626 batch_update_(0), | 626 batch_update_(0), |
| 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(NewCallback( | 633 database_helper_->StartFetching( |
| 634 this, &CookiesTreeModel::OnDatabaseModelInfoLoaded)); | 634 base::Bind(&CookiesTreeModel::OnDatabaseModelInfoLoaded, |
| 635 base::Unretained(this))); |
| 635 DCHECK(local_storage_helper_); | 636 DCHECK(local_storage_helper_); |
| 636 local_storage_helper_->StartFetching(NewCallback( | 637 local_storage_helper_->StartFetching(NewCallback( |
| 637 this, &CookiesTreeModel::OnLocalStorageModelInfoLoaded)); | 638 this, &CookiesTreeModel::OnLocalStorageModelInfoLoaded)); |
| 638 if (session_storage_helper_) { | 639 if (session_storage_helper_) { |
| 639 session_storage_helper_->StartFetching(NewCallback( | 640 session_storage_helper_->StartFetching(NewCallback( |
| 640 this, &CookiesTreeModel::OnSessionStorageModelInfoLoaded)); | 641 this, &CookiesTreeModel::OnSessionStorageModelInfoLoaded)); |
| 641 } | 642 } |
| 642 | 643 |
| 643 // TODO(michaeln): when all of the ui impls have been updated, | 644 // TODO(michaeln): when all of the ui impls have been updated, |
| 644 // make this a required parameter. | 645 // make this a required parameter. |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 | 1071 |
| 1071 void CookiesTreeModel::NotifyObserverEndBatch() { | 1072 void CookiesTreeModel::NotifyObserverEndBatch() { |
| 1072 // Only notify the observers if this is the outermost call to EndBatch() if | 1073 // Only notify the observers if this is the outermost call to EndBatch() if |
| 1073 // called in a nested manner. | 1074 // called in a nested manner. |
| 1074 if (--batch_update_ == 0) { | 1075 if (--batch_update_ == 0) { |
| 1075 FOR_EACH_OBSERVER(Observer, | 1076 FOR_EACH_OBSERVER(Observer, |
| 1076 cookies_observer_list_, | 1077 cookies_observer_list_, |
| 1077 TreeModelEndBatch(this)); | 1078 TreeModelEndBatch(this)); |
| 1078 } | 1079 } |
| 1079 } | 1080 } |
| OLD | NEW |