| 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 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
| 30 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.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/extensions/device_local_account_external_polic
y_loader.h" | 37 #include "chrome/browser/chromeos/extensions/device_local_account_external_polic
y_loader.h" |
| 38 #include "chrome/browser/chromeos/extensions/external_pref_cache_loader.h" | 38 #include "chrome/browser/chromeos/extensions/external_pref_cache_loader.h" |
| 39 #include "chrome/browser/chromeos/extensions/speech_synthesis_loader.h" |
| 39 #include "chrome/browser/chromeos/login/user.h" | 40 #include "chrome/browser/chromeos/login/user.h" |
| 40 #include "chrome/browser/chromeos/login/user_manager.h" | 41 #include "chrome/browser/chromeos/login/user_manager.h" |
| 41 #include "chrome/browser/chromeos/policy/app_pack_updater.h" | 42 #include "chrome/browser/chromeos/policy/app_pack_updater.h" |
| 42 #include "chrome/browser/chromeos/policy/device_local_account.h" | 43 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 43 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" | 44 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
| 44 #include "chrome/browser/policy/browser_policy_connector.h" | 45 #include "chrome/browser/policy/browser_policy_connector.h" |
| 45 #else | 46 #else |
| 46 #include "chrome/browser/extensions/default_apps.h" | 47 #include "chrome/browser/extensions/default_apps.h" |
| 47 #endif | 48 #endif |
| 48 | 49 |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 provider_list->push_back( | 452 provider_list->push_back( |
| 452 linked_ptr<ExternalProviderInterface>( | 453 linked_ptr<ExternalProviderInterface>( |
| 453 new ExternalProviderImpl( | 454 new ExternalProviderImpl( |
| 454 service, | 455 service, |
| 455 app_pack_updater->CreateExternalLoader(), | 456 app_pack_updater->CreateExternalLoader(), |
| 456 profile, | 457 profile, |
| 457 Manifest::EXTERNAL_PREF, | 458 Manifest::EXTERNAL_PREF, |
| 458 Manifest::INVALID_LOCATION, | 459 Manifest::INVALID_LOCATION, |
| 459 Extension::NO_FLAGS))); | 460 Extension::NO_FLAGS))); |
| 460 } | 461 } |
| 462 |
| 463 if (!is_chromeos_demo_session) { |
| 464 provider_list->push_back( |
| 465 linked_ptr<ExternalProviderInterface>( |
| 466 new ExternalProviderImpl( |
| 467 service, |
| 468 new chromeos::SpeechSynthesisLoader(profile), |
| 469 profile, |
| 470 Manifest::EXTERNAL_COMPONENT, |
| 471 Manifest::EXTERNAL_COMPONENT, |
| 472 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); |
| 473 } |
| 461 #endif | 474 #endif |
| 462 | 475 |
| 463 if (!profile->IsManaged() && !is_chromeos_demo_session) { | 476 if (!profile->IsManaged() && !is_chromeos_demo_session) { |
| 464 provider_list->push_back( | 477 provider_list->push_back( |
| 465 linked_ptr<ExternalProviderInterface>( | 478 linked_ptr<ExternalProviderInterface>( |
| 466 new ExternalProviderImpl( | 479 new ExternalProviderImpl( |
| 467 service, | 480 service, |
| 468 new ExternalPrefLoader(chrome::DIR_EXTERNAL_EXTENSIONS, | 481 new ExternalPrefLoader(chrome::DIR_EXTERNAL_EXTENSIONS, |
| 469 check_admin_permissions_on_mac), | 482 check_admin_permissions_on_mac), |
| 470 profile, | 483 profile, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 service, | 534 service, |
| 522 new ExternalComponentLoader(), | 535 new ExternalComponentLoader(), |
| 523 profile, | 536 profile, |
| 524 Manifest::INVALID_LOCATION, | 537 Manifest::INVALID_LOCATION, |
| 525 Manifest::EXTERNAL_COMPONENT, | 538 Manifest::EXTERNAL_COMPONENT, |
| 526 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); | 539 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); |
| 527 } | 540 } |
| 528 } | 541 } |
| 529 | 542 |
| 530 } // namespace extensions | 543 } // namespace extensions |
| OLD | NEW |