| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 void ProfileResetter::ResetExtensions() { | 263 void ProfileResetter::ResetExtensions() { |
| 264 DCHECK(CalledOnValidThread()); | 264 DCHECK(CalledOnValidThread()); |
| 265 | 265 |
| 266 std::vector<std::string> brandcode_extensions; | 266 std::vector<std::string> brandcode_extensions; |
| 267 master_settings_->GetExtensions(&brandcode_extensions); | 267 master_settings_->GetExtensions(&brandcode_extensions); |
| 268 | 268 |
| 269 ExtensionService* extension_service = | 269 ExtensionService* extension_service = |
| 270 extensions::ExtensionSystem::Get(profile_)->extension_service(); | 270 extensions::ExtensionSystem::Get(profile_)->extension_service(); |
| 271 DCHECK(extension_service); | 271 DCHECK(extension_service); |
| 272 extension_service->DisableUserExtensions(brandcode_extensions); | 272 extension_service->DisableUserExtensionsExcept(brandcode_extensions); |
| 273 | 273 |
| 274 MarkAsDone(EXTENSIONS); | 274 MarkAsDone(EXTENSIONS); |
| 275 } | 275 } |
| 276 | 276 |
| 277 void ProfileResetter::ResetStartupPages() { | 277 void ProfileResetter::ResetStartupPages() { |
| 278 DCHECK(CalledOnValidThread()); | 278 DCHECK(CalledOnValidThread()); |
| 279 PrefService* prefs = profile_->GetPrefs(); | 279 PrefService* prefs = profile_->GetPrefs(); |
| 280 DCHECK(prefs); | 280 DCHECK(prefs); |
| 281 std::unique_ptr<base::ListValue> url_list( | 281 std::unique_ptr<base::ListValue> url_list( |
| 282 master_settings_->GetUrlsToRestoreOnStartup()); | 282 master_settings_->GetUrlsToRestoreOnStartup()); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 chrome_exe, | 359 chrome_exe, |
| 360 false, | 360 false, |
| 361 cancel, | 361 cancel, |
| 362 &shortcuts); | 362 &shortcuts); |
| 363 } | 363 } |
| 364 return shortcuts; | 364 return shortcuts; |
| 365 #else | 365 #else |
| 366 return std::vector<ShortcutCommand>(); | 366 return std::vector<ShortcutCommand>(); |
| 367 #endif | 367 #endif |
| 368 } | 368 } |
| OLD | NEW |