| 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/browsing_data/browsing_data_remover_impl.h" | 5 #include "chrome/browser/browsing_data/browsing_data_remover_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/bind_helpers.h" | 13 #include "base/bind_helpers.h" |
| 14 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
| 17 #include "base/metrics/histogram_macros.h" | 17 #include "base/metrics/histogram_macros.h" |
| 18 #include "chrome/browser/browsing_data/browsing_data_filter_builder.h" | |
| 19 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 18 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 20 #include "chrome/browser/browsing_data/browsing_data_remover_delegate.h" | 19 #include "chrome/browser/browsing_data/browsing_data_remover_delegate.h" |
| 21 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 22 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
| 23 #include "components/browsing_data/content/storage_partition_http_cache_data_rem
over.h" | 22 #include "components/browsing_data/content/storage_partition_http_cache_data_rem
over.h" |
| 24 #include "components/prefs/pref_service.h" | 23 #include "components/prefs/pref_service.h" |
| 25 #include "components/web_cache/browser/web_cache_manager.h" | 24 #include "components/web_cache/browser/web_cache_manager.h" |
| 26 #include "content/public/browser/browser_context.h" | 25 #include "content/public/browser/browser_context.h" |
| 27 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
| 27 #include "content/public/browser/browsing_data_filter_builder.h" |
| 28 #include "content/public/browser/content_browser_client.h" | 28 #include "content/public/browser/content_browser_client.h" |
| 29 #include "content/public/browser/download_manager.h" | 29 #include "content/public/browser/download_manager.h" |
| 30 #include "content/public/browser/notification_service.h" | 30 #include "content/public/browser/notification_service.h" |
| 31 #include "content/public/browser/storage_partition.h" | 31 #include "content/public/browser/storage_partition.h" |
| 32 #include "content/public/browser/user_metrics.h" | 32 #include "content/public/browser/user_metrics.h" |
| 33 #include "net/base/net_errors.h" | 33 #include "net/base/net_errors.h" |
| 34 #include "net/cookies/cookie_store.h" | 34 #include "net/cookies/cookie_store.h" |
| 35 #include "net/http/http_network_session.h" | 35 #include "net/http/http_network_session.h" |
| 36 #include "net/http/http_transaction_factory.h" | 36 #include "net/http/http_transaction_factory.h" |
| 37 #include "net/http/transport_security_state.h" | 37 #include "net/http/transport_security_state.h" |
| 38 #include "net/ssl/channel_id_service.h" | 38 #include "net/ssl/channel_id_service.h" |
| 39 #include "net/ssl/channel_id_store.h" | 39 #include "net/ssl/channel_id_store.h" |
| 40 #include "net/url_request/url_request_context.h" | 40 #include "net/url_request/url_request_context.h" |
| 41 #include "net/url_request/url_request_context_getter.h" | 41 #include "net/url_request/url_request_context_getter.h" |
| 42 #include "ppapi/features/features.h" | 42 #include "ppapi/features/features.h" |
| 43 #include "storage/browser/quota/special_storage_policy.h" | 43 #include "storage/browser/quota/special_storage_policy.h" |
| 44 #include "url/origin.h" | 44 #include "url/origin.h" |
| 45 | 45 |
| 46 using base::UserMetricsAction; | 46 using base::UserMetricsAction; |
| 47 using content::BrowserContext; | 47 using content::BrowserContext; |
| 48 using content::BrowserThread; | 48 using content::BrowserThread; |
| 49 using content::BrowsingDataFilterBuilder; |
| 49 using content::DOMStorageContext; | 50 using content::DOMStorageContext; |
| 50 | 51 |
| 51 namespace { | 52 namespace { |
| 52 | 53 |
| 53 template <typename T> | 54 template <typename T> |
| 54 void IgnoreArgumentHelper(const base::Closure& callback, T unused_argument) { | 55 void IgnoreArgumentHelper(const base::Closure& callback, T unused_argument) { |
| 55 callback.Run(); | 56 callback.Run(); |
| 56 } | 57 } |
| 57 | 58 |
| 58 // Another convenience method to turn a callback without arguments into one that | 59 // Another convenience method to turn a callback without arguments into one that |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 | 653 |
| 653 if (completion_inhibitor_) { | 654 if (completion_inhibitor_) { |
| 654 completion_inhibitor_->OnBrowsingDataRemoverWouldComplete( | 655 completion_inhibitor_->OnBrowsingDataRemoverWouldComplete( |
| 655 this, base::Bind(&BrowsingDataRemoverImpl::Notify, | 656 this, base::Bind(&BrowsingDataRemoverImpl::Notify, |
| 656 weak_ptr_factory_.GetWeakPtr())); | 657 weak_ptr_factory_.GetWeakPtr())); |
| 657 return; | 658 return; |
| 658 } | 659 } |
| 659 | 660 |
| 660 Notify(); | 661 Notify(); |
| 661 } | 662 } |
| OLD | NEW |