| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/profile_resetter/profile_resetter.h" | 5 #include "chrome/browser/profile_resetter/profile_resetter.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 cookies_remover_ = BrowsingDataRemoverFactory::GetForBrowserContext(profile_); | 250 cookies_remover_ = BrowsingDataRemoverFactory::GetForBrowserContext(profile_); |
| 251 cookies_remover_->AddObserver(this); | 251 cookies_remover_->AddObserver(this); |
| 252 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA | | 252 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA | |
| 253 BrowsingDataRemover::REMOVE_CACHE; | 253 BrowsingDataRemover::REMOVE_CACHE; |
| 254 PrefService* prefs = profile_->GetPrefs(); | 254 PrefService* prefs = profile_->GetPrefs(); |
| 255 DCHECK(prefs); | 255 DCHECK(prefs); |
| 256 | 256 |
| 257 // Don't try to clear LSO data if it's not supported. | 257 // Don't try to clear LSO data if it's not supported. |
| 258 if (!prefs->GetBoolean(prefs::kClearPluginLSODataEnabled)) | 258 if (!prefs->GetBoolean(prefs::kClearPluginLSODataEnabled)) |
| 259 remove_mask &= ~BrowsingDataRemover::REMOVE_PLUGIN_DATA; | 259 remove_mask &= ~BrowsingDataRemover::REMOVE_PLUGIN_DATA; |
| 260 cookies_remover_->Remove(BrowsingDataRemover::Unbounded(), remove_mask, | 260 cookies_remover_->RemoveAndReply(BrowsingDataRemover::Unbounded(), |
| 261 BrowsingDataHelper::UNPROTECTED_WEB); | 261 remove_mask, |
| 262 BrowsingDataHelper::UNPROTECTED_WEB, this); |
| 262 } | 263 } |
| 263 | 264 |
| 264 void ProfileResetter::ResetExtensions() { | 265 void ProfileResetter::ResetExtensions() { |
| 265 DCHECK(CalledOnValidThread()); | 266 DCHECK(CalledOnValidThread()); |
| 266 | 267 |
| 267 std::vector<std::string> brandcode_extensions; | 268 std::vector<std::string> brandcode_extensions; |
| 268 master_settings_->GetExtensions(&brandcode_extensions); | 269 master_settings_->GetExtensions(&brandcode_extensions); |
| 269 | 270 |
| 270 ExtensionService* extension_service = | 271 ExtensionService* extension_service = |
| 271 extensions::ExtensionSystem::Get(profile_)->extension_service(); | 272 extensions::ExtensionSystem::Get(profile_)->extension_service(); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 chrome_exe, | 362 chrome_exe, |
| 362 false, | 363 false, |
| 363 cancel, | 364 cancel, |
| 364 &shortcuts); | 365 &shortcuts); |
| 365 } | 366 } |
| 366 return shortcuts; | 367 return shortcuts; |
| 367 #else | 368 #else |
| 368 return std::vector<ShortcutCommand>(); | 369 return std::vector<ShortcutCommand>(); |
| 369 #endif | 370 #endif |
| 370 } | 371 } |
| OLD | NEW |