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" |
11 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" | 11 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" |
12 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" | 12 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" |
13 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" | 13 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" |
| 14 #include "chrome/browser/cookies_tree_model.h" |
14 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
15 #include "content/public/common/url_constants.h" | 16 #include "content/public/common/url_constants.h" |
16 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
17 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 18 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
18 #include "net/cookies/canonical_cookie.h" | 19 #include "net/cookies/canonical_cookie.h" |
19 | 20 |
20 LocalSharedObjectsContainer::LocalSharedObjectsContainer(Profile* profile) | 21 LocalSharedObjectsContainer::LocalSharedObjectsContainer(Profile* profile) |
21 : appcaches_(new CannedBrowsingDataAppCacheHelper(profile)), | 22 : appcaches_(new CannedBrowsingDataAppCacheHelper(profile)), |
22 cookies_(new CannedBrowsingDataCookieHelper( | 23 cookies_(new CannedBrowsingDataCookieHelper( |
23 profile->GetRequestContext())), | 24 profile->GetRequestContext())), |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 ++info) { | 173 ++info) { |
173 if (net::RegistryControlledDomainService::SameDomainOrHost( | 174 if (net::RegistryControlledDomainService::SameDomainOrHost( |
174 origin, info->manifest_url)) { | 175 origin, info->manifest_url)) { |
175 ++count; | 176 ++count; |
176 } | 177 } |
177 } | 178 } |
178 } | 179 } |
179 | 180 |
180 return count; | 181 return count; |
181 } | 182 } |
| 183 |
| 184 scoped_ptr<CookiesTreeModel> |
| 185 LocalSharedObjectsContainer::CreateCookiesTreeModel() const { |
| 186 ContainerMap apps_map; |
| 187 apps_map[std::string()] = new LocalDataContainer( |
| 188 std::string(), std::string(), |
| 189 cookies()->Clone(), |
| 190 databases()->Clone(), |
| 191 local_storages()->Clone(), |
| 192 session_storages()->Clone(), |
| 193 appcaches()->Clone(), |
| 194 indexed_dbs()->Clone(), |
| 195 file_systems()->Clone(), |
| 196 NULL, |
| 197 server_bound_certs()->Clone(), |
| 198 NULL); |
| 199 |
| 200 return make_scoped_ptr(new CookiesTreeModel(apps_map, NULL, true)); |
| 201 } |
OLD | NEW |