Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(391)

Side by Side Diff: chrome/browser/extensions/component_extensions_whitelist/whitelist.cc

Issue 1162283002: Load the Chrome OS TTS engine manifest from the file system isntead of resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update component extension whitelist. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" 9 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
10 #include "chrome/common/extensions/extension_constants.h" 10 #include "chrome/common/extensions/extension_constants.h"
(...skipping 14 matching lines...) Expand all
25 namespace extensions { 25 namespace extensions {
26 26
27 bool IsComponentExtensionWhitelisted(const std::string& extension_id) { 27 bool IsComponentExtensionWhitelisted(const std::string& extension_id) {
28 const char* allowed[] = { 28 const char* allowed[] = {
29 extension_misc::kHotwordSharedModuleId, 29 extension_misc::kHotwordSharedModuleId,
30 extension_misc::kInAppPaymentsSupportAppId, 30 extension_misc::kInAppPaymentsSupportAppId,
31 extension_misc::kMediaRouterStableExtensionId, 31 extension_misc::kMediaRouterStableExtensionId,
32 extension_misc::kPdfExtensionId, 32 extension_misc::kPdfExtensionId,
33 #if defined(OS_CHROMEOS) 33 #if defined(OS_CHROMEOS)
34 extension_misc::kChromeVoxExtensionId, 34 extension_misc::kChromeVoxExtensionId,
35 extension_misc::kSpeechSynthesisExtensionId,
35 extension_misc::kZIPUnpackerExtensionId, 36 extension_misc::kZIPUnpackerExtensionId,
36 #endif 37 #endif
37 }; 38 };
38 39
39 for (size_t i = 0; i < arraysize(allowed); ++i) { 40 for (size_t i = 0; i < arraysize(allowed); ++i) {
40 if (extension_id == allowed[i]) 41 if (extension_id == allowed[i])
41 return true; 42 return true;
42 } 43 }
43 44
44 std::string bookmark_extension_id; 45 std::string bookmark_extension_id;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 IDR_FILEMANAGER_MANIFEST, 101 IDR_FILEMANAGER_MANIFEST,
101 IDR_FIRST_RUN_DIALOG_MANIFEST, 102 IDR_FIRST_RUN_DIALOG_MANIFEST,
102 IDR_GAIA_AUTH_KEYBOARD_MANIFEST, 103 IDR_GAIA_AUTH_KEYBOARD_MANIFEST,
103 IDR_GALLERY_MANIFEST, 104 IDR_GALLERY_MANIFEST,
104 IDR_GENIUS_APP_MANIFEST, 105 IDR_GENIUS_APP_MANIFEST,
105 IDR_HELP_MANIFEST, 106 IDR_HELP_MANIFEST,
106 IDR_KEYBOARD_MANIFEST, 107 IDR_KEYBOARD_MANIFEST,
107 IDR_MOBILE_MANIFEST, 108 IDR_MOBILE_MANIFEST,
108 IDR_NETWORK_CONFIGURATION_MANIFEST, 109 IDR_NETWORK_CONFIGURATION_MANIFEST,
109 IDR_QUICKOFFICE_MANIFEST, 110 IDR_QUICKOFFICE_MANIFEST,
110 IDR_SPEECH_SYNTHESIS_GUEST_MANIFEST,
111 IDR_SPEECH_SYNTHESIS_MANIFEST,
112 IDR_VIDEO_PLAYER_MANIFEST, 111 IDR_VIDEO_PLAYER_MANIFEST,
113 IDR_WALLPAPERMANAGER_MANIFEST, 112 IDR_WALLPAPERMANAGER_MANIFEST,
114 #endif 113 #endif
115 }; 114 };
116 115
117 for (size_t i = 0; i < arraysize(allowed); ++i) { 116 for (size_t i = 0; i < arraysize(allowed); ++i) {
118 if (manifest_resource_id == allowed[i]) 117 if (manifest_resource_id == allowed[i])
119 return true; 118 return true;
120 } 119 }
121 120
122 LOG(ERROR) << "Component extension with manifest resource id " 121 LOG(ERROR) << "Component extension with manifest resource id "
123 << manifest_resource_id << " not in whitelist and is not being " 122 << manifest_resource_id << " not in whitelist and is not being "
124 << "loaded as a result."; 123 << "loaded as a result.";
125 NOTREACHED(); 124 NOTREACHED();
126 return false; 125 return false;
127 } 126 }
128 127
129 } // namespace extensions 128 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/browser_resources.grd ('k') | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698