Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(871)

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 428323002: ifdef remaining extensions code in chrome/browser/browsing_data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang again Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/prefs/pref_service.h" 14 #include "base/prefs/pref_service.h"
15 #include "chrome/browser/autofill/personal_data_manager_factory.h" 15 #include "chrome/browser/autofill/personal_data_manager_factory.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/browsing_data/browsing_data_helper.h" 17 #include "chrome/browser/browsing_data/browsing_data_helper.h"
18 #include "chrome/browser/chrome_notification_types.h" 18 #include "chrome/browser/chrome_notification_types.h"
19 #include "chrome/browser/content_settings/host_content_settings_map.h" 19 #include "chrome/browser/content_settings/host_content_settings_map.h"
20 #include "chrome/browser/domain_reliability/service_factory.h" 20 #include "chrome/browser/domain_reliability/service_factory.h"
21 #include "chrome/browser/download/download_prefs.h" 21 #include "chrome/browser/download/download_prefs.h"
22 #include "chrome/browser/download/download_service_factory.h" 22 #include "chrome/browser/download/download_service_factory.h"
23 #include "chrome/browser/extensions/extension_service.h"
24 #include "chrome/browser/extensions/extension_special_storage_policy.h"
25 #include "chrome/browser/history/history_service.h" 23 #include "chrome/browser/history/history_service.h"
26 #include "chrome/browser/history/history_service_factory.h" 24 #include "chrome/browser/history/history_service_factory.h"
27 #include "chrome/browser/io_thread.h" 25 #include "chrome/browser/io_thread.h"
28 #include "chrome/browser/media/media_device_id_salt.h" 26 #include "chrome/browser/media/media_device_id_salt.h"
29 #include "chrome/browser/net/predictor.h" 27 #include "chrome/browser/net/predictor.h"
30 #include "chrome/browser/password_manager/password_store_factory.h" 28 #include "chrome/browser/password_manager/password_store_factory.h"
31 #include "chrome/browser/predictors/logged_in_predictor_table.h" 29 #include "chrome/browser/predictors/logged_in_predictor_table.h"
32 #include "chrome/browser/predictors/predictor_database.h" 30 #include "chrome/browser/predictors/predictor_database.h"
33 #include "chrome/browser/predictors/predictor_database_factory.h" 31 #include "chrome/browser/predictors/predictor_database_factory.h"
34 #include "chrome/browser/prerender/prerender_manager.h" 32 #include "chrome/browser/prerender/prerender_manager.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 #include "chrome/browser/chromeos/profiles/profile_helper.h" 77 #include "chrome/browser/chromeos/profiles/profile_helper.h"
80 #include "chromeos/attestation/attestation_constants.h" 78 #include "chromeos/attestation/attestation_constants.h"
81 #include "chromeos/dbus/cryptohome_client.h" 79 #include "chromeos/dbus/cryptohome_client.h"
82 #include "chromeos/dbus/dbus_thread_manager.h" 80 #include "chromeos/dbus/dbus_thread_manager.h"
83 #include "components/user_manager/user.h" 81 #include "components/user_manager/user.h"
84 #endif 82 #endif
85 83
86 #if defined(ENABLE_EXTENSIONS) 84 #if defined(ENABLE_EXTENSIONS)
87 #include "chrome/browser/apps/ephemeral_app_service.h" 85 #include "chrome/browser/apps/ephemeral_app_service.h"
88 #include "chrome/browser/extensions/activity_log/activity_log.h" 86 #include "chrome/browser/extensions/activity_log/activity_log.h"
87 #include "chrome/browser/extensions/extension_service.h"
88 #include "chrome/browser/extensions/extension_special_storage_policy.h"
89 #endif 89 #endif
90 90
91 #if defined(ENABLE_WEBRTC) 91 #if defined(ENABLE_WEBRTC)
92 #include "chrome/browser/media/webrtc_log_list.h" 92 #include "chrome/browser/media/webrtc_log_list.h"
93 #include "chrome/browser/media/webrtc_log_util.h" 93 #include "chrome/browser/media/webrtc_log_util.h"
94 #endif 94 #endif
95 95
96 using base::UserMetricsAction; 96 using base::UserMetricsAction;
97 using content::BrowserContext; 97 using content::BrowserContext;
98 using content::BrowserThread; 98 using content::BrowserThread;
99 using content::DOMStorageContext; 99 using content::DOMStorageContext;
100 100
101 bool BrowsingDataRemover::is_removing_ = false; 101 bool BrowsingDataRemover::is_removing_ = false;
102 102
103 BrowsingDataRemover::CompletionInhibitor* 103 BrowsingDataRemover::CompletionInhibitor*
104 BrowsingDataRemover::completion_inhibitor_ = NULL; 104 BrowsingDataRemover::completion_inhibitor_ = NULL;
105 105
106 // Helper to create callback for BrowsingDataRemover::DoesOriginMatchMask. 106 // Helper to create callback for BrowsingDataRemover::DoesOriginMatchMask.
107 // Static. 107 // Static.
108 bool DoesOriginMatchMask(int origin_set_mask, 108 bool DoesOriginMatchMask(int origin_set_mask,
109 const GURL& origin, 109 const GURL& origin,
110 quota::SpecialStoragePolicy* special_storage_policy) { 110 quota::SpecialStoragePolicy* special_storage_policy) {
111 return BrowsingDataHelper::DoesOriginMatchMask( 111 return BrowsingDataHelper::DoesOriginMatchMask(
112 origin, origin_set_mask, 112 origin, origin_set_mask, special_storage_policy);
113 static_cast<ExtensionSpecialStoragePolicy*>(special_storage_policy));
114 } 113 }
115 114
116 BrowsingDataRemover::NotificationDetails::NotificationDetails() 115 BrowsingDataRemover::NotificationDetails::NotificationDetails()
117 : removal_begin(base::Time()), 116 : removal_begin(base::Time()),
118 removal_mask(-1), 117 removal_mask(-1),
119 origin_set_mask(-1) { 118 origin_set_mask(-1) {
120 } 119 }
121 120
122 BrowsingDataRemover::NotificationDetails::NotificationDetails( 121 BrowsingDataRemover::NotificationDetails::NotificationDetails(
123 const BrowsingDataRemover::NotificationDetails& details) 122 const BrowsingDataRemover::NotificationDetails& details)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 175 }
177 return new BrowsingDataRemover(profile, 176 return new BrowsingDataRemover(profile,
178 BrowsingDataRemover::CalculateBeginDeleteTime(period), 177 BrowsingDataRemover::CalculateBeginDeleteTime(period),
179 base::Time::Max()); 178 base::Time::Max());
180 } 179 }
181 180
182 BrowsingDataRemover::BrowsingDataRemover(Profile* profile, 181 BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
183 base::Time delete_begin, 182 base::Time delete_begin,
184 base::Time delete_end) 183 base::Time delete_end)
185 : profile_(profile), 184 : profile_(profile),
186 special_storage_policy_(profile->GetExtensionSpecialStoragePolicy()),
187 delete_begin_(delete_begin), 185 delete_begin_(delete_begin),
188 delete_end_(delete_end), 186 delete_end_(delete_end),
189 next_cache_state_(STATE_NONE), 187 next_cache_state_(STATE_NONE),
190 cache_(NULL), 188 cache_(NULL),
191 main_context_getter_(profile->GetRequestContext()), 189 main_context_getter_(profile->GetRequestContext()),
192 media_context_getter_(profile->GetMediaRequestContext()), 190 media_context_getter_(profile->GetMediaRequestContext()),
193 deauthorize_content_licenses_request_id_(0), 191 deauthorize_content_licenses_request_id_(0),
194 waiting_for_clear_autofill_origin_urls_(false), 192 waiting_for_clear_autofill_origin_urls_(false),
195 waiting_for_clear_cache_(false), 193 waiting_for_clear_cache_(false),
196 waiting_for_clear_channel_ids_(false), 194 waiting_for_clear_channel_ids_(false),
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 waiting_for_clear_webrtc_logs_ = false; 1172 waiting_for_clear_webrtc_logs_ = false;
1175 NotifyAndDeleteIfDone(); 1173 NotifyAndDeleteIfDone();
1176 } 1174 }
1177 #endif 1175 #endif
1178 1176
1179 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() { 1177 void BrowsingDataRemover::OnClearedDomainReliabilityMonitor() {
1180 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1181 waiting_for_clear_domain_reliability_monitor_ = false; 1179 waiting_for_clear_domain_reliability_monitor_ = false;
1182 NotifyAndDeleteIfDone(); 1180 NotifyAndDeleteIfDone();
1183 } 1181 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.h ('k') | chrome/browser/browsing_data/cookies_tree_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698