| 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 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 prerender_manager->ClearData( | 356 prerender_manager->ClearData( |
| 357 prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS | | 357 prerender::PrerenderManager::CLEAR_PRERENDER_CONTENTS | |
| 358 prerender::PrerenderManager::CLEAR_PRERENDER_HISTORY); | 358 prerender::PrerenderManager::CLEAR_PRERENDER_HISTORY); |
| 359 } | 359 } |
| 360 | 360 |
| 361 // If the caller is removing history for all hosts, then clear ancillary | 361 // If the caller is removing history for all hosts, then clear ancillary |
| 362 // historical information. | 362 // historical information. |
| 363 if (remove_url.is_empty()) { | 363 if (remove_url.is_empty()) { |
| 364 // We also delete the list of recently closed tabs. Since these expire, | 364 // We also delete the list of recently closed tabs. Since these expire, |
| 365 // they can't be more than a day old, so we can simply clear them all. | 365 // they can't be more than a day old, so we can simply clear them all. |
| 366 TabRestoreService* tab_service = | 366 sessions::TabRestoreService* tab_service = |
| 367 TabRestoreServiceFactory::GetForProfile(profile_); | 367 TabRestoreServiceFactory::GetForProfile(profile_); |
| 368 if (tab_service) { | 368 if (tab_service) { |
| 369 tab_service->ClearEntries(); | 369 tab_service->ClearEntries(); |
| 370 tab_service->DeleteLastSession(); | 370 tab_service->DeleteLastSession(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 #if defined(ENABLE_SESSION_SERVICE) | 373 #if defined(ENABLE_SESSION_SERVICE) |
| 374 // We also delete the last session when we delete the history. | 374 // We also delete the last session when we delete the history. |
| 375 SessionService* session_service = | 375 SessionService* session_service = |
| 376 SessionServiceFactory::GetForProfile(profile_); | 376 SessionServiceFactory::GetForProfile(profile_); |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 waiting_for_clear_domain_reliability_monitor_ = false; | 1157 waiting_for_clear_domain_reliability_monitor_ = false; |
| 1158 NotifyAndDeleteIfDone(); | 1158 NotifyAndDeleteIfDone(); |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 // static | 1161 // static |
| 1162 BrowsingDataRemover::CallbackSubscription | 1162 BrowsingDataRemover::CallbackSubscription |
| 1163 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( | 1163 BrowsingDataRemover::RegisterOnBrowsingDataRemovedCallback( |
| 1164 const BrowsingDataRemover::Callback& callback) { | 1164 const BrowsingDataRemover::Callback& callback) { |
| 1165 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); | 1165 return GetOnBrowsingDataRemovedCallbacks()->Add(callback); |
| 1166 } | 1166 } |
| OLD | NEW |