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/nacl_host/pnacl_host.h" | 33 #include "chrome/browser/nacl_host/pnacl_host.h" |
33 #include "chrome/browser/net/chrome_url_request_context.h" | 34 #include "chrome/browser/net/chrome_url_request_context.h" |
34 #include "chrome/browser/net/predictor.h" | 35 #include "chrome/browser/net/predictor.h" |
35 #include "chrome/browser/password_manager/password_store.h" | 36 #include "chrome/browser/password_manager/password_store.h" |
36 #include "chrome/browser/password_manager/password_store_factory.h" | 37 #include "chrome/browser/password_manager/password_store_factory.h" |
37 #include "chrome/browser/predictors/logged_in_predictor_table.h" | 38 #include "chrome/browser/predictors/logged_in_predictor_table.h" |
38 #include "chrome/browser/predictors/predictor_database.h" | 39 #include "chrome/browser/predictors/predictor_database.h" |
39 #include "chrome/browser/predictors/predictor_database_factory.h" | 40 #include "chrome/browser/predictors/predictor_database_factory.h" |
40 #include "chrome/browser/prerender/prerender_manager.h" | 41 #include "chrome/browser/prerender/prerender_manager.h" |
41 #include "chrome/browser/prerender/prerender_manager_factory.h" | 42 #include "chrome/browser/prerender/prerender_manager_factory.h" |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 net::URLRequestContextGetter* sb_context = | 427 net::URLRequestContextGetter* sb_context = |
427 sb_service->url_request_context(); | 428 sb_service->url_request_context(); |
428 ++waiting_for_clear_cookies_count_; | 429 ++waiting_for_clear_cookies_count_; |
429 BrowserThread::PostTask( | 430 BrowserThread::PostTask( |
430 BrowserThread::IO, FROM_HERE, | 431 BrowserThread::IO, FROM_HERE, |
431 base::Bind(&BrowsingDataRemover::ClearCookiesOnIOThread, | 432 base::Bind(&BrowsingDataRemover::ClearCookiesOnIOThread, |
432 base::Unretained(this), base::Unretained(sb_context))); | 433 base::Unretained(this), base::Unretained(sb_context))); |
433 } | 434 } |
434 } | 435 } |
435 #endif | 436 #endif |
| 437 MediaDeviceIDSalt::Reset(profile_->GetPrefs()); |
436 } | 438 } |
437 | 439 |
438 // Server bound certs are not separated for protected and unprotected web | 440 // Server bound certs are not separated for protected and unprotected web |
439 // origins. We check the origin_set_mask_ to prevent unintended deletion. | 441 // origins. We check the origin_set_mask_ to prevent unintended deletion. |
440 if (remove_mask & REMOVE_SERVER_BOUND_CERTS && | 442 if (remove_mask & REMOVE_SERVER_BOUND_CERTS && |
441 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { | 443 origin_set_mask_ & BrowsingDataHelper::UNPROTECTED_WEB) { |
442 content::RecordAction( | 444 content::RecordAction( |
443 UserMetricsAction("ClearBrowsingData_ServerBoundCerts")); | 445 UserMetricsAction("ClearBrowsingData_ServerBoundCerts")); |
444 // Since we are running on the UI thread don't call GetURLRequestContext(). | 446 // Since we are running on the UI thread don't call GetURLRequestContext(). |
445 net::URLRequestContextGetter* rq_context = profile_->GetRequestContext(); | 447 net::URLRequestContextGetter* rq_context = profile_->GetRequestContext(); |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1221 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1223 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1222 waiting_for_clear_autofill_origin_urls_ = false; | 1224 waiting_for_clear_autofill_origin_urls_ = false; |
1223 NotifyAndDeleteIfDone(); | 1225 NotifyAndDeleteIfDone(); |
1224 } | 1226 } |
1225 | 1227 |
1226 void BrowsingDataRemover::OnClearWebRTCIdentityStore() { | 1228 void BrowsingDataRemover::OnClearWebRTCIdentityStore() { |
1227 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1229 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1228 waiting_for_clear_webrtc_identity_store_ = false; | 1230 waiting_for_clear_webrtc_identity_store_ = false; |
1229 NotifyAndDeleteIfDone(); | 1231 NotifyAndDeleteIfDone(); |
1230 } | 1232 } |
OLD | NEW |