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

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

Issue 2805183002: Make ZIP archiver a component extension. (Closed)
Patch Set: Move the command line check into the function body. Created 3 years, 8 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
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 <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"
(...skipping 23 matching lines...) Expand all
34 extension_misc::kInAppPaymentsSupportAppId, 34 extension_misc::kInAppPaymentsSupportAppId,
35 #if defined(ENABLE_MEDIA_ROUTER) 35 #if defined(ENABLE_MEDIA_ROUTER)
36 extension_misc::kMediaRouterStableExtensionId, 36 extension_misc::kMediaRouterStableExtensionId,
37 #endif // defined(ENABLE_MEDIA_ROUTER) 37 #endif // defined(ENABLE_MEDIA_ROUTER)
38 extension_misc::kPdfExtensionId, 38 extension_misc::kPdfExtensionId,
39 #if defined(OS_CHROMEOS) 39 #if defined(OS_CHROMEOS)
40 extension_misc::kChromeVoxExtensionId, 40 extension_misc::kChromeVoxExtensionId,
41 extension_misc::kSelectToSpeakExtensionId, 41 extension_misc::kSelectToSpeakExtensionId,
42 extension_misc::kSpeechSynthesisExtensionId, 42 extension_misc::kSpeechSynthesisExtensionId,
43 extension_misc::kSwitchAccessExtensionId, 43 extension_misc::kSwitchAccessExtensionId,
44 extension_misc::kZIPUnpackerExtensionId, 44 extension_misc::kZIPUnpackerExtensionId,
yawano 2017/04/20 01:43:16 IIUC, we need to add ZipArchiverExtensionId here.
brettw 2017/04/20 03:23:17 Don't we need this to be done before submitting?
yawano 2017/04/20 03:52:24 No, we don't need to do it. ComponentLoader::Add(p
45 #endif 45 #endif
46 }; 46 };
47 47
48 for (size_t i = 0; i < arraysize(kAllowed); ++i) { 48 for (size_t i = 0; i < arraysize(kAllowed); ++i) {
49 if (extension_id == kAllowed[i]) 49 if (extension_id == kAllowed[i])
50 return true; 50 return true;
51 } 51 }
52 52
53 #if BUILDFLAG(ENABLE_APP_LIST) && defined(OS_CHROMEOS) 53 #if BUILDFLAG(ENABLE_APP_LIST) && defined(OS_CHROMEOS)
54 std::string google_now_extension_id; 54 std::string google_now_extension_id;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 case IDR_CONNECTIVITY_DIAGNOSTICS_LAUNCHER_MANIFEST: 105 case IDR_CONNECTIVITY_DIAGNOSTICS_LAUNCHER_MANIFEST:
106 case IDR_CONNECTIVITY_DIAGNOSTICS_MANIFEST: 106 case IDR_CONNECTIVITY_DIAGNOSTICS_MANIFEST:
107 case IDR_CROSH_BUILTIN_MANIFEST: 107 case IDR_CROSH_BUILTIN_MANIFEST:
108 case IDR_DEMO_APP_MANIFEST: 108 case IDR_DEMO_APP_MANIFEST:
109 case IDR_EASY_UNLOCK_MANIFEST: 109 case IDR_EASY_UNLOCK_MANIFEST:
110 case IDR_EASY_UNLOCK_MANIFEST_SIGNIN: 110 case IDR_EASY_UNLOCK_MANIFEST_SIGNIN:
111 case IDR_ECHO_MANIFEST: 111 case IDR_ECHO_MANIFEST:
112 case IDR_FILEMANAGER_MANIFEST: 112 case IDR_FILEMANAGER_MANIFEST:
113 case IDR_FIRST_RUN_DIALOG_MANIFEST: 113 case IDR_FIRST_RUN_DIALOG_MANIFEST:
114 case IDR_GALLERY_MANIFEST: 114 case IDR_GALLERY_MANIFEST:
115 case IDR_ZIP_ARCHIVER_MANIFEST:
115 case IDR_KEYBOARD_MANIFEST: 116 case IDR_KEYBOARD_MANIFEST:
116 case IDR_MOBILE_MANIFEST: 117 case IDR_MOBILE_MANIFEST:
117 case IDR_VIDEO_PLAYER_MANIFEST: 118 case IDR_VIDEO_PLAYER_MANIFEST:
118 case IDR_WALLPAPERMANAGER_MANIFEST: 119 case IDR_WALLPAPERMANAGER_MANIFEST:
119 #if defined(GOOGLE_CHROME_BUILD) 120 #if defined(GOOGLE_CHROME_BUILD)
120 case IDR_GENIUS_APP_MANIFEST: 121 case IDR_GENIUS_APP_MANIFEST:
121 case IDR_HELP_MANIFEST: 122 case IDR_HELP_MANIFEST:
122 case IDR_QUICKOFFICE_MANIFEST: 123 case IDR_QUICKOFFICE_MANIFEST:
123 #endif // defined(GOOGLE_CHROME_BUILD) 124 #endif // defined(GOOGLE_CHROME_BUILD)
124 #endif // defined(OS_CHROMEOS) 125 #endif // defined(OS_CHROMEOS)
125 return true; 126 return true;
126 } 127 }
127 128
128 LOG(ERROR) << "Component extension with manifest resource id " 129 LOG(ERROR) << "Component extension with manifest resource id "
129 << manifest_resource_id << " not in whitelist and is not being " 130 << manifest_resource_id << " not in whitelist and is not being "
130 << "loaded as a result."; 131 << "loaded as a result.";
131 NOTREACHED(); 132 NOTREACHED();
132 return false; 133 return false;
133 } 134 }
134 135
135 } // namespace extensions 136 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_component_extension_resource_manager.cc ('k') | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698