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/ui/webui/options/cookies_view_handler.h" | 5 #include "chrome/browser/ui/webui/options/cookies_view_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/browsing_data/browsing_data_service_worker_helper.h" | 22 #include "chrome/browser/browsing_data/browsing_data_service_worker_helper.h" |
23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
24 #include "chrome/browser/ui/webui/cookies_tree_model_util.h" | 24 #include "chrome/browser/ui/webui/cookies_tree_model_util.h" |
25 #include "content/public/browser/browser_context.h" | 25 #include "content/public/browser/browser_context.h" |
26 #include "content/public/browser/render_process_host.h" | 26 #include "content/public/browser/render_process_host.h" |
27 #include "content/public/browser/site_instance.h" | 27 #include "content/public/browser/site_instance.h" |
28 #include "content/public/browser/storage_partition.h" | 28 #include "content/public/browser/storage_partition.h" |
29 #include "content/public/browser/web_ui.h" | 29 #include "content/public/browser/web_ui.h" |
30 #include "grit/generated_resources.h" | 30 #include "grit/generated_resources.h" |
31 | 31 |
32 namespace fileapi { | 32 namespace storage { |
33 class FileSystemContext; | 33 class FileSystemContext; |
34 } | 34 } |
35 | 35 |
36 namespace options { | 36 namespace options { |
37 | 37 |
38 CookiesViewHandler::CookiesViewHandler() | 38 CookiesViewHandler::CookiesViewHandler() |
39 : batch_update_(false), | 39 : batch_update_(false), |
40 model_util_(new CookiesTreeModelUtil) { | 40 model_util_(new CookiesTreeModelUtil) { |
41 } | 41 } |
42 | 42 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 void CookiesViewHandler::EnsureCookiesTreeModelCreated() { | 186 void CookiesViewHandler::EnsureCookiesTreeModelCreated() { |
187 if (!cookies_tree_model_.get()) { | 187 if (!cookies_tree_model_.get()) { |
188 Profile* profile = Profile::FromWebUI(web_ui()); | 188 Profile* profile = Profile::FromWebUI(web_ui()); |
189 content::StoragePartition* storage_partition = | 189 content::StoragePartition* storage_partition = |
190 content::BrowserContext::GetDefaultStoragePartition(profile); | 190 content::BrowserContext::GetDefaultStoragePartition(profile); |
191 content::IndexedDBContext* indexed_db_context = | 191 content::IndexedDBContext* indexed_db_context = |
192 storage_partition->GetIndexedDBContext(); | 192 storage_partition->GetIndexedDBContext(); |
193 content::ServiceWorkerContext* service_worker_context = | 193 content::ServiceWorkerContext* service_worker_context = |
194 storage_partition->GetServiceWorkerContext(); | 194 storage_partition->GetServiceWorkerContext(); |
195 fileapi::FileSystemContext* file_system_context = | 195 storage::FileSystemContext* file_system_context = |
196 storage_partition->GetFileSystemContext(); | 196 storage_partition->GetFileSystemContext(); |
197 LocalDataContainer* container = new LocalDataContainer( | 197 LocalDataContainer* container = new LocalDataContainer( |
198 new BrowsingDataCookieHelper(profile->GetRequestContext()), | 198 new BrowsingDataCookieHelper(profile->GetRequestContext()), |
199 new BrowsingDataDatabaseHelper(profile), | 199 new BrowsingDataDatabaseHelper(profile), |
200 new BrowsingDataLocalStorageHelper(profile), | 200 new BrowsingDataLocalStorageHelper(profile), |
201 NULL, | 201 NULL, |
202 new BrowsingDataAppCacheHelper(profile), | 202 new BrowsingDataAppCacheHelper(profile), |
203 new BrowsingDataIndexedDBHelper(indexed_db_context), | 203 new BrowsingDataIndexedDBHelper(indexed_db_context), |
204 BrowsingDataFileSystemHelper::Create(file_system_context), | 204 BrowsingDataFileSystemHelper::Create(file_system_context), |
205 BrowsingDataQuotaHelper::Create(profile), | 205 BrowsingDataQuotaHelper::Create(profile), |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 web_ui()->CallJavascriptFunction("CookiesView.loadChildren", args); | 269 web_ui()->CallJavascriptFunction("CookiesView.loadChildren", args); |
270 } | 270 } |
271 | 271 |
272 void CookiesViewHandler::ReloadCookies(const base::ListValue* args) { | 272 void CookiesViewHandler::ReloadCookies(const base::ListValue* args) { |
273 cookies_tree_model_.reset(); | 273 cookies_tree_model_.reset(); |
274 | 274 |
275 EnsureCookiesTreeModelCreated(); | 275 EnsureCookiesTreeModelCreated(); |
276 } | 276 } |
277 | 277 |
278 } // namespace options | 278 } // namespace options |
OLD | NEW |