| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ui/webui/settings/settings_cookies_view_handler.h" | 5 #include "chrome/browser/ui/webui/settings/settings_cookies_view_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" | 15 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" |
| 16 #include "chrome/browser/browsing_data/browsing_data_cache_storage_helper.h" | 16 #include "chrome/browser/browsing_data/browsing_data_cache_storage_helper.h" |
| 17 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" | 17 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" |
| 18 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" | 18 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
| 19 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 19 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
| 20 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" | 20 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" |
| 21 #include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h" | 21 #include "chrome/browser/browsing_data/browsing_data_flash_lso_helper.h" |
| 22 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" | 22 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" |
| 23 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" | 23 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" |
| 24 #include "chrome/browser/browsing_data/browsing_data_media_license_helper.h" |
| 24 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" | 25 #include "chrome/browser/browsing_data/browsing_data_quota_helper.h" |
| 25 #include "chrome/browser/browsing_data/browsing_data_service_worker_helper.h" | 26 #include "chrome/browser/browsing_data/browsing_data_service_worker_helper.h" |
| 26 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
| 27 #include "chrome/browser/ui/webui/cookies_tree_model_util.h" | 28 #include "chrome/browser/ui/webui/cookies_tree_model_util.h" |
| 28 #include "content/public/browser/browser_context.h" | 29 #include "content/public/browser/browser_context.h" |
| 29 #include "content/public/browser/render_process_host.h" | 30 #include "content/public/browser/render_process_host.h" |
| 30 #include "content/public/browser/site_instance.h" | 31 #include "content/public/browser/site_instance.h" |
| 31 #include "content/public/browser/storage_partition.h" | 32 #include "content/public/browser/storage_partition.h" |
| 32 #include "content/public/browser/web_ui.h" | 33 #include "content/public/browser/web_ui.h" |
| 33 | 34 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 new BrowsingDataCookieHelper(profile->GetRequestContext()), | 156 new BrowsingDataCookieHelper(profile->GetRequestContext()), |
| 156 new BrowsingDataDatabaseHelper(profile), | 157 new BrowsingDataDatabaseHelper(profile), |
| 157 new BrowsingDataLocalStorageHelper(profile), NULL, | 158 new BrowsingDataLocalStorageHelper(profile), NULL, |
| 158 new BrowsingDataAppCacheHelper(profile), | 159 new BrowsingDataAppCacheHelper(profile), |
| 159 new BrowsingDataIndexedDBHelper(indexed_db_context), | 160 new BrowsingDataIndexedDBHelper(indexed_db_context), |
| 160 BrowsingDataFileSystemHelper::Create(file_system_context), | 161 BrowsingDataFileSystemHelper::Create(file_system_context), |
| 161 BrowsingDataQuotaHelper::Create(profile), | 162 BrowsingDataQuotaHelper::Create(profile), |
| 162 BrowsingDataChannelIDHelper::Create(profile->GetRequestContext()), | 163 BrowsingDataChannelIDHelper::Create(profile->GetRequestContext()), |
| 163 new BrowsingDataServiceWorkerHelper(service_worker_context), | 164 new BrowsingDataServiceWorkerHelper(service_worker_context), |
| 164 new BrowsingDataCacheStorageHelper(cache_storage_context), | 165 new BrowsingDataCacheStorageHelper(cache_storage_context), |
| 165 BrowsingDataFlashLSOHelper::Create(profile)); | 166 BrowsingDataFlashLSOHelper::Create(profile), |
| 167 BrowsingDataMediaLicenseHelper::Create(file_system_context)); |
| 166 cookies_tree_model_.reset( | 168 cookies_tree_model_.reset( |
| 167 new CookiesTreeModel(container, | 169 new CookiesTreeModel(container, |
| 168 profile->GetExtensionSpecialStoragePolicy())); | 170 profile->GetExtensionSpecialStoragePolicy())); |
| 169 cookies_tree_model_->AddCookiesTreeObserver(this); | 171 cookies_tree_model_->AddCookiesTreeObserver(this); |
| 170 } | 172 } |
| 171 } | 173 } |
| 172 | 174 |
| 173 void CookiesViewHandler::UpdateSearchResults(const base::ListValue* args) { | 175 void CookiesViewHandler::UpdateSearchResults(const base::ListValue* args) { |
| 174 base::string16 query; | 176 base::string16 query; |
| 175 if (!args->GetString(0, &query)) | 177 if (!args->GetString(0, &query)) |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 void CookiesViewHandler::ReloadCookies(const base::ListValue* args) { | 240 void CookiesViewHandler::ReloadCookies(const base::ListValue* args) { |
| 239 CHECK_EQ(1U, args->GetSize()); | 241 CHECK_EQ(1U, args->GetSize()); |
| 240 CHECK(args->GetString(0, &callback_id_)); | 242 CHECK(args->GetString(0, &callback_id_)); |
| 241 | 243 |
| 242 cookies_tree_model_.reset(); | 244 cookies_tree_model_.reset(); |
| 243 | 245 |
| 244 EnsureCookiesTreeModelCreated(); | 246 EnsureCookiesTreeModelCreated(); |
| 245 } | 247 } |
| 246 | 248 |
| 247 } // namespace settings | 249 } // namespace settings |
| OLD | NEW |