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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/linked_ptr.h" | 10 #include "base/memory/linked_ptr.h" |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 #endif | 326 #endif |
327 | 327 |
328 bool is_chromeos_demo_session = false; | 328 bool is_chromeos_demo_session = false; |
329 int bundled_extension_creation_flags = Extension::NO_FLAGS; | 329 int bundled_extension_creation_flags = Extension::NO_FLAGS; |
330 #if defined(OS_CHROMEOS) | 330 #if defined(OS_CHROMEOS) |
331 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); | 331 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); |
332 is_chromeos_demo_session = | 332 is_chromeos_demo_session = |
333 user_manager && user_manager->IsLoggedInAsDemoUser() && | 333 user_manager && user_manager->IsLoggedInAsDemoUser() && |
334 g_browser_process->browser_policy_connector()->GetDeviceMode() == | 334 g_browser_process->browser_policy_connector()->GetDeviceMode() == |
335 policy::DEVICE_MODE_KIOSK; | 335 policy::DEVICE_MODE_KIOSK; |
336 bundled_extension_creation_flags = Extension::FROM_WEBSTORE; | 336 bundled_extension_creation_flags = Extension::FROM_WEBSTORE | |
| 337 Extension::WAS_INSTALLED_BY_DEFAULT; |
337 #endif | 338 #endif |
338 | 339 |
339 if (!is_chromeos_demo_session) { | 340 if (!is_chromeos_demo_session) { |
340 provider_list->push_back( | 341 provider_list->push_back( |
341 linked_ptr<ExternalProviderInterface>( | 342 linked_ptr<ExternalProviderInterface>( |
342 new ExternalProviderImpl( | 343 new ExternalProviderImpl( |
343 service, | 344 service, |
344 new ExternalPrefLoader(chrome::DIR_EXTERNAL_EXTENSIONS, | 345 new ExternalPrefLoader(chrome::DIR_EXTERNAL_EXTENSIONS, |
345 check_admin_permissions_on_mac), | 346 check_admin_permissions_on_mac), |
346 Extension::EXTERNAL_PREF, | 347 Extension::EXTERNAL_PREF, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 service, | 420 service, |
420 connector->GetAppPackUpdater()->CreateExternalLoader(), | 421 connector->GetAppPackUpdater()->CreateExternalLoader(), |
421 Extension::EXTERNAL_PREF, | 422 Extension::EXTERNAL_PREF, |
422 Extension::INVALID, | 423 Extension::INVALID, |
423 Extension::NO_FLAGS))); | 424 Extension::NO_FLAGS))); |
424 } | 425 } |
425 #endif | 426 #endif |
426 } | 427 } |
427 | 428 |
428 } // namespace extensions | 429 } // namespace extensions |
OLD | NEW |