| 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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 int bundled_extension_creation_flags = Extension::NO_FLAGS; | 466 int bundled_extension_creation_flags = Extension::NO_FLAGS; |
| 467 #endif | 467 #endif |
| 468 #if defined(OS_CHROMEOS) | 468 #if defined(OS_CHROMEOS) |
| 469 bundled_extension_creation_flags = Extension::FROM_WEBSTORE | | 469 bundled_extension_creation_flags = Extension::FROM_WEBSTORE | |
| 470 Extension::WAS_INSTALLED_BY_DEFAULT; | 470 Extension::WAS_INSTALLED_BY_DEFAULT; |
| 471 | 471 |
| 472 if (!is_chrome_os_public_session) { | 472 if (!is_chrome_os_public_session) { |
| 473 int external_apps_path_id = profile->IsSupervised() ? | 473 int external_apps_path_id = profile->IsSupervised() ? |
| 474 chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS : | 474 chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS : |
| 475 chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS; | 475 chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS; |
| 476 ExternalPrefLoader::Options pref_load_flags = profile->IsNewProfile() ? | |
| 477 ExternalPrefLoader::DELAY_LOAD_UNTIL_PRIORITY_SYNC : | |
| 478 ExternalPrefLoader::NONE; | |
| 479 provider_list->push_back( | 476 provider_list->push_back( |
| 480 linked_ptr<ExternalProviderInterface>(new ExternalProviderImpl( | 477 linked_ptr<ExternalProviderInterface>(new ExternalProviderImpl( |
| 481 service, | 478 service, |
| 482 new ExternalPrefLoader(external_apps_path_id, | 479 new ExternalPrefLoader(external_apps_path_id, |
| 483 pref_load_flags, | 480 ExternalPrefLoader::NONE, |
| 484 profile), | 481 profile), |
| 485 profile, | 482 profile, |
| 486 Manifest::EXTERNAL_PREF, | 483 Manifest::EXTERNAL_PREF, |
| 487 Manifest::EXTERNAL_PREF_DOWNLOAD, | 484 Manifest::EXTERNAL_PREF_DOWNLOAD, |
| 488 bundled_extension_creation_flags))); | 485 bundled_extension_creation_flags))); |
| 489 | 486 |
| 490 // OEM default apps. | 487 // OEM default apps. |
| 491 int oem_extension_creation_flags = | 488 int oem_extension_creation_flags = |
| 492 bundled_extension_creation_flags | Extension::WAS_INSTALLED_BY_OEM; | 489 bundled_extension_creation_flags | Extension::WAS_INSTALLED_BY_OEM; |
| 493 chromeos::ServicesCustomizationDocument* customization = | 490 chromeos::ServicesCustomizationDocument* customization = |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 service, | 577 service, |
| 581 new ExternalComponentLoader(profile), | 578 new ExternalComponentLoader(profile), |
| 582 profile, | 579 profile, |
| 583 Manifest::INVALID_LOCATION, | 580 Manifest::INVALID_LOCATION, |
| 584 Manifest::EXTERNAL_COMPONENT, | 581 Manifest::EXTERNAL_COMPONENT, |
| 585 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); | 582 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); |
| 586 } | 583 } |
| 587 } | 584 } |
| 588 | 585 |
| 589 } // namespace extensions | 586 } // namespace extensions |
| OLD | NEW |