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 "apps/app_restore_service.h" | 9 #include "apps/app_restore_service.h" |
10 #include "apps/app_restore_service_factory.h" | 10 #include "apps/app_restore_service_factory.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 service_worker_manager_.reset(new ServiceWorkerManager(profile_)); | 202 service_worker_manager_.reset(new ServiceWorkerManager(profile_)); |
203 | 203 |
204 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_)); | 204 shared_user_script_master_.reset(new SharedUserScriptMaster(profile_)); |
205 | 205 |
206 // ExtensionService depends on RuntimeData. | 206 // ExtensionService depends on RuntimeData. |
207 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); | 207 runtime_data_.reset(new RuntimeData(ExtensionRegistry::Get(profile_))); |
208 | 208 |
209 bool autoupdate_enabled = !profile_->IsGuestSession() && | 209 bool autoupdate_enabled = !profile_->IsGuestSession() && |
210 !profile_->IsSystemProfile(); | 210 !profile_->IsSystemProfile(); |
211 #if defined(OS_CHROMEOS) | 211 #if defined(OS_CHROMEOS) |
212 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
213 switches::kEnableLoginScreenApps) && | |
214 chromeos::ProfileHelper::IsSigninProfile(profile_)) { | |
215 extensions_enabled = true; | |
Devlin
2017/03/08 17:24:32
I'd rather we instead update the call site to pass
achuithb
2017/03/09 14:31:05
Done.
| |
216 } | |
212 if (!extensions_enabled) | 217 if (!extensions_enabled) |
213 autoupdate_enabled = false; | 218 autoupdate_enabled = false; |
214 #endif // defined(OS_CHROMEOS) | 219 #endif // defined(OS_CHROMEOS) |
215 extension_service_.reset(new ExtensionService( | 220 extension_service_.reset(new ExtensionService( |
216 profile_, base::CommandLine::ForCurrentProcess(), | 221 profile_, base::CommandLine::ForCurrentProcess(), |
217 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName), | 222 profile_->GetPath().AppendASCII(extensions::kInstallDirectoryName), |
218 ExtensionPrefs::Get(profile_), Blacklist::Get(profile_), | 223 ExtensionPrefs::Get(profile_), Blacklist::Get(profile_), |
219 autoupdate_enabled, extensions_enabled, &ready_)); | 224 autoupdate_enabled, extensions_enabled, &ready_)); |
220 | 225 |
221 uninstall_ping_sender_.reset(new UninstallPingSender( | 226 uninstall_ping_sender_.reset(new UninstallPingSender( |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
463 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 468 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
464 const std::string& extension_id, | 469 const std::string& extension_id, |
465 const UnloadedExtensionInfo::Reason reason) { | 470 const UnloadedExtensionInfo::Reason reason) { |
466 BrowserThread::PostTask( | 471 BrowserThread::PostTask( |
467 BrowserThread::IO, | 472 BrowserThread::IO, |
468 FROM_HERE, | 473 FROM_HERE, |
469 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); | 474 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); |
470 } | 475 } |
471 | 476 |
472 } // namespace extensions | 477 } // namespace extensions |
OLD | NEW |