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