Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_system_impl.h" | 5 #include "chrome/browser/extensions/extension_system_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 service_worker_manager_.reset(new ServiceWorkerManager(profile_)); | 199 service_worker_manager_.reset(new ServiceWorkerManager(profile_)); |
| 200 | 200 |
| 201 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_)); | 201 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_)); |
| 202 | 202 |
| 203 // ExtensionService depends on RuntimeData. | 203 // ExtensionService depends on RuntimeData. |
| 204 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); | 204 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); |
| 205 | 205 |
| 206 bool autoupdate_enabled = !profile_->IsGuestSession() && | 206 bool autoupdate_enabled = !profile_->IsGuestSession() && |
| 207 !profile_->IsSystemProfile(); | 207 !profile_->IsSystemProfile(); |
| 208 #if defined(OS_CHROMEOS) | 208 #if defined(OS_CHROMEOS) |
| 209 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 210 switches::kEnableSigninApps) && | |
| 211 chromeos::ProfileHelper::IsSigninProfile(profile_)) { | |
| 212 extensions_enabled = true; | |
|
Devlin
2017/03/01 16:15:00
Seems like this should instead go where we call In
| |
| 213 } | |
| 209 if (!extensions_enabled) | 214 if (!extensions_enabled) |
| 210 autoupdate_enabled = false; | 215 autoupdate_enabled = false; |
| 211 #endif // defined(OS_CHROMEOS) | 216 #endif // defined(OS_CHROMEOS) |
| 212 extension_service_.reset(new ExtensionService( | 217 extension_service_.reset(new ExtensionService( |
| 213 profile_, base::CommandLine::ForCurrentProcess(), | 218 profile_, base::CommandLine::ForCurrentProcess(), |
| 214 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName), | 219 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName), |
| 215 ExtensionPrefs::Get(profile_), Blacklist::Get(profile_), | 220 ExtensionPrefs::Get(profile_), Blacklist::Get(profile_), |
| 216 autoupdate_enabled, extensions_enabled, &ready_)); | 221 autoupdate_enabled, extensions_enabled, &ready_)); |
| 217 | 222 |
| 218 uninstall_ping_sender_.reset(new UninstallPingSender( | 223 uninstall_ping_sender_.reset(new UninstallPingSender( |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 470 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
| 466 const std::string& extension_id, | 471 const std::string& extension_id, |
| 467 const UnloadedExtensionInfo::Reason reason) { | 472 const UnloadedExtensionInfo::Reason reason) { |
| 468 BrowserThread::PostTask( | 473 BrowserThread::PostTask( |
| 469 BrowserThread::IO, | 474 BrowserThread::IO, |
| 470 FROM_HERE, | 475 FROM_HERE, |
| 471 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); | 476 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); |
| 472 } | 477 } |
| 473 | 478 |
| 474 } // namespace extensions | 479 } // namespace extensions |
| OLD | NEW |