diff options
Diffstat (limited to 'chromium/components/browsing_data/content')
11 files changed, 36 insertions, 36 deletions
diff --git a/chromium/components/browsing_data/content/appcache_helper.cc b/chromium/components/browsing_data/content/appcache_helper.cc index 2843d6610b7..3a687538115 100644 --- a/chromium/components/browsing_data/content/appcache_helper.cc +++ b/chromium/components/browsing_data/content/appcache_helper.cc @@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/location.h" -#include "base/task/post_task.h" #include "base/time/time.h" #include "components/browsing_data/content/browsing_data_helper.h" #include "content/public/browser/browser_context.h" @@ -120,8 +119,8 @@ void CannedAppCacheHelper::StartFetching(FetchCallback callback) { for (const auto& origin : pending_origins_) result.emplace_back(origin, 0, base::Time()); - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void CannedAppCacheHelper::DeleteAppCaches(const url::Origin& origin) { diff --git a/chromium/components/browsing_data/content/browsing_data_helper_browsertest.h b/chromium/components/browsing_data/content/browsing_data_helper_browsertest.h index d390cf450a2..1f5e7bb9886 100644 --- a/chromium/components/browsing_data/content/browsing_data_helper_browsertest.h +++ b/chromium/components/browsing_data/content/browsing_data_helper_browsertest.h @@ -9,7 +9,7 @@ #include <list> -#include "base/logging.h" +#include "base/check.h" #include "base/macros.h" #include "base/run_loop.h" diff --git a/chromium/components/browsing_data/content/cache_storage_helper.cc b/chromium/components/browsing_data/content/cache_storage_helper.cc index 1827b765037..f4d6a547764 100644 --- a/chromium/components/browsing_data/content/cache_storage_helper.cc +++ b/chromium/components/browsing_data/content/cache_storage_helper.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/location.h" -#include "base/task/post_task.h" #include "components/browsing_data/content/browsing_data_helper.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -99,8 +98,8 @@ void CannedCacheStorageHelper::StartFetching(FetchCallback callback) { for (const auto& origin : pending_origins_) result.emplace_back(origin, 0, base::Time()); - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void CannedCacheStorageHelper::DeleteCacheStorage(const url::Origin& origin) { diff --git a/chromium/components/browsing_data/content/cookie_helper.cc b/chromium/components/browsing_data/content/cookie_helper.cc index c65b9936f5d..6b5cbdd1568 100644 --- a/chromium/components/browsing_data/content/cookie_helper.cc +++ b/chromium/components/browsing_data/content/cookie_helper.cc @@ -94,12 +94,7 @@ size_t CannedCookieHelper::GetCookieCount() const { void CannedCookieHelper::StartFetching(FetchCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - net::CookieList cookie_list; - for (const auto& pair : origin_cookie_set_map_) { - cookie_list.insert(cookie_list.begin(), pair.second->begin(), - pair.second->end()); - } - std::move(callback).Run(cookie_list); + std::move(callback).Run(GetCookieList()); } void CannedCookieHelper::DeleteCookie(const net::CanonicalCookie& cookie) { @@ -108,6 +103,15 @@ void CannedCookieHelper::DeleteCookie(const net::CanonicalCookie& cookie) { CookieHelper::DeleteCookie(cookie); } +net::CookieList CannedCookieHelper::GetCookieList() { + net::CookieList cookie_list; + for (const auto& pair : origin_cookie_set_map_) { + cookie_list.insert(cookie_list.begin(), pair.second->begin(), + pair.second->end()); + } + return cookie_list; +} + bool CannedCookieHelper::DeleteMatchingCookie( const net::CanonicalCookie& add_cookie, canonical_cookie::CookieHashSet* cookie_set) { diff --git a/chromium/components/browsing_data/content/cookie_helper.h b/chromium/components/browsing_data/content/cookie_helper.h index 1abd0b4616c..99bd6da1335 100644 --- a/chromium/components/browsing_data/content/cookie_helper.h +++ b/chromium/components/browsing_data/content/cookie_helper.h @@ -99,6 +99,9 @@ class CannedCookieHelper : public CookieHelper { // Returns the number of stored cookies. size_t GetCookieCount() const; + // Directly returns stored cookies. + net::CookieList GetCookieList(); + // Returns the map that contains the cookie lists for all frame urls. const OriginCookieSetMap& origin_cookie_set_map() { return origin_cookie_set_map_; diff --git a/chromium/components/browsing_data/content/database_helper.cc b/chromium/components/browsing_data/content/database_helper.cc index 7cf61910146..f8d55b638d5 100644 --- a/chromium/components/browsing_data/content/database_helper.cc +++ b/chromium/components/browsing_data/content/database_helper.cc @@ -113,8 +113,8 @@ void CannedDatabaseHelper::StartFetching(FetchCallback callback) { result.emplace_back(origin, 0, base::Time()); } - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void CannedDatabaseHelper::DeleteDatabase(const url::Origin& origin) { diff --git a/chromium/components/browsing_data/content/file_system_helper.cc b/chromium/components/browsing_data/content/file_system_helper.cc index dfe4beabaad..f7b7017bdd2 100644 --- a/chromium/components/browsing_data/content/file_system_helper.cc +++ b/chromium/components/browsing_data/content/file_system_helper.cc @@ -11,7 +11,6 @@ #include "base/location.h" #include "base/sequenced_task_runner.h" #include "base/stl_util.h" -#include "base/task/post_task.h" #include "components/browsing_data/content/browsing_data_helper.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -87,8 +86,8 @@ void FileSystemHelper::FetchFileSystemInfoInFileThread(FetchCallback callback) { for (const auto& iter : file_system_info_map) result.push_back(iter.second); - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void FileSystemHelper::DeleteFileSystemOriginInFileThread( @@ -147,8 +146,8 @@ void CannedFileSystemHelper::StartFetching(FetchCallback callback) { for (const auto& origin : pending_origins_) result.emplace_back(origin); - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void CannedFileSystemHelper::DeleteFileSystemOrigin(const url::Origin& origin) { diff --git a/chromium/components/browsing_data/content/indexed_db_helper.cc b/chromium/components/browsing_data/content/indexed_db_helper.cc index 787ec701958..c7dcee56aad 100644 --- a/chromium/components/browsing_data/content/indexed_db_helper.cc +++ b/chromium/components/browsing_data/content/indexed_db_helper.cc @@ -11,7 +11,6 @@ #include "base/bind.h" #include "base/location.h" #include "base/memory/scoped_refptr.h" -#include "base/task/post_task.h" #include "base/time/time.h" #include "components/browsing_data/content/browsing_data_helper.h" #include "components/services/storage/public/mojom/indexed_db_control.mojom.h" @@ -99,8 +98,8 @@ void CannedIndexedDBHelper::StartFetching(FetchCallback callback) { for (const auto& origin : pending_origins_) result.emplace_back(origin, 0, base::Time()); - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void CannedIndexedDBHelper::DeleteIndexedDB( diff --git a/chromium/components/browsing_data/content/local_storage_helper.cc b/chromium/components/browsing_data/content/local_storage_helper.cc index 5dabe426343..62830c440be 100644 --- a/chromium/components/browsing_data/content/local_storage_helper.cc +++ b/chromium/components/browsing_data/content/local_storage_helper.cc @@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/location.h" #include "base/stl_util.h" -#include "base/task/post_task.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -44,8 +43,8 @@ void GetUsageInfoCallback(LocalStorageHelper::FetchCallback callback, result.push_back(info); } - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } } // namespace @@ -106,8 +105,8 @@ void CannedLocalStorageHelper::StartFetching(FetchCallback callback) { for (const auto& origin : pending_origins_) result.emplace_back(origin, 0, base::Time()); - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void CannedLocalStorageHelper::DeleteOrigin(const url::Origin& origin, diff --git a/chromium/components/browsing_data/content/service_worker_helper.cc b/chromium/components/browsing_data/content/service_worker_helper.cc index cb64f988c1d..d6243cc627f 100644 --- a/chromium/components/browsing_data/content/service_worker_helper.cc +++ b/chromium/components/browsing_data/content/service_worker_helper.cc @@ -11,7 +11,6 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/location.h" -#include "base/task/post_task.h" #include "components/browsing_data/content/browsing_data_helper.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -121,8 +120,8 @@ void CannedServiceWorkerHelper::StartFetching(FetchCallback callback) { for (const auto& origin : pending_origins_) result.emplace_back(origin, 0, base::Time()); - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void CannedServiceWorkerHelper::DeleteServiceWorkers(const GURL& origin) { diff --git a/chromium/components/browsing_data/content/shared_worker_helper.cc b/chromium/components/browsing_data/content/shared_worker_helper.cc index f8df596ffce..0ae69676549 100644 --- a/chromium/components/browsing_data/content/shared_worker_helper.cc +++ b/chromium/components/browsing_data/content/shared_worker_helper.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/location.h" -#include "base/task/post_task.h" #include "components/browsing_data/content/browsing_data_helper.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -50,8 +49,8 @@ void SharedWorkerHelper::StartFetching(FetchCallback callback) { // We always return an empty list, as there are no "persistent" shared // workers. std::list<SharedWorkerInfo> result; - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void SharedWorkerHelper::DeleteSharedWorker( const GURL& worker, @@ -104,8 +103,8 @@ void CannedSharedWorkerHelper::StartFetching(FetchCallback callback) { std::list<SharedWorkerInfo> result; for (auto& it : pending_shared_worker_info_) result.push_back(it); - base::PostTask(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(std::move(callback), result)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(std::move(callback), result)); } void CannedSharedWorkerHelper::DeleteSharedWorker( |