| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_extensions_whitelist/whitelist.h" | 5 #include "chrome/browser/extensions/component_extensions_whitelist/whitelist.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "chrome/common/extensions/extension_constants.h" | 12 #include "chrome/common/extensions/extension_constants.h" |
| 13 #include "chrome/common/features.h" | 13 #include "chrome/common/features.h" |
| 14 #include "chrome/grit/browser_resources.h" | 14 #include "chrome/grit/browser_resources.h" |
| 15 #include "extensions/common/constants.h" | 15 #include "extensions/common/constants.h" |
| 16 #include "printing/features/features.h" |
| 16 | 17 |
| 17 #if BUILDFLAG(ENABLE_APP_LIST) && defined(OS_CHROMEOS) | 18 #if BUILDFLAG(ENABLE_APP_LIST) && defined(OS_CHROMEOS) |
| 18 #include "chrome/browser/ui/app_list/google_now_extension.h" | 19 #include "chrome/browser/ui/app_list/google_now_extension.h" |
| 19 #endif | 20 #endif |
| 20 | 21 |
| 21 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
| 22 #include "chrome/browser/chromeos/input_method/component_extension_ime_manager_i
mpl.h" | 23 #include "chrome/browser/chromeos/input_method/component_extension_ime_manager_i
mpl.h" |
| 23 #include "components/chrome_apps/grit/chrome_apps_resources.h" | 24 #include "components/chrome_apps/grit/chrome_apps_resources.h" |
| 24 #include "ui/file_manager/grit/file_manager_resources.h" | 25 #include "ui/file_manager/grit/file_manager_resources.h" |
| 25 #include "ui/keyboard/grit/keyboard_resources.h" | 26 #include "ui/keyboard/grit/keyboard_resources.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return false; | 69 return false; |
| 69 } | 70 } |
| 70 | 71 |
| 71 bool IsComponentExtensionWhitelisted(int manifest_resource_id) { | 72 bool IsComponentExtensionWhitelisted(int manifest_resource_id) { |
| 72 switch (manifest_resource_id) { | 73 switch (manifest_resource_id) { |
| 73 // Please keep the list in alphabetical order. | 74 // Please keep the list in alphabetical order. |
| 74 case IDR_BOOKMARKS_MANIFEST: | 75 case IDR_BOOKMARKS_MANIFEST: |
| 75 #if BUILDFLAG(ENABLE_APP_LIST) | 76 #if BUILDFLAG(ENABLE_APP_LIST) |
| 76 case IDR_CHROME_APP_MANIFEST: | 77 case IDR_CHROME_APP_MANIFEST: |
| 77 #endif | 78 #endif |
| 78 #if defined(ENABLE_PRINTING) | 79 #if BUILDFLAG(ENABLE_PRINTING) |
| 79 case IDR_CLOUDPRINT_MANIFEST: | 80 case IDR_CLOUDPRINT_MANIFEST: |
| 80 #endif | 81 #endif |
| 81 case IDR_CRYPTOTOKEN_MANIFEST: | 82 case IDR_CRYPTOTOKEN_MANIFEST: |
| 82 case IDR_FEEDBACK_MANIFEST: | 83 case IDR_FEEDBACK_MANIFEST: |
| 83 case IDR_GAIA_AUTH_MANIFEST: | 84 case IDR_GAIA_AUTH_MANIFEST: |
| 84 #if defined(ENABLE_GOOGLE_NOW) | 85 #if defined(ENABLE_GOOGLE_NOW) |
| 85 case IDR_GOOGLE_NOW_MANIFEST: | 86 case IDR_GOOGLE_NOW_MANIFEST: |
| 86 #endif | 87 #endif |
| 87 #if BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) | 88 #if BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) |
| 88 case IDR_HANGOUT_SERVICES_MANIFEST: | 89 case IDR_HANGOUT_SERVICES_MANIFEST: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 128 } |
| 128 | 129 |
| 129 LOG(ERROR) << "Component extension with manifest resource id " | 130 LOG(ERROR) << "Component extension with manifest resource id " |
| 130 << manifest_resource_id << " not in whitelist and is not being " | 131 << manifest_resource_id << " not in whitelist and is not being " |
| 131 << "loaded as a result."; | 132 << "loaded as a result."; |
| 132 NOTREACHED(); | 133 NOTREACHED(); |
| 133 return false; | 134 return false; |
| 134 } | 135 } |
| 135 | 136 |
| 136 } // namespace extensions | 137 } // namespace extensions |
| OLD | NEW |