OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/external_provider_impl.h" | 5 #include "chrome/browser/extensions/external_provider_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "extensions/browser/extension_system.h" | 30 #include "extensions/browser/extension_system.h" |
31 #include "extensions/browser/external_provider_interface.h" | 31 #include "extensions/browser/external_provider_interface.h" |
32 #include "extensions/common/extension.h" | 32 #include "extensions/common/extension.h" |
33 #include "extensions/common/manifest.h" | 33 #include "extensions/common/manifest.h" |
34 #include "ui/base/l10n/l10n_util.h" | 34 #include "ui/base/l10n/l10n_util.h" |
35 | 35 |
36 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
37 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 37 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
38 #include "chrome/browser/chromeos/customization_document.h" | 38 #include "chrome/browser/chromeos/customization_document.h" |
39 #include "chrome/browser/chromeos/extensions/device_local_account_external_polic
y_loader.h" | 39 #include "chrome/browser/chromeos/extensions/device_local_account_external_polic
y_loader.h" |
40 #include "chrome/browser/chromeos/login/users/user.h" | |
41 #include "chrome/browser/chromeos/login/users/user_manager.h" | 40 #include "chrome/browser/chromeos/login/users/user_manager.h" |
42 #include "chrome/browser/chromeos/policy/app_pack_updater.h" | 41 #include "chrome/browser/chromeos/policy/app_pack_updater.h" |
43 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 42 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
44 #include "chrome/browser/chromeos/policy/device_local_account.h" | 43 #include "chrome/browser/chromeos/policy/device_local_account.h" |
45 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" | 44 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
46 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 45 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 46 #include "components/user_manager/user.h" |
47 #else | 47 #else |
48 #include "chrome/browser/extensions/default_apps.h" | 48 #include "chrome/browser/extensions/default_apps.h" |
49 #endif | 49 #endif |
50 | 50 |
51 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
52 #include "chrome/browser/extensions/external_registry_loader_win.h" | 52 #include "chrome/browser/extensions/external_registry_loader_win.h" |
53 #endif | 53 #endif |
54 | 54 |
55 using content::BrowserThread; | 55 using content::BrowserThread; |
56 | 56 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 void ExternalProviderImpl::CreateExternalProviders( | 357 void ExternalProviderImpl::CreateExternalProviders( |
358 VisitorInterface* service, | 358 VisitorInterface* service, |
359 Profile* profile, | 359 Profile* profile, |
360 ProviderCollection* provider_list) { | 360 ProviderCollection* provider_list) { |
361 scoped_refptr<ExternalLoader> external_loader; | 361 scoped_refptr<ExternalLoader> external_loader; |
362 extensions::Manifest::Location crx_location = Manifest::INVALID_LOCATION; | 362 extensions::Manifest::Location crx_location = Manifest::INVALID_LOCATION; |
363 #if defined(OS_CHROMEOS) | 363 #if defined(OS_CHROMEOS) |
364 policy::BrowserPolicyConnectorChromeOS* connector = | 364 policy::BrowserPolicyConnectorChromeOS* connector = |
365 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 365 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
366 bool is_chrome_os_public_session = false; | 366 bool is_chrome_os_public_session = false; |
367 const chromeos::User* user = | 367 const user_manager::User* user = |
368 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); | 368 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); |
369 policy::DeviceLocalAccount::Type account_type; | 369 policy::DeviceLocalAccount::Type account_type; |
370 if (user && policy::IsDeviceLocalAccountUser(user->email(), &account_type)) { | 370 if (user && policy::IsDeviceLocalAccountUser(user->email(), &account_type)) { |
371 if (account_type == policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION) | 371 if (account_type == policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION) |
372 is_chrome_os_public_session = true; | 372 is_chrome_os_public_session = true; |
373 policy::DeviceLocalAccountPolicyBroker* broker = | 373 policy::DeviceLocalAccountPolicyBroker* broker = |
374 connector->GetDeviceLocalAccountPolicyService()->GetBrokerForUser( | 374 connector->GetDeviceLocalAccountPolicyService()->GetBrokerForUser( |
375 user->email()); | 375 user->email()); |
376 if (broker) { | 376 if (broker) { |
377 external_loader = broker->extension_loader(); | 377 external_loader = broker->extension_loader(); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 service, | 567 service, |
568 new ExternalComponentLoader(profile), | 568 new ExternalComponentLoader(profile), |
569 profile, | 569 profile, |
570 Manifest::INVALID_LOCATION, | 570 Manifest::INVALID_LOCATION, |
571 Manifest::EXTERNAL_COMPONENT, | 571 Manifest::EXTERNAL_COMPONENT, |
572 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); | 572 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); |
573 } | 573 } |
574 } | 574 } |
575 | 575 |
576 } // namespace extensions | 576 } // namespace extensions |
OLD | NEW |