| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 new BrowsingDataCookieHelper(profile->GetRequestContext()), | 160 new BrowsingDataCookieHelper(profile->GetRequestContext()), |
| 160 new BrowsingDataDatabaseHelper(profile), | 161 new BrowsingDataDatabaseHelper(profile), |
| 161 new BrowsingDataLocalStorageHelper(profile), NULL, | 162 new BrowsingDataLocalStorageHelper(profile), NULL, |
| 162 new BrowsingDataAppCacheHelper(profile), | 163 new BrowsingDataAppCacheHelper(profile), |
| 163 new BrowsingDataIndexedDBHelper(indexed_db_context), | 164 new BrowsingDataIndexedDBHelper(indexed_db_context), |
| 164 BrowsingDataFileSystemHelper::Create(file_system_context), | 165 BrowsingDataFileSystemHelper::Create(file_system_context), |
| 165 BrowsingDataQuotaHelper::Create(profile), | 166 BrowsingDataQuotaHelper::Create(profile), |
| 166 BrowsingDataChannelIDHelper::Create(profile->GetRequestContext()), | 167 BrowsingDataChannelIDHelper::Create(profile->GetRequestContext()), |
| 167 new BrowsingDataServiceWorkerHelper(service_worker_context), | 168 new BrowsingDataServiceWorkerHelper(service_worker_context), |
| 168 new BrowsingDataCacheStorageHelper(cache_storage_context), | 169 new BrowsingDataCacheStorageHelper(cache_storage_context), |
| 169 BrowsingDataFlashLSOHelper::Create(profile)); | 170 BrowsingDataFlashLSOHelper::Create(profile), |
| 171 BrowsingDataMediaLicenseHelper::Create(file_system_context)); |
| 170 cookies_tree_model_.reset( | 172 cookies_tree_model_.reset( |
| 171 new CookiesTreeModel(container, | 173 new CookiesTreeModel(container, |
| 172 profile->GetExtensionSpecialStoragePolicy())); | 174 profile->GetExtensionSpecialStoragePolicy())); |
| 173 cookies_tree_model_->AddCookiesTreeObserver(this); | 175 cookies_tree_model_->AddCookiesTreeObserver(this); |
| 174 } | 176 } |
| 175 } | 177 } |
| 176 | 178 |
| 177 void CookiesViewHandler::UpdateSearchResults(const base::ListValue* args) { | 179 void CookiesViewHandler::UpdateSearchResults(const base::ListValue* args) { |
| 178 base::string16 query; | 180 base::string16 query; |
| 179 if (!args->GetString(0, &query)) | 181 if (!args->GetString(0, &query)) |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 void CookiesViewHandler::ReloadCookies(const base::ListValue* args) { | 247 void CookiesViewHandler::ReloadCookies(const base::ListValue* args) { |
| 246 CHECK_EQ(1U, args->GetSize()); | 248 CHECK_EQ(1U, args->GetSize()); |
| 247 CHECK(args->GetString(0, &callback_id_)); | 249 CHECK(args->GetString(0, &callback_id_)); |
| 248 | 250 |
| 249 cookies_tree_model_.reset(); | 251 cookies_tree_model_.reset(); |
| 250 | 252 |
| 251 EnsureCookiesTreeModelCreated(); | 253 EnsureCookiesTreeModelCreated(); |
| 252 } | 254 } |
| 253 | 255 |
| 254 } // namespace settings | 256 } // namespace settings |
| OLD | NEW |