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.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" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/chromeos/login/user_manager.h" | 22 #include "chrome/browser/chromeos/login/user_manager.h" |
23 #endif | 23 #endif |
24 #include "chrome/browser/download/download_prefs.h" | 24 #include "chrome/browser/download/download_prefs.h" |
25 #include "chrome/browser/download/download_service_factory.h" | 25 #include "chrome/browser/download/download_service_factory.h" |
26 #include "chrome/browser/extensions/activity_log/activity_log.h" | 26 #include "chrome/browser/extensions/activity_log/activity_log.h" |
27 #include "chrome/browser/extensions/extension_service.h" | 27 #include "chrome/browser/extensions/extension_service.h" |
28 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 28 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
29 #include "chrome/browser/history/history_service.h" | 29 #include "chrome/browser/history/history_service.h" |
30 #include "chrome/browser/history/history_service_factory.h" | 30 #include "chrome/browser/history/history_service_factory.h" |
31 #include "chrome/browser/io_thread.h" | 31 #include "chrome/browser/io_thread.h" |
| 32 #include "chrome/browser/media/media_device_id_salt.h" |
32 #include "chrome/browser/net/chrome_url_request_context.h" | 33 #include "chrome/browser/net/chrome_url_request_context.h" |
33 #include "chrome/browser/net/predictor.h" | 34 #include "chrome/browser/net/predictor.h" |
34 #include "chrome/browser/password_manager/password_store.h" | 35 #include "chrome/browser/password_manager/password_store.h" |
35 #include "chrome/browser/password_manager/password_store_factory.h" | 36 #include "chrome/browser/password_manager/password_store_factory.h" |
36 #include "chrome/browser/predictors/logged_in_predictor_table.h" | 37 #include "chrome/browser/predictors/logged_in_predictor_table.h" |
37 #include "chrome/browser/predictors/predictor_database.h" | 38 #include "chrome/browser/predictors/predictor_database.h" |
38 #include "chrome/browser/predictors/predictor_database_factory.h" | 39 #include "chrome/browser/predictors/predictor_database_factory.h" |
39 #include "chrome/browser/prerender/prerender_manager.h" | 40 #include "chrome/browser/prerender/prerender_manager.h" |
40 #include "chrome/browser/prerender/prerender_manager_factory.h" | 41 #include "chrome/browser/prerender/prerender_manager_factory.h" |
41 #include "chrome/browser/profiles/profile.h" | 42 #include "chrome/browser/profiles/profile.h" |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 net::URLRequestContextGetter* sb_context = | 414 net::URLRequestContextGetter* sb_context = |
414 sb_service->url_request_context(); | 415 sb_service->url_request_context(); |
415 ++waiting_for_clear_cookies_count_; | 416 ++waiting_for_clear_cookies_count_; |
416 BrowserThread::PostTask( | 417 BrowserThread::PostTask( |
417 BrowserThread::IO, FROM_HERE, | 418 BrowserThread::IO, FROM_HERE, |
418 base::Bind(&BrowsingDataRemover::ClearCookiesOnIOThread, | 419 base::Bind(&BrowsingDataRemover::ClearCookiesOnIOThread, |
419 base::Unretained(this), base::Unretained(sb_context))); | 420 base::Unretained(this), base::Unretained(sb_context))); |
420 } | 421 } |
421 } | 422 } |
422 #endif | 423 #endif |
| 424 MediaDeviceIDSalt::Reset(profile_->GetPrefs()); |
423 } | 425 } |
424 | 426 |
425 // Server bound certs are not separated for protected and unprotected web | 427 // Server bound certs are not separated for protected and unprotected web |
426 // origins. We check the origin_set_mask_ to prevent unintended deletion. | 428 // origins. We check the origin_set_mask_ to prevent unintended deletion. |
427 if (remove_mask & REMOVE_SERVER_BOUND_CERTS && | 429 if (remove_mask & REMOVE_SERVER_BOUND_CERTS && |
428 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { | 430 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { |
429 content::RecordAction( | 431 content::RecordAction( |
430 UserMetricsAction("ClearBrowsingData_ServerBoundCerts")); | 432 UserMetricsAction("ClearBrowsingData_ServerBoundCerts")); |
431 // Since we are running on the UI thread don't call GetURLRequestContext(). | 433 // Since we are running on the UI thread don't call GetURLRequestContext(). |
432 net::URLRequestContextGetter* rq_context = profile_->GetRequestContext(); | 434 net::URLRequestContextGetter* rq_context = profile_->GetRequestContext(); |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1059 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1058 waiting_for_clear_autofill_origin_urls_ = false; | 1060 waiting_for_clear_autofill_origin_urls_ = false; |
1059 NotifyAndDeleteIfDone(); | 1061 NotifyAndDeleteIfDone(); |
1060 } | 1062 } |
1061 | 1063 |
1062 void BrowsingDataRemover::OnClearedStoragePartitionData() { | 1064 void BrowsingDataRemover::OnClearedStoragePartitionData() { |
1063 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1065 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1064 waiting_for_clear_storage_partition_data_ = false; | 1066 waiting_for_clear_storage_partition_data_ = false; |
1065 NotifyAndDeleteIfDone(); | 1067 NotifyAndDeleteIfDone(); |
1066 } | 1068 } |
OLD | NEW |