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_cookie_helper.h" | 8 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
9 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
10 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 for (net::CookieList::const_iterator cookie = cookie_list->begin(); | 91 for (net::CookieList::const_iterator cookie = cookie_list->begin(); |
92 cookie != cookie_list->end(); | 92 cookie != cookie_list->end(); |
93 ++cookie) { | 93 ++cookie) { |
94 // Strip leading '.'s. | 94 // Strip leading '.'s. |
95 std::string cookie_domain = cookie->Domain(); | 95 std::string cookie_domain = cookie->Domain(); |
96 if (cookie_domain[0] == '.') | 96 if (cookie_domain[0] == '.') |
97 cookie_domain = cookie_domain.substr(1); | 97 cookie_domain = cookie_domain.substr(1); |
98 // The |domain_url| is only created in order to use the | 98 // The |domain_url| is only created in order to use the |
99 // SamePublicDomainOrHost method below. It does not matter which scheme is | 99 // SamePublicDomainOrHost method below. It does not matter which scheme is |
100 // used as the scheme is ignored by the SamePublicDomainOrHost method. | 100 // used as the scheme is ignored by the SamePublicDomainOrHost method. |
101 GURL domain_url(std::string(chrome::kHttpScheme) + | 101 GURL domain_url(std::string(content::kHttpScheme) + |
102 content::kStandardSchemeSeparator + cookie_domain); | 102 content::kStandardSchemeSeparator + cookie_domain); |
103 if (SamePublicDomainOrHost(origin, domain_url)) | 103 if (SamePublicDomainOrHost(origin, domain_url)) |
104 ++count; | 104 ++count; |
105 } | 105 } |
106 } | 106 } |
107 | 107 |
108 // Count local storages for the domain of the given |origin|. | 108 // Count local storages for the domain of the given |origin|. |
109 const std::set<GURL> local_storage_info = | 109 const std::set<GURL> local_storage_info = |
110 local_storages()->GetLocalStorageInfo(); | 110 local_storages()->GetLocalStorageInfo(); |
111 for (std::set<GURL>::const_iterator it = local_storage_info.begin(); | 111 for (std::set<GURL>::const_iterator it = local_storage_info.begin(); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 session_storages()->Clone(), | 189 session_storages()->Clone(), |
190 appcaches()->Clone(), | 190 appcaches()->Clone(), |
191 indexed_dbs()->Clone(), | 191 indexed_dbs()->Clone(), |
192 file_systems()->Clone(), | 192 file_systems()->Clone(), |
193 NULL, | 193 NULL, |
194 server_bound_certs()->Clone(), | 194 server_bound_certs()->Clone(), |
195 NULL); | 195 NULL); |
196 | 196 |
197 return make_scoped_ptr(new CookiesTreeModel(container, NULL, true)); | 197 return make_scoped_ptr(new CookiesTreeModel(container, NULL, true)); |
198 } | 198 } |
OLD | NEW |