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/browsing_data/cookies_tree_model.h" | 5 #include "chrome/browser/browsing_data/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 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 | 1222 |
1223 notifier->StartBatchUpdate(); | 1223 notifier->StartBatchUpdate(); |
1224 for (ServerBoundCertList::iterator cert_info = | 1224 for (ServerBoundCertList::iterator cert_info = |
1225 container->server_bound_cert_list_.begin(); | 1225 container->server_bound_cert_list_.begin(); |
1226 cert_info != container->server_bound_cert_list_.end(); | 1226 cert_info != container->server_bound_cert_list_.end(); |
1227 ++cert_info) { | 1227 ++cert_info) { |
1228 GURL origin(cert_info->server_identifier()); | 1228 GURL origin(cert_info->server_identifier()); |
1229 if (!origin.is_valid()) { | 1229 if (!origin.is_valid()) { |
1230 // Domain Bound Cert. Make a valid URL to satisfy the | 1230 // Domain Bound Cert. Make a valid URL to satisfy the |
1231 // CookieTreeRootNode::GetOrCreateHostNode interface. | 1231 // CookieTreeRootNode::GetOrCreateHostNode interface. |
1232 origin = GURL(std::string(chrome::kHttpsScheme) + | 1232 origin = GURL(std::string(content::kHttpsScheme) + |
1233 content::kStandardSchemeSeparator + | 1233 content::kStandardSchemeSeparator + |
1234 cert_info->server_identifier() + "/"); | 1234 cert_info->server_identifier() + "/"); |
1235 } | 1235 } |
1236 string16 title = CookieTreeHostNode::TitleForUrl(origin); | 1236 string16 title = CookieTreeHostNode::TitleForUrl(origin); |
1237 if (!filter.size() || title.find(filter) != string16::npos) { | 1237 if (!filter.size() || title.find(filter) != string16::npos) { |
1238 CookieTreeHostNode* host_node = root->GetOrCreateHostNode(origin); | 1238 CookieTreeHostNode* host_node = root->GetOrCreateHostNode(origin); |
1239 CookieTreeServerBoundCertsNode* server_bound_certs_node = | 1239 CookieTreeServerBoundCertsNode* server_bound_certs_node = |
1240 host_node->GetOrCreateServerBoundCertsNode(); | 1240 host_node->GetOrCreateServerBoundCertsNode(); |
1241 server_bound_certs_node->AddServerBoundCertNode( | 1241 server_bound_certs_node->AddServerBoundCertNode( |
1242 new CookieTreeServerBoundCertNode(cert_info)); | 1242 new CookieTreeServerBoundCertNode(cert_info)); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1328 | 1328 |
1329 void CookiesTreeModel::NotifyObserverEndBatch() { | 1329 void CookiesTreeModel::NotifyObserverEndBatch() { |
1330 // Only notify the observers if this is the outermost call to EndBatch() if | 1330 // Only notify the observers if this is the outermost call to EndBatch() if |
1331 // called in a nested manner. | 1331 // called in a nested manner. |
1332 if (--batch_update_ == 0) { | 1332 if (--batch_update_ == 0) { |
1333 FOR_EACH_OBSERVER(Observer, | 1333 FOR_EACH_OBSERVER(Observer, |
1334 cookies_observer_list_, | 1334 cookies_observer_list_, |
1335 TreeModelEndBatch(this)); | 1335 TreeModelEndBatch(this)); |
1336 } | 1336 } |
1337 } | 1337 } |
OLD | NEW |