Simplify browsing data helpers for storage types
commit81f54d7a8cd88c5a8a7e40c858bf342eec68d6ab
authorjsbell <jsbell@chromium.org>
Tue, 25 Aug 2015 18:55:43 +0000 (25 11:55 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 25 Aug 2015 18:56:20 +0000 (25 18:56 +0000)
tree755573e30890e59b94c43fe3cbb4b9aa1b8e40f9
parent289d1f6ba870b30cbf4a19d114b2ee4fc23f893f
Simplify browsing data helpers for storage types

The BrowsingDataXXXHelper classes are used by chrome/ to query
content/ for the usage (origins, sizes, last modified times, etc) of
various storage types (cookies, local storage, indexed db, etc). These
helpers followed a pattern of storing local state (`is_fetching_`) the
results (`xxx_info_`) and continuation (`calllback_`) while thread
hopping (UI->IO->UI) and asynchronously querying.

Simplify the classes by passing the information along in closures and
eliminate relay methods where possible. Also, simplify some of the
content/public struct definitions these helpers consume.

(The Quota and AppCache helpers are more complex and will be tackled later.)

BUG=524222

Review URL: https://codereview.chromium.org/1310273003

Cr-Commit-Position: refs/heads/master@{#345397}
47 files changed:
chrome/browser/browsing_data/browsing_data_appcache_helper.cc
chrome/browser/browsing_data/browsing_data_appcache_helper.h
chrome/browser/browsing_data/browsing_data_appcache_helper_unittest.cc
chrome/browser/browsing_data/browsing_data_cache_storage_helper.cc
chrome/browser/browsing_data/browsing_data_channel_id_helper.cc
chrome/browser/browsing_data/browsing_data_channel_id_helper.h
chrome/browser/browsing_data/browsing_data_cookie_helper.cc
chrome/browser/browsing_data/browsing_data_cookie_helper.h
chrome/browser/browsing_data/browsing_data_database_helper.cc
chrome/browser/browsing_data/browsing_data_database_helper.h
chrome/browser/browsing_data/browsing_data_file_system_helper.cc
chrome/browser/browsing_data/browsing_data_file_system_helper.h
chrome/browser/browsing_data/browsing_data_indexed_db_helper.cc
chrome/browser/browsing_data/browsing_data_indexed_db_helper.h
chrome/browser/browsing_data/browsing_data_indexed_db_helper_browsertest.cc
chrome/browser/browsing_data/browsing_data_local_storage_helper.cc
chrome/browser/browsing_data/browsing_data_local_storage_helper.h
chrome/browser/browsing_data/browsing_data_service_worker_helper.cc
chrome/browser/browsing_data/browsing_data_service_worker_helper.h
chrome/browser/browsing_data/cookies_tree_model.cc
chrome/browser/browsing_data/cookies_tree_model_unittest.cc
chrome/browser/browsing_data/local_data_container.cc
chrome/browser/browsing_data/local_data_container.h
chrome/browser/browsing_data/mock_browsing_data_appcache_helper.cc
chrome/browser/browsing_data/mock_browsing_data_appcache_helper.h
chrome/browser/browsing_data/mock_browsing_data_cache_storage_helper.cc
chrome/browser/browsing_data/mock_browsing_data_cache_storage_helper.h
chrome/browser/browsing_data/mock_browsing_data_database_helper.cc
chrome/browser/browsing_data/mock_browsing_data_database_helper.h
chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
chrome/browser/browsing_data/mock_browsing_data_file_system_helper.h
chrome/browser/browsing_data/mock_browsing_data_indexed_db_helper.cc
chrome/browser/browsing_data/mock_browsing_data_indexed_db_helper.h
chrome/browser/browsing_data/mock_browsing_data_local_storage_helper.cc
chrome/browser/browsing_data/mock_browsing_data_local_storage_helper.h
chrome/browser/browsing_data/mock_browsing_data_service_worker_helper.cc
chrome/browser/browsing_data/mock_browsing_data_service_worker_helper.h
chrome/browser/ui/cocoa/content_settings/cookie_details.mm
chrome/browser/ui/webui/cookies_tree_model_util.cc
content/content_browser.gypi
content/public/browser/appcache_service.h
content/public/browser/indexed_db_info.cc [deleted file]
content/public/browser/indexed_db_info.h
content/public/browser/local_storage_usage_info.cc [deleted file]
content/public/browser/local_storage_usage_info.h
content/public/browser/service_worker_usage_info.cc
content/public/browser/service_worker_usage_info.h