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/component_loader.h" | 5 #include "chrome/browser/extensions/component_loader.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "components/crx_file/id_util.h" | 32 #include "components/crx_file/id_util.h" |
33 #include "components/version_info/version_info.h" | 33 #include "components/version_info/version_info.h" |
34 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
35 #include "content/public/browser/plugin_service.h" | 35 #include "content/public/browser/plugin_service.h" |
36 #include "content/public/common/content_switches.h" | 36 #include "content/public/common/content_switches.h" |
37 #include "extensions/common/constants.h" | 37 #include "extensions/common/constants.h" |
38 #include "extensions/common/extension.h" | 38 #include "extensions/common/extension.h" |
39 #include "extensions/common/extension_l10n_util.h" | 39 #include "extensions/common/extension_l10n_util.h" |
40 #include "extensions/common/file_util.h" | 40 #include "extensions/common/file_util.h" |
41 #include "extensions/common/manifest_constants.h" | 41 #include "extensions/common/manifest_constants.h" |
| 42 #include "printing/features/features.h" |
42 #include "ui/base/l10n/l10n_util.h" | 43 #include "ui/base/l10n/l10n_util.h" |
43 #include "ui/base/resource/resource_bundle.h" | 44 #include "ui/base/resource/resource_bundle.h" |
44 | 45 |
45 #if defined(OS_CHROMEOS) | 46 #if defined(OS_CHROMEOS) |
46 #include "ash/common/system/chromeos/devicetype_utils.h" | 47 #include "ash/common/system/chromeos/devicetype_utils.h" |
47 #include "chromeos/chromeos_switches.h" | 48 #include "chromeos/chromeos_switches.h" |
48 #include "components/chrome_apps/grit/chrome_apps_resources.h" | 49 #include "components/chrome_apps/grit/chrome_apps_resources.h" |
49 #include "components/user_manager/user_manager.h" | 50 #include "components/user_manager/user_manager.h" |
50 #include "content/public/browser/site_instance.h" | 51 #include "content/public/browser/site_instance.h" |
51 #include "content/public/browser/storage_partition.h" | 52 #include "content/public/browser/storage_partition.h" |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 Add(IDR_BOOKMARKS_MANIFEST, | 476 Add(IDR_BOOKMARKS_MANIFEST, |
476 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); | 477 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); |
477 | 478 |
478 Add(IDR_CROSH_BUILTIN_MANIFEST, base::FilePath(FILE_PATH_LITERAL( | 479 Add(IDR_CROSH_BUILTIN_MANIFEST, base::FilePath(FILE_PATH_LITERAL( |
479 "/usr/share/chromeos-assets/crosh_builtin"))); | 480 "/usr/share/chromeos-assets/crosh_builtin"))); |
480 } | 481 } |
481 #else // defined(OS_CHROMEOS) | 482 #else // defined(OS_CHROMEOS) |
482 DCHECK(!skip_session_components); | 483 DCHECK(!skip_session_components); |
483 Add(IDR_BOOKMARKS_MANIFEST, | 484 Add(IDR_BOOKMARKS_MANIFEST, |
484 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); | 485 base::FilePath(FILE_PATH_LITERAL("bookmark_manager"))); |
485 #if defined(ENABLE_PRINTING) | 486 #if BUILDFLAG(ENABLE_PRINTING) |
486 // Cloud Print component app. Not required on Chrome OS. | 487 // Cloud Print component app. Not required on Chrome OS. |
487 Add(IDR_CLOUDPRINT_MANIFEST, | 488 Add(IDR_CLOUDPRINT_MANIFEST, |
488 base::FilePath(FILE_PATH_LITERAL("cloud_print"))); | 489 base::FilePath(FILE_PATH_LITERAL("cloud_print"))); |
489 #endif // defined(ENABLE_PRINTING) | 490 #endif // BUILDFLAG(ENABLE_PRINTING) |
490 #endif // defined(OS_CHROMEOS) | 491 #endif // defined(OS_CHROMEOS) |
491 | 492 |
492 if (!skip_session_components) { | 493 if (!skip_session_components) { |
493 AddWebStoreApp(); | 494 AddWebStoreApp(); |
494 AddChromeApp(); | 495 AddChromeApp(); |
495 } | 496 } |
496 | 497 |
497 AddKeyboardApp(); | 498 AddKeyboardApp(); |
498 | 499 |
499 AddDefaultComponentExtensionsWithBackgroundPages(skip_session_components); | 500 AddDefaultComponentExtensionsWithBackgroundPages(skip_session_components); |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 manifest.release(), | 691 manifest.release(), |
691 root_directory, | 692 root_directory, |
692 false); | 693 false); |
693 CHECK_EQ(extension_id, actual_extension_id); | 694 CHECK_EQ(extension_id, actual_extension_id); |
694 if (!done_cb.is_null()) | 695 if (!done_cb.is_null()) |
695 done_cb.Run(); | 696 done_cb.Run(); |
696 } | 697 } |
697 #endif | 698 #endif |
698 | 699 |
699 } // namespace extensions | 700 } // namespace extensions |
OLD | NEW |