| 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_extension_provider_impl.h" | 5 #include "chrome/browser/extensions/external_extension_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 17 matching lines...) Expand all Loading... |
| 28 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
| 29 #include "chrome/browser/chromeos/login/user_manager.h" | 29 #include "chrome/browser/chromeos/login/user_manager.h" |
| 30 #include "chrome/browser/policy/app_pack_updater.h" | 30 #include "chrome/browser/policy/app_pack_updater.h" |
| 31 #include "chrome/browser/policy/browser_policy_connector.h" | 31 #include "chrome/browser/policy/browser_policy_connector.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 #if !defined(OS_CHROMEOS) | 34 #if !defined(OS_CHROMEOS) |
| 35 #include "chrome/browser/extensions/default_apps.h" | 35 #include "chrome/browser/extensions/default_apps.h" |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 39 #include "chrome/browser/extensions/external_filesystem_extension_loader_linux.h
" |
| 40 #endif |
| 41 |
| 38 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
| 39 #include "chrome/browser/extensions/external_registry_extension_loader_win.h" | 43 #include "chrome/browser/extensions/external_registry_extension_loader_win.h" |
| 40 #endif | 44 #endif |
| 41 | 45 |
| 42 using content::BrowserThread; | 46 using content::BrowserThread; |
| 43 | 47 |
| 44 // Constants for keeping track of extension preferences in a dictionary. | 48 // Constants for keeping track of extension preferences in a dictionary. |
| 45 const char ExternalExtensionProviderImpl::kExternalCrx[] = "external_crx"; | 49 const char ExternalExtensionProviderImpl::kExternalCrx[] = "external_crx"; |
| 46 const char ExternalExtensionProviderImpl::kExternalVersion[] = | 50 const char ExternalExtensionProviderImpl::kExternalVersion[] = |
| 47 "external_version"; | 51 "external_version"; |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 #if defined(OS_WIN) | 352 #if defined(OS_WIN) |
| 349 provider_list->push_back( | 353 provider_list->push_back( |
| 350 linked_ptr<ExternalExtensionProviderInterface>( | 354 linked_ptr<ExternalExtensionProviderInterface>( |
| 351 new ExternalExtensionProviderImpl( | 355 new ExternalExtensionProviderImpl( |
| 352 service, | 356 service, |
| 353 new ExternalRegistryExtensionLoader, | 357 new ExternalRegistryExtensionLoader, |
| 354 Extension::EXTERNAL_REGISTRY, | 358 Extension::EXTERNAL_REGISTRY, |
| 355 Extension::INVALID, | 359 Extension::INVALID, |
| 356 Extension::NO_FLAGS))); | 360 Extension::NO_FLAGS))); |
| 357 #endif | 361 #endif |
| 362 |
| 363 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 358 provider_list->push_back( | 364 provider_list->push_back( |
| 359 linked_ptr<ExternalExtensionProviderInterface>( | 365 linked_ptr<ExternalExtensionProviderInterface>( |
| 360 new ExternalExtensionProviderImpl( | 366 new ExternalExtensionProviderImpl( |
| 367 service, |
| 368 new ExternalFilesystemExtensionLoader( |
| 369 chrome::DIR_SINGLE_EXTERNAL_EXTENSIONS), |
| 370 Extension::EXTERNAL_PREF, |
| 371 Extension::EXTERNAL_PREF_DOWNLOAD, |
| 372 Extension::NO_FLAGS))); |
| 373 #endif |
| 374 |
| 375 provider_list->push_back( |
| 376 linked_ptr<ExternalExtensionProviderInterface>( |
| 377 new ExternalExtensionProviderImpl( |
| 361 service, | 378 service, |
| 362 new ExternalPolicyExtensionLoader(profile), | 379 new ExternalPolicyExtensionLoader(profile), |
| 363 Extension::INVALID, | 380 Extension::INVALID, |
| 364 Extension::EXTERNAL_POLICY_DOWNLOAD, | 381 Extension::EXTERNAL_POLICY_DOWNLOAD, |
| 365 Extension::NO_FLAGS))); | 382 Extension::NO_FLAGS))); |
| 366 | 383 |
| 367 #if !defined(OS_CHROMEOS) | 384 #if !defined(OS_CHROMEOS) |
| 368 provider_list->push_back( | 385 provider_list->push_back( |
| 369 linked_ptr<ExternalExtensionProviderInterface>( | 386 linked_ptr<ExternalExtensionProviderInterface>( |
| 370 new default_apps::Provider( | 387 new default_apps::Provider( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 389 linked_ptr<ExternalExtensionProviderInterface>( | 406 linked_ptr<ExternalExtensionProviderInterface>( |
| 390 new ExternalExtensionProviderImpl( | 407 new ExternalExtensionProviderImpl( |
| 391 service, | 408 service, |
| 392 connector->GetAppPackUpdater()->CreateExternalExtensionLoader(), | 409 connector->GetAppPackUpdater()->CreateExternalExtensionLoader(), |
| 393 Extension::EXTERNAL_PREF, | 410 Extension::EXTERNAL_PREF, |
| 394 Extension::INVALID, | 411 Extension::INVALID, |
| 395 Extension::NO_FLAGS))); | 412 Extension::NO_FLAGS))); |
| 396 } | 413 } |
| 397 #endif | 414 #endif |
| 398 } | 415 } |
| OLD | NEW |