| 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/content_settings/local_shared_objects_container.h" | 5 #include "chrome/browser/content_settings/local_shared_objects_container.h" |
| 6 | 6 |
| 7 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" | 7 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" |
| 8 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" | 8 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" |
| 9 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
| 10 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // E.g. if the origin is "http://foo.com" then all cookies with domain foo.com
, | 81 // E.g. if the origin is "http://foo.com" then all cookies with domain foo.com
, |
| 82 // a.foo.com, b.a.foo.com or *.foo.com will be counted. | 82 // a.foo.com, b.a.foo.com or *.foo.com will be counted. |
| 83 typedef CannedBrowsingDataCookieHelper::OriginCookieListMap | 83 typedef CannedBrowsingDataCookieHelper::OriginCookieListMap |
| 84 OriginCookieListMap; | 84 OriginCookieListMap; |
| 85 const OriginCookieListMap& origin_cookies_list_map = | 85 const OriginCookieListMap& origin_cookies_list_map = |
| 86 cookies()->origin_cookie_list_map(); | 86 cookies()->origin_cookie_list_map(); |
| 87 for (OriginCookieListMap::const_iterator it = | 87 for (OriginCookieListMap::const_iterator it = |
| 88 origin_cookies_list_map.begin(); | 88 origin_cookies_list_map.begin(); |
| 89 it != origin_cookies_list_map.end(); | 89 it != origin_cookies_list_map.end(); |
| 90 ++it) { | 90 ++it) { |
| 91 const net::CookieList* cookie_list = it->second; | 91 const net::CookieHashSet* cookie_list = it->second; |
| 92 for (net::CookieList::const_iterator cookie = cookie_list->begin(); | 92 for (net::CookieHashSet::const_iterator cookie = cookie_list->begin(); |
| 93 cookie != cookie_list->end(); | 93 cookie != cookie_list->end(); |
| 94 ++cookie) { | 94 ++cookie) { |
| 95 // Strip leading '.'s. | 95 // Strip leading '.'s. |
| 96 std::string cookie_domain = cookie->Domain(); | 96 std::string cookie_domain = cookie->Domain(); |
| 97 if (cookie_domain[0] == '.') | 97 if (cookie_domain[0] == '.') |
| 98 cookie_domain = cookie_domain.substr(1); | 98 cookie_domain = cookie_domain.substr(1); |
| 99 // The |domain_url| is only created in order to use the | 99 // The |domain_url| is only created in order to use the |
| 100 // SameDomainOrHost method below. It does not matter which scheme is | 100 // SameDomainOrHost method below. It does not matter which scheme is |
| 101 // used as the scheme is ignored by the SameDomainOrHost method. | 101 // used as the scheme is ignored by the SameDomainOrHost method. |
| 102 GURL domain_url(std::string(url::kHttpScheme) + | 102 GURL domain_url(std::string(url::kHttpScheme) + |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 session_storages(), | 190 session_storages(), |
| 191 appcaches(), | 191 appcaches(), |
| 192 indexed_dbs(), | 192 indexed_dbs(), |
| 193 file_systems(), | 193 file_systems(), |
| 194 NULL, | 194 NULL, |
| 195 channel_ids(), | 195 channel_ids(), |
| 196 NULL); | 196 NULL); |
| 197 | 197 |
| 198 return make_scoped_ptr(new CookiesTreeModel(container, NULL, true)); | 198 return make_scoped_ptr(new CookiesTreeModel(container, NULL, true)); |
| 199 } | 199 } |
| OLD | NEW |