| 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 "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 #if defined(ENABLE_NOTIFICATIONS) | 65 #if defined(ENABLE_NOTIFICATIONS) |
| 66 #include "chrome/browser/notifications/desktop_notification_service.h" | 66 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 67 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 67 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 68 #include "ui/message_center/notifier_settings.h" | 68 #include "ui/message_center/notifier_settings.h" |
| 69 #endif | 69 #endif |
| 70 | 70 |
| 71 #if defined(OS_CHROMEOS) | 71 #if defined(OS_CHROMEOS) |
| 72 #include "chrome/browser/app_mode/app_mode_utils.h" | 72 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 73 #include "chrome/browser/chromeos/extensions/device_local_account_management_pol
icy_provider.h" | 73 #include "chrome/browser/chromeos/extensions/device_local_account_management_pol
icy_provider.h" |
| 74 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
| 75 #include "chrome/browser/chromeos/policy/device_local_account.h" | 74 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 76 #include "chrome/browser/extensions/extension_assets_manager_chromeos.h" | 75 #include "chrome/browser/extensions/extension_assets_manager_chromeos.h" |
| 77 #include "chromeos/chromeos_switches.h" | 76 #include "chromeos/chromeos_switches.h" |
| 78 #include "chromeos/login/login_state.h" | 77 #include "chromeos/login/login_state.h" |
| 79 #include "components/user_manager/user.h" | 78 #include "components/user_manager/user.h" |
| 79 #include "components/user_manager/user_manager.h" |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 using content::BrowserThread; | 82 using content::BrowserThread; |
| 83 | 83 |
| 84 namespace { | 84 namespace { |
| 85 | 85 |
| 86 const char kContentVerificationExperimentName[] = | 86 const char kContentVerificationExperimentName[] = |
| 87 "ExtensionContentVerification"; | 87 "ExtensionContentVerification"; |
| 88 | 88 |
| 89 } // namespace | 89 } // namespace |
| (...skipping 29 matching lines...) Expand all Loading... |
| 119 profile_->GetPath().AppendASCII(extensions::kRulesStoreName), | 119 profile_->GetPath().AppendASCII(extensions::kRulesStoreName), |
| 120 false)); | 120 false)); |
| 121 | 121 |
| 122 blacklist_.reset(new Blacklist(ExtensionPrefs::Get(profile_))); | 122 blacklist_.reset(new Blacklist(ExtensionPrefs::Get(profile_))); |
| 123 | 123 |
| 124 standard_management_policy_provider_.reset( | 124 standard_management_policy_provider_.reset( |
| 125 new StandardManagementPolicyProvider(ExtensionPrefs::Get(profile_))); | 125 new StandardManagementPolicyProvider(ExtensionPrefs::Get(profile_))); |
| 126 | 126 |
| 127 #if defined(OS_CHROMEOS) | 127 #if defined(OS_CHROMEOS) |
| 128 const user_manager::User* user = | 128 const user_manager::User* user = |
| 129 chromeos::UserManager::Get()->GetActiveUser(); | 129 user_manager::UserManager::Get()->GetActiveUser(); |
| 130 policy::DeviceLocalAccount::Type device_local_account_type; | 130 policy::DeviceLocalAccount::Type device_local_account_type; |
| 131 if (user && policy::IsDeviceLocalAccountUser(user->email(), | 131 if (user && policy::IsDeviceLocalAccountUser(user->email(), |
| 132 &device_local_account_type)) { | 132 &device_local_account_type)) { |
| 133 device_local_account_management_policy_provider_.reset( | 133 device_local_account_management_policy_provider_.reset( |
| 134 new chromeos::DeviceLocalAccountManagementPolicyProvider( | 134 new chromeos::DeviceLocalAccountManagementPolicyProvider( |
| 135 device_local_account_type)); | 135 device_local_account_type)); |
| 136 } | 136 } |
| 137 #endif // defined(OS_CHROMEOS) | 137 #endif // defined(OS_CHROMEOS) |
| 138 } | 138 } |
| 139 | 139 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( | 620 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( |
| 621 const std::string& extension_id, | 621 const std::string& extension_id, |
| 622 const UnloadedExtensionInfo::Reason reason) { | 622 const UnloadedExtensionInfo::Reason reason) { |
| 623 BrowserThread::PostTask( | 623 BrowserThread::PostTask( |
| 624 BrowserThread::IO, | 624 BrowserThread::IO, |
| 625 FROM_HERE, | 625 FROM_HERE, |
| 626 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); | 626 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); |
| 627 } | 627 } |
| 628 | 628 |
| 629 } // namespace extensions | 629 } // namespace extensions |
| OLD | NEW |