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 "content/browser/net/sqlite_persistent_cookie_store.h" | 5 #include "content/browser/net/sqlite_persistent_cookie_store.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 db_->Raze(); | 634 db_->Raze(); |
635 meta_table_.Reset(); | 635 meta_table_.Reset(); |
636 db_.reset(); | 636 db_.reset(); |
637 return false; | 637 return false; |
638 } | 638 } |
639 | 639 |
640 // Build a map of domain keys (always eTLD+1) to domains. | 640 // Build a map of domain keys (always eTLD+1) to domains. |
641 while (smt.Step()) { | 641 while (smt.Step()) { |
642 std::string domain = smt.ColumnString(0); | 642 std::string domain = smt.ColumnString(0); |
643 std::string key = | 643 std::string key = |
644 net::RegistryControlledDomainService::GetDomainAndRegistry(domain); | 644 net::registry_controlled_domains::GetDomainAndRegistry( |
| 645 domain, |
| 646 net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); |
645 | 647 |
646 std::map<std::string, std::set<std::string> >::iterator it = | 648 std::map<std::string, std::set<std::string> >::iterator it = |
647 keys_to_load_.find(key); | 649 keys_to_load_.find(key); |
648 if (it == keys_to_load_.end()) | 650 if (it == keys_to_load_.end()) |
649 it = keys_to_load_.insert(std::make_pair | 651 it = keys_to_load_.insert(std::make_pair |
650 (key, std::set<std::string>())).first; | 652 (key, std::set<std::string>())).first; |
651 it->second.insert(domain); | 653 it->second.insert(domain); |
652 } | 654 } |
653 | 655 |
654 UMA_HISTOGRAM_CUSTOM_TIMES( | 656 UMA_HISTOGRAM_CUSTOM_TIMES( |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 path, | 1216 path, |
1215 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 1217 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
1216 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( | 1218 BrowserThread::GetBlockingPool()->GetSequencedTaskRunner( |
1217 BrowserThread::GetBlockingPool()->GetSequenceToken()), | 1219 BrowserThread::GetBlockingPool()->GetSequenceToken()), |
1218 restore_old_session_cookies, | 1220 restore_old_session_cookies, |
1219 storage_policy); | 1221 storage_policy); |
1220 return new net::CookieMonster(persistent_store, cookie_monster_delegate); | 1222 return new net::CookieMonster(persistent_store, cookie_monster_delegate); |
1221 } | 1223 } |
1222 | 1224 |
1223 } // namespace content | 1225 } // namespace content |
OLD | NEW |