| 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/extensions/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 << "with id: " << id; | 152 << "with id: " << id; |
| 153 return; | 153 return; |
| 154 } | 154 } |
| 155 UninstallExtension(id, | 155 UninstallExtension(id, |
| 156 extensions::UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION, | 156 extensions::UNINSTALL_REASON_ORPHANED_EXTERNAL_EXTENSION, |
| 157 base::Bind(&base::DoNothing), | 157 base::Bind(&base::DoNothing), |
| 158 NULL); | 158 NULL); |
| 159 } | 159 } |
| 160 | 160 |
| 161 void ExtensionService::SetFileTaskRunnerForTesting( | 161 void ExtensionService::SetFileTaskRunnerForTesting( |
| 162 base::SequencedTaskRunner* task_runner) { | 162 const scoped_refptr<base::SequencedTaskRunner>& task_runner) { |
| 163 file_task_runner_ = task_runner; | 163 file_task_runner_ = task_runner; |
| 164 } | 164 } |
| 165 | 165 |
| 166 void ExtensionService::ClearProvidersForTesting() { | 166 void ExtensionService::ClearProvidersForTesting() { |
| 167 external_extension_providers_.clear(); | 167 external_extension_providers_.clear(); |
| 168 } | 168 } |
| 169 | 169 |
| 170 void ExtensionService::AddProviderForTesting( | 170 void ExtensionService::AddProviderForTesting( |
| 171 extensions::ExternalProviderInterface* test_provider) { | 171 extensions::ExternalProviderInterface* test_provider) { |
| 172 CHECK(test_provider); | 172 CHECK(test_provider); |
| (...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2359 } | 2359 } |
| 2360 | 2360 |
| 2361 void ExtensionService::OnProfileDestructionStarted() { | 2361 void ExtensionService::OnProfileDestructionStarted() { |
| 2362 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); | 2362 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); |
| 2363 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); | 2363 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); |
| 2364 it != ids_to_unload.end(); | 2364 it != ids_to_unload.end(); |
| 2365 ++it) { | 2365 ++it) { |
| 2366 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); | 2366 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); |
| 2367 } | 2367 } |
| 2368 } | 2368 } |
| OLD | NEW |