| 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_manager.h" | |
| 41 #include "chrome/browser/chromeos/policy/app_pack_updater.h" | 40 #include "chrome/browser/chromeos/policy/app_pack_updater.h" |
| 42 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 41 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 43 #include "chrome/browser/chromeos/policy/device_local_account.h" | 42 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 44 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" | 43 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
| 45 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 44 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 46 #include "components/user_manager/user.h" | 45 #include "components/user_manager/user.h" |
| 46 #include "components/user_manager/user_manager.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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 #if defined(OS_MACOSX) | 430 #if defined(OS_MACOSX) |
| 431 check_admin_permissions_on_mac = | 431 check_admin_permissions_on_mac = |
| 432 ExternalPrefLoader::ENSURE_PATH_CONTROLLED_BY_ADMIN; | 432 ExternalPrefLoader::ENSURE_PATH_CONTROLLED_BY_ADMIN; |
| 433 #else | 433 #else |
| 434 check_admin_permissions_on_mac = ExternalPrefLoader::NONE; | 434 check_admin_permissions_on_mac = ExternalPrefLoader::NONE; |
| 435 #endif | 435 #endif |
| 436 | 436 |
| 437 bool is_chromeos_demo_session = false; | 437 bool is_chromeos_demo_session = false; |
| 438 int bundled_extension_creation_flags = Extension::NO_FLAGS; | 438 int bundled_extension_creation_flags = Extension::NO_FLAGS; |
| 439 #if defined(OS_CHROMEOS) | 439 #if defined(OS_CHROMEOS) |
| 440 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 440 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
| 441 is_chromeos_demo_session = | 441 is_chromeos_demo_session = |
| 442 user_manager && user_manager->IsLoggedInAsDemoUser() && | 442 user_manager && user_manager->IsLoggedInAsDemoUser() && |
| 443 connector->GetDeviceMode() == policy::DEVICE_MODE_RETAIL_KIOSK; | 443 connector->GetDeviceMode() == policy::DEVICE_MODE_RETAIL_KIOSK; |
| 444 bundled_extension_creation_flags = Extension::FROM_WEBSTORE | | 444 bundled_extension_creation_flags = Extension::FROM_WEBSTORE | |
| 445 Extension::WAS_INSTALLED_BY_DEFAULT; | 445 Extension::WAS_INSTALLED_BY_DEFAULT; |
| 446 #endif | 446 #endif |
| 447 | 447 |
| 448 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 448 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 449 if (!profile->IsSupervised()) { | 449 if (!profile->IsSupervised()) { |
| 450 provider_list->push_back( | 450 provider_list->push_back( |
| (...skipping 116 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 |