diff options
-rw-r--r-- | chrome/browser/BUILD.gn | 1 | ||||
-rw-r--r-- | chrome/browser/DEPS | 1 | ||||
-rw-r--r-- | chrome/browser/browsing_data/browsing_data_remover.cc | 4 | ||||
-rw-r--r-- | chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc | 4 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 3 | ||||
-rw-r--r-- | components/BUILD.gn | 5 | ||||
-rw-r--r-- | components/OWNERS | 5 | ||||
-rw-r--r-- | components/browsing_data.gypi | 25 | ||||
-rw-r--r-- | components/browsing_data/BUILD.gn | 19 | ||||
-rw-r--r-- | components/browsing_data/DEPS | 4 | ||||
-rw-r--r-- | components/browsing_data/OWNERS | 4 | ||||
-rw-r--r-- | components/browsing_data/storage_partition_http_cache_data_remover.cc (renamed from chrome/browser/browsing_data/storage_partition_http_cache_data_remover.cc) | 6 | ||||
-rw-r--r-- | components/browsing_data/storage_partition_http_cache_data_remover.h (renamed from chrome/browser/browsing_data/storage_partition_http_cache_data_remover.h) | 10 | ||||
-rw-r--r-- | components/components.gyp | 1 |
14 files changed, 81 insertions, 11 deletions
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 0ac7177..348cebcb 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -235,6 +235,7 @@ static_library("browser") { "//chrome/installer/util", "//components/app_modal", "//components/autofill/content/browser", + "//components/browsing_data", "//components/data_reduction_proxy/content/browser", "//components/dom_distiller/content", "//components/favicon/content", diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS index 4c2169f..7c78fa9 100644 --- a/chrome/browser/DEPS +++ b/chrome/browser/DEPS @@ -23,6 +23,7 @@ include_rules = [ "+components/bookmarks/managed", "+components/bookmarks/test", "+components/browser_watcher", + "+components/browsing_data", "+components/cdm/browser", "+components/cloud_devices/common", "+components/component_updater", diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc index 1539390..079b41a 100644 --- a/chrome/browser/browsing_data/browsing_data_remover.cc +++ b/chrome/browser/browsing_data/browsing_data_remover.cc @@ -16,7 +16,6 @@ #include "chrome/browser/autofill/personal_data_manager_factory.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browsing_data/browsing_data_helper.h" -#include "chrome/browser/browsing_data/storage_partition_http_cache_data_remover.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/domain_reliability/service_factory.h" #include "chrome/browser/download/download_prefs.h" @@ -44,6 +43,7 @@ #include "chrome/common/url_constants.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" +#include "components/browsing_data/storage_partition_http_cache_data_remover.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/domain_reliability/service.h" #include "components/history/core/browser/history_service.h" @@ -609,7 +609,7 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask, waiting_for_clear_cache_ = true; // StoragePartitionHttpCacheDataRemover deletes itself when it is done. - StoragePartitionHttpCacheDataRemover::CreateForRange( + browsing_data::StoragePartitionHttpCacheDataRemover::CreateForRange( BrowserContext::GetDefaultStoragePartition(profile_), delete_begin_, delete_end_) ->Remove(base::Bind(&BrowsingDataRemover::ClearedCache, diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc index 1203e7d..aa94ea7 100644 --- a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc +++ b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.cc @@ -5,13 +5,13 @@ #include "chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h" -#include "chrome/browser/browsing_data/storage_partition_http_cache_data_remover.h" #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" #include "chrome/browser/favicon/favicon_tab_helper.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" #include "chrome/common/chrome_version_info.h" +#include "components/browsing_data/storage_partition_http_cache_data_remover.h" #include "components/pdf/browser/pdf_web_contents_helper.h" #include "components/renderer_context_menu/context_menu_delegate.h" #include "components/web_cache/browser/web_cache_manager.h" @@ -59,7 +59,7 @@ void ChromeWebViewGuestDelegate::ClearCache( // StoragePartitionHttpCacheDataRemover removes itself when it is done. // TODO(lazyboy): Once StoragePartitionHttpCacheDataRemover moves to // components/, move |ClearCache| to WebViewGuest: http//crbug.com/471287. - StoragePartitionHttpCacheDataRemover::CreateForRange( + browsing_data::StoragePartitionHttpCacheDataRemover::CreateForRange( partition, remove_since, base::Time::Now())->Remove(done_callback); } diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 1ae3141..41794f9 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -253,8 +253,6 @@ 'browser/browsing_data/cookies_tree_model.h', 'browser/browsing_data/local_data_container.cc', 'browser/browsing_data/local_data_container.h', - 'browser/browsing_data/storage_partition_http_cache_data_remover.cc', - 'browser/browsing_data/storage_partition_http_cache_data_remover.h', 'browser/caps/generate_state_json.h', 'browser/caps/generate_state_json.cc', 'browser/character_encoding.cc', @@ -3073,6 +3071,7 @@ '../third_party/re2/re2.gyp:re2', '../cc/cc.gyp:cc', '../components/components.gyp:autofill_content_browser', + '../components/components.gyp:browsing_data', '../components/components.gyp:data_reduction_proxy_content_browser', '../components/components.gyp:dom_distiller_content', '../components/components.gyp:favicon_content', diff --git a/components/BUILD.gn b/components/BUILD.gn index 9d946fc..8716abb 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn @@ -212,7 +212,10 @@ group("all_components") { } if (!is_ios) { - deps += [ "//components/app_modal" ] + deps += [ + "//components/app_modal", + "//components/browsing_data", + ] } if (toolkit_views) { diff --git a/components/OWNERS b/components/OWNERS index 4dec212..ae1edd1 100644 --- a/components/OWNERS +++ b/components/OWNERS @@ -20,6 +20,11 @@ per-file autofill_strings.grdp=isherman@chromium.org per-file bookmark_bar_strings.grdp=sky@chromium.org per-file bookmarks.gypi=sky@chromium.org +per-file browsing_data.gypi=markusheintz@chromium.org +per-file browsing_data.gypi=mkwst@chromium.org +per-file browsing_data.gypi=bauerb@chromium.org +per-file browsing_data.gypi=michaeln@chromium.org + per-file cloud_devices*=gene@chromium.org per-file cloud_devices*=vitalybuka@chromium.org diff --git a/components/browsing_data.gypi b/components/browsing_data.gypi new file mode 100644 index 0000000..c13a84a --- /dev/null +++ b/components/browsing_data.gypi @@ -0,0 +1,25 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + 'target_name': 'browsing_data', + 'type': 'static_library', + 'dependencies': [ + '../base/base.gyp:base', + '../content/content.gyp:content_browser', + '../net/net.gyp:net', + ], + 'include_dirs': [ + '..', + ], + 'sources': [ + # Note: sources list duplicated in GN build. + 'browsing_data/storage_partition_http_cache_data_remover.cc', + 'browsing_data/storage_partition_http_cache_data_remover.h', + ], + }, + ], +} diff --git a/components/browsing_data/BUILD.gn b/components/browsing_data/BUILD.gn new file mode 100644 index 0000000..e8af5b6 --- /dev/null +++ b/components/browsing_data/BUILD.gn @@ -0,0 +1,19 @@ +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +static_library("browsing_data") { + output_name = "browsing_data" + sources = [ + "storage_partition_http_cache_data_remover.cc", + "storage_partition_http_cache_data_remover.h", + ] + + configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] + + deps = [ + "//base", + "//content/public/browser", + "//net", + ] +} diff --git a/components/browsing_data/DEPS b/components/browsing_data/DEPS new file mode 100644 index 0000000..8c57389 --- /dev/null +++ b/components/browsing_data/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+content/public/browser", + "+net", +] diff --git a/components/browsing_data/OWNERS b/components/browsing_data/OWNERS new file mode 100644 index 0000000..0944d92 --- /dev/null +++ b/components/browsing_data/OWNERS @@ -0,0 +1,4 @@ +markusheintz@chromium.org +mkwst@chromium.org +bauerb@chromium.org +michaeln@chromium.org diff --git a/chrome/browser/browsing_data/storage_partition_http_cache_data_remover.cc b/components/browsing_data/storage_partition_http_cache_data_remover.cc index d92bf43..aae4e3b 100644 --- a/chrome/browser/browsing_data/storage_partition_http_cache_data_remover.cc +++ b/components/browsing_data/storage_partition_http_cache_data_remover.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/browsing_data/storage_partition_http_cache_data_remover.h" +#include "components/browsing_data/storage_partition_http_cache_data_remover.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/storage_partition.h" @@ -13,6 +13,8 @@ using content::BrowserThread; +namespace browsing_data { + StoragePartitionHttpCacheDataRemover::StoragePartitionHttpCacheDataRemover( base::Time delete_begin, base::Time delete_end, @@ -154,3 +156,5 @@ void StoragePartitionHttpCacheDataRemover::DoClearCache(int rv) { } } } + +} // namespace browsing_data diff --git a/chrome/browser/browsing_data/storage_partition_http_cache_data_remover.h b/components/browsing_data/storage_partition_http_cache_data_remover.h index b09e31e..eb9f575 100644 --- a/chrome/browser/browsing_data/storage_partition_http_cache_data_remover.h +++ b/components/browsing_data/storage_partition_http_cache_data_remover.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_BROWSING_DATA_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ -#define CHROME_BROWSER_BROWSING_DATA_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ +#ifndef COMPONENTS_BROWSING_DATA_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ +#define COMPONENTS_BROWSING_DATA_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ #include "base/callback.h" #include "base/sequenced_task_runner_helpers.h" @@ -21,6 +21,8 @@ namespace net { class URLRequestContextGetter; } +namespace browsing_data { + // Helper to remove http cache data from a StoragePartition. class StoragePartitionHttpCacheDataRemover { public: @@ -75,4 +77,6 @@ class StoragePartitionHttpCacheDataRemover { DISALLOW_COPY_AND_ASSIGN(StoragePartitionHttpCacheDataRemover); }; -#endif // CHROME_BROWSER_BROWSING_DATA_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ +} // namespace browsing_data + +#endif // COMPONENTS_BROWSING_DATA_STORAGE_PARTITION_HTTP_CACHE_DATA_REMOVER_H_ diff --git a/components/components.gyp b/components/components.gyp index 9871bb1..864eef8 100644 --- a/components/components.gyp +++ b/components/components.gyp @@ -70,6 +70,7 @@ ['OS != "ios"', { 'includes': [ 'app_modal.gypi', + 'browsing_data.gypi', 'cdm.gypi', 'navigation_interception.gypi', 'plugins.gypi', |