OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/android/preferences/website_preference_bridge.h" | 5 #include "chrome/browser/android/preferences/website_preference_bridge.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 | 474 |
475 void Run() { | 475 void Run() { |
476 AddRef(); // Balanced in TreeModelEndBatch. | 476 AddRef(); // Balanced in TreeModelEndBatch. |
477 | 477 |
478 content::StoragePartition* storage_partition = | 478 content::StoragePartition* storage_partition = |
479 content::BrowserContext::GetDefaultStoragePartition(profile_); | 479 content::BrowserContext::GetDefaultStoragePartition(profile_); |
480 content::IndexedDBContext* indexed_db_context = | 480 content::IndexedDBContext* indexed_db_context = |
481 storage_partition->GetIndexedDBContext(); | 481 storage_partition->GetIndexedDBContext(); |
482 content::ServiceWorkerContext* service_worker_context = | 482 content::ServiceWorkerContext* service_worker_context = |
483 storage_partition->GetServiceWorkerContext(); | 483 storage_partition->GetServiceWorkerContext(); |
| 484 content::CacheStorageContext* cache_storage_context = |
| 485 storage_partition->GetCacheStorageContext(); |
484 storage::FileSystemContext* file_system_context = | 486 storage::FileSystemContext* file_system_context = |
485 storage_partition->GetFileSystemContext(); | 487 storage_partition->GetFileSystemContext(); |
486 LocalDataContainer* container = new LocalDataContainer( | 488 LocalDataContainer* container = new LocalDataContainer( |
487 new BrowsingDataCookieHelper(profile_->GetRequestContext()), | 489 new BrowsingDataCookieHelper(profile_->GetRequestContext()), |
488 new BrowsingDataDatabaseHelper(profile_), | 490 new BrowsingDataDatabaseHelper(profile_), |
489 new BrowsingDataLocalStorageHelper(profile_), | 491 new BrowsingDataLocalStorageHelper(profile_), |
490 NULL, | 492 NULL, |
491 new BrowsingDataAppCacheHelper(profile_), | 493 new BrowsingDataAppCacheHelper(profile_), |
492 new BrowsingDataIndexedDBHelper(indexed_db_context), | 494 new BrowsingDataIndexedDBHelper(indexed_db_context), |
493 BrowsingDataFileSystemHelper::Create(file_system_context), | 495 BrowsingDataFileSystemHelper::Create(file_system_context), |
494 BrowsingDataQuotaHelper::Create(profile_), | 496 BrowsingDataQuotaHelper::Create(profile_), |
495 BrowsingDataChannelIDHelper::Create(profile_->GetRequestContext()), | 497 BrowsingDataChannelIDHelper::Create(profile_->GetRequestContext()), |
496 new BrowsingDataServiceWorkerHelper(service_worker_context), | 498 new BrowsingDataServiceWorkerHelper(service_worker_context), |
| 499 new BrowsingDataCacheStorageHelper(cache_storage_context), |
497 NULL); | 500 NULL); |
498 | 501 |
499 cookies_tree_model_.reset(new CookiesTreeModel( | 502 cookies_tree_model_.reset(new CookiesTreeModel( |
500 container, profile_->GetExtensionSpecialStoragePolicy(), false)); | 503 container, profile_->GetExtensionSpecialStoragePolicy(), false)); |
501 cookies_tree_model_->AddCookiesTreeObserver(this); | 504 cookies_tree_model_->AddCookiesTreeObserver(this); |
502 } | 505 } |
503 | 506 |
504 // TreeModelObserver: | 507 // TreeModelObserver: |
505 void TreeNodesAdded(ui::TreeModel* model, | 508 void TreeNodesAdded(ui::TreeModel* model, |
506 ui::TreeModelNode* parent, | 509 ui::TreeModelNode* parent, |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 GURL url(ConvertJavaStringToUTF8(env, jorigin)); | 786 GURL url(ConvertJavaStringToUTF8(env, jorigin)); |
784 scoped_refptr<SiteDataDeleteHelper> site_data_deleter( | 787 scoped_refptr<SiteDataDeleteHelper> site_data_deleter( |
785 new SiteDataDeleteHelper(profile, url)); | 788 new SiteDataDeleteHelper(profile, url)); |
786 site_data_deleter->Run(); | 789 site_data_deleter->Run(); |
787 } | 790 } |
788 | 791 |
789 // Register native methods | 792 // Register native methods |
790 bool RegisterWebsitePreferenceBridge(JNIEnv* env) { | 793 bool RegisterWebsitePreferenceBridge(JNIEnv* env) { |
791 return RegisterNativesImpl(env); | 794 return RegisterNativesImpl(env); |
792 } | 795 } |
OLD | NEW |