Chromium Code Reviews| Index: chrome/browser/extensions/external_provider_impl.cc |
| diff --git a/chrome/browser/extensions/external_provider_impl.cc b/chrome/browser/extensions/external_provider_impl.cc |
| index e62599a11890516f8a4c7811b9a6c479234c2515..d6353672c0d65cb35a8337c6486257abb1a6fd19 100644 |
| --- a/chrome/browser/extensions/external_provider_impl.cc |
| +++ b/chrome/browser/extensions/external_provider_impl.cc |
| @@ -463,7 +463,9 @@ void ExternalProviderImpl::CreateExternalProviders( |
| #endif |
| bool is_chromeos_demo_session = false; |
| +#if !defined(OS_WIN) |
| int bundled_extension_creation_flags = Extension::NO_FLAGS; |
| +#endif |
|
Peter Kasting
2014/11/18 00:41:03
Note: Every change other than the couple lines abo
|
| #if defined(OS_CHROMEOS) |
| user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
| is_chromeos_demo_session = |
| @@ -471,26 +473,7 @@ void ExternalProviderImpl::CreateExternalProviders( |
| connector->GetDeviceMode() == policy::DEVICE_MODE_RETAIL_KIOSK; |
| bundled_extension_creation_flags = Extension::FROM_WEBSTORE | |
| Extension::WAS_INSTALLED_BY_DEFAULT; |
| -#endif |
| -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| - if (!profile->IsSupervised()) { |
| - provider_list->push_back( |
| - linked_ptr<ExternalProviderInterface>( |
| - new ExternalProviderImpl( |
| - service, |
| - new ExternalPrefLoader( |
| - chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, |
| - ExternalPrefLoader::NONE, |
| - NULL), |
| - profile, |
| - Manifest::EXTERNAL_PREF, |
| - Manifest::EXTERNAL_PREF_DOWNLOAD, |
| - bundled_extension_creation_flags))); |
| - } |
| -#endif |
| - |
| -#if defined(OS_CHROMEOS) |
| if (!is_chromeos_demo_session && !is_chrome_os_public_session) { |
| int external_apps_path_id = profile->IsSupervised() ? |
| chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS : |
| @@ -536,10 +519,35 @@ void ExternalProviderImpl::CreateExternalProviders( |
| Manifest::INVALID_LOCATION, |
| Extension::NO_FLAGS))); |
| } |
| +#elif defined(OS_LINUX) |
| + if (!profile->IsSupervised()) { |
| + provider_list->push_back( |
| + linked_ptr<ExternalProviderInterface>( |
| + new ExternalProviderImpl( |
| + service, |
| + new ExternalPrefLoader( |
| + chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, |
| + ExternalPrefLoader::NONE, |
| + NULL), |
| + profile, |
| + Manifest::EXTERNAL_PREF, |
| + Manifest::EXTERNAL_PREF_DOWNLOAD, |
| + bundled_extension_creation_flags))); |
| + } |
| #endif |
| if (!profile->IsSupervised() && !is_chromeos_demo_session) { |
| -#if !defined(OS_WIN) |
| +#if defined(OS_WIN) |
| + provider_list->push_back( |
| + linked_ptr<ExternalProviderInterface>( |
| + new ExternalProviderImpl( |
| + service, |
| + new ExternalRegistryLoader, |
| + profile, |
| + Manifest::EXTERNAL_REGISTRY, |
| + Manifest::EXTERNAL_PREF_DOWNLOAD, |
| + Extension::NO_FLAGS))); |
| +#else |
| provider_list->push_back( |
| linked_ptr<ExternalProviderInterface>( |
| new ExternalProviderImpl( |
| @@ -551,7 +559,6 @@ void ExternalProviderImpl::CreateExternalProviders( |
| Manifest::EXTERNAL_PREF, |
| Manifest::EXTERNAL_PREF_DOWNLOAD, |
| bundled_extension_creation_flags))); |
| -#endif |
| // Define a per-user source of external extensions. |
| #if defined(OS_MACOSX) |
| @@ -567,17 +574,6 @@ void ExternalProviderImpl::CreateExternalProviders( |
| Manifest::EXTERNAL_PREF_DOWNLOAD, |
| Extension::NO_FLAGS))); |
| #endif |
| - |
| -#if defined(OS_WIN) |
| - provider_list->push_back( |
| - linked_ptr<ExternalProviderInterface>( |
| - new ExternalProviderImpl( |
| - service, |
| - new ExternalRegistryLoader, |
| - profile, |
| - Manifest::EXTERNAL_REGISTRY, |
| - Manifest::EXTERNAL_PREF_DOWNLOAD, |
| - Extension::NO_FLAGS))); |
| #endif |
| #if !defined(OS_CHROMEOS) |