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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
416 Extension::NO_FLAGS))); | 416 Extension::NO_FLAGS))); |
417 } | 417 } |
418 | 418 |
419 // Load the KioskAppExternalProvider when running in kiosk mode. | 419 // Load the KioskAppExternalProvider when running in kiosk mode. |
420 if (chrome::IsRunningInForcedAppMode()) { | 420 if (chrome::IsRunningInForcedAppMode()) { |
421 #if defined(OS_CHROMEOS) | 421 #if defined(OS_CHROMEOS) |
422 chromeos::KioskAppManager* kiosk_app_manager = | 422 chromeos::KioskAppManager* kiosk_app_manager = |
423 chromeos::KioskAppManager::Get(); | 423 chromeos::KioskAppManager::Get(); |
424 DCHECK(kiosk_app_manager); | 424 DCHECK(kiosk_app_manager); |
425 if (kiosk_app_manager && !kiosk_app_manager->external_loader_created()) { | 425 if (kiosk_app_manager && !kiosk_app_manager->external_loader_created()) { |
426 provider_list->push_back(linked_ptr<ExternalProviderInterface>( | 426 scoped_ptr<ExternalProviderImpl> kiosk_app_provider( |
427 new ExternalProviderImpl(service, | 427 new ExternalProviderImpl( |
428 kiosk_app_manager->CreateExternalLoader(), | 428 service, kiosk_app_manager->CreateExternalLoader(), profile, |
429 profile, | 429 Manifest::EXTERNAL_PREF, Manifest::INVALID_LOCATION, |
430 Manifest::EXTERNAL_PREF, | 430 Extension::NO_FLAGS)); |
Yoyo Zhou
2015/03/03 21:38:23
I think you should just set the kInstallFlagInstal
xiyuan
2015/03/03 22:04:21
To do that, it seems we need to add a boolean memb
xiyuan
2015/03/03 22:33:20
Done. Let me know what you think.
| |
431 Manifest::INVALID_LOCATION, | 431 kiosk_app_provider->set_auto_acknowledge(true); |
432 Extension::NO_FLAGS))); | 432 provider_list->push_back( |
433 linked_ptr<ExternalProviderInterface>(kiosk_app_provider.release())); | |
433 } | 434 } |
434 #endif | 435 #endif |
435 return; | 436 return; |
436 } | 437 } |
437 | 438 |
438 // Extensions provided by recommended policies. | 439 // Extensions provided by recommended policies. |
439 if (external_recommended_loader.get()) { | 440 if (external_recommended_loader.get()) { |
440 provider_list->push_back(linked_ptr<ExternalProviderInterface>( | 441 provider_list->push_back(linked_ptr<ExternalProviderInterface>( |
441 new ExternalProviderImpl(service, | 442 new ExternalProviderImpl(service, |
442 external_recommended_loader, | 443 external_recommended_loader, |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
577 service, | 578 service, |
578 new ExternalComponentLoader(profile), | 579 new ExternalComponentLoader(profile), |
579 profile, | 580 profile, |
580 Manifest::INVALID_LOCATION, | 581 Manifest::INVALID_LOCATION, |
581 Manifest::EXTERNAL_COMPONENT, | 582 Manifest::EXTERNAL_COMPONENT, |
582 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); | 583 Extension::FROM_WEBSTORE | Extension::WAS_INSTALLED_BY_DEFAULT))); |
583 } | 584 } |
584 } | 585 } |
585 | 586 |
586 } // namespace extensions | 587 } // namespace extensions |
OLD | NEW |