OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 session_storage_info->database_identifier : | 179 session_storage_info->database_identifier : |
180 session_storage_info->origin)), | 180 session_storage_info->origin)), |
181 session_storage_info_(session_storage_info) { | 181 session_storage_info_(session_storage_info) { |
182 } | 182 } |
183 | 183 |
184 /////////////////////////////////////////////////////////////////////////////// | 184 /////////////////////////////////////////////////////////////////////////////// |
185 // CookieTreeIndexedDBNode, public: | 185 // CookieTreeIndexedDBNode, public: |
186 | 186 |
187 CookieTreeIndexedDBNode::CookieTreeIndexedDBNode( | 187 CookieTreeIndexedDBNode::CookieTreeIndexedDBNode( |
188 BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info) | 188 BrowsingDataIndexedDBHelper::IndexedDBInfo* indexed_db_info) |
189 : CookieTreeNode(indexed_db_info->database_name.empty() ? | 189 : CookieTreeNode(UTF8ToUTF16( |
190 l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASE_UNNAMED_NAME) : | 190 indexed_db_info->origin.empty() ? |
191 UTF8ToUTF16(indexed_db_info->database_name)), | 191 indexed_db_info->database_identifier : |
| 192 indexed_db_info->origin)), |
192 indexed_db_info_(indexed_db_info) { | 193 indexed_db_info_(indexed_db_info) { |
193 } | 194 } |
194 | 195 |
195 void CookieTreeIndexedDBNode::DeleteStoredObjects() { | 196 void CookieTreeIndexedDBNode::DeleteStoredObjects() { |
196 GetModel()->indexed_db_helper_->DeleteIndexedDBFile( | 197 GetModel()->indexed_db_helper_->DeleteIndexedDBFile( |
197 indexed_db_info_->file_path); | 198 indexed_db_info_->file_path); |
198 } | 199 } |
199 | 200 |
200 /////////////////////////////////////////////////////////////////////////////// | 201 /////////////////////////////////////////////////////////////////////////////// |
201 // CookieTreeRootNode, public: | 202 // CookieTreeRootNode, public: |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 | 742 |
742 void CookiesTreeModel::NotifyObserverEndBatch() { | 743 void CookiesTreeModel::NotifyObserverEndBatch() { |
743 // Only notify the observers if this is the outermost call to EndBatch() if | 744 // Only notify the observers if this is the outermost call to EndBatch() if |
744 // called in a nested manner. | 745 // called in a nested manner. |
745 if (--batch_update_ == 0) { | 746 if (--batch_update_ == 0) { |
746 FOR_EACH_OBSERVER(Observer, | 747 FOR_EACH_OBSERVER(Observer, |
747 cookies_observer_list_, | 748 cookies_observer_list_, |
748 TreeModelEndBatch(this)); | 749 TreeModelEndBatch(this)); |
749 } | 750 } |
750 } | 751 } |
OLD | NEW |