[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "chrome/browser/extensions/external_install_manager.h" |
| 6 | |
| 7 | #include <string> |
| 8 | |
| 9 | #include "base/logging.h" |
asvitkine | aa06031 | 2016-09-01 22:44:13 | [diff] [blame] | 10 | #include "base/metrics/histogram_macros.h" |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 11 | #include "chrome/app/chrome_command_ids.h" |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 12 | #include "chrome/browser/chrome_notification_types.h" |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 13 | #include "chrome/browser/extensions/external_install_error.h" |
| 14 | #include "chrome/browser/profiles/profile.h" |
rdevlin.cronin | 9d7ae4d | 2017-01-13 16:38:23 | [diff] [blame] | 15 | #include "components/version_info/version_info.h" |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 16 | #include "content/public/browser/notification_details.h" |
| 17 | #include "content/public/browser/notification_source.h" |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 18 | #include "extensions/browser/extension_prefs.h" |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 19 | #include "extensions/browser/extension_registry.h" |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 20 | #include "extensions/common/extension.h" |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 21 | #include "extensions/common/feature_switch.h" |
rdevlin.cronin | 9d7ae4d | 2017-01-13 16:38:23 | [diff] [blame] | 22 | #include "extensions/common/features/feature_channel.h" |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 23 | #include "extensions/common/manifest.h" |
rockot | d554614 | 2014-10-15 00:29:08 | [diff] [blame] | 24 | #include "extensions/common/manifest_url_handlers.h" |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 25 | |
| 26 | namespace extensions { |
| 27 | |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 28 | namespace { |
| 29 | |
| 30 | // Histogram values for logging events related to externally installed |
| 31 | // extensions. |
| 32 | enum ExternalExtensionEvent { |
| 33 | EXTERNAL_EXTENSION_INSTALLED = 0, |
| 34 | EXTERNAL_EXTENSION_IGNORED, |
| 35 | EXTERNAL_EXTENSION_REENABLED, |
| 36 | EXTERNAL_EXTENSION_UNINSTALLED, |
| 37 | EXTERNAL_EXTENSION_BUCKET_BOUNDARY, |
| 38 | }; |
| 39 | |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 40 | // Prompt the user this many times before considering an extension acknowledged. |
| 41 | const int kMaxExtensionAcknowledgePromptCount = 3; |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 42 | |
| 43 | void LogExternalExtensionEvent(const Extension* extension, |
| 44 | ExternalExtensionEvent event) { |
| 45 | UMA_HISTOGRAM_ENUMERATION("Extensions.ExternalExtensionEvent", |
| 46 | event, |
| 47 | EXTERNAL_EXTENSION_BUCKET_BOUNDARY); |
| 48 | if (ManifestURL::UpdatesFromGallery(extension)) { |
| 49 | UMA_HISTOGRAM_ENUMERATION("Extensions.ExternalExtensionEventWebstore", |
| 50 | event, |
| 51 | EXTERNAL_EXTENSION_BUCKET_BOUNDARY); |
| 52 | } else { |
| 53 | UMA_HISTOGRAM_ENUMERATION("Extensions.ExternalExtensionEventNonWebstore", |
| 54 | event, |
| 55 | EXTERNAL_EXTENSION_BUCKET_BOUNDARY); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | } // namespace |
| 60 | |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 61 | ExternalInstallManager::ExternalInstallManager( |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 62 | content::BrowserContext* browser_context, |
| 63 | bool is_first_run) |
| 64 | : browser_context_(browser_context), |
| 65 | is_first_run_(is_first_run), |
| 66 | extension_prefs_(ExtensionPrefs::Get(browser_context_)), |
lazyboy | 1899eec4 | 2016-03-08 19:00:50 | [diff] [blame] | 67 | currently_visible_install_alert_(nullptr), |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 68 | extension_registry_observer_(this) { |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 69 | DCHECK(browser_context_); |
| 70 | extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_)); |
rdevlin.cronin | a1c3f1a | 2017-05-18 17:45:46 | [diff] [blame] | 71 | Profile* profile = Profile::FromBrowserContext(browser_context_); |
| 72 | registrar_.Add(this, extensions::NOTIFICATION_EXTENSION_REMOVED, |
| 73 | content::Source<Profile>(profile)); |
| 74 | registrar_.Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED, |
| 75 | content::Source<Profile>(profile)); |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 76 | // Populate the set of unacknowledged external extensions now. We can't just |
| 77 | // rely on IsUnacknowledgedExternalExtension() for cases like |
| 78 | // OnExtensionLoaded(), since we need to examine the disable reasons, which |
| 79 | // can be removed throughout the session. |
| 80 | for (const auto& extension : |
| 81 | ExtensionRegistry::Get(browser_context)->disabled_extensions()) { |
| 82 | if (IsUnacknowledgedExternalExtension(*extension)) |
| 83 | unacknowledged_ids_.insert(extension->id()); |
| 84 | } |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | ExternalInstallManager::~ExternalInstallManager() { |
| 88 | } |
| 89 | |
rdevlin.cronin | 9d7ae4d | 2017-01-13 16:38:23 | [diff] [blame] | 90 | |
| 91 | bool ExternalInstallManager::IsPromptingEnabled() { |
rdevlin.cronin | 9d7ae4d | 2017-01-13 16:38:23 | [diff] [blame] | 92 | return FeatureSwitch::prompt_for_external_extensions()->IsEnabled(); |
rdevlin.cronin | 9d7ae4d | 2017-01-13 16:38:23 | [diff] [blame] | 93 | } |
| 94 | |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 95 | void ExternalInstallManager::AddExternalInstallError(const Extension* extension, |
| 96 | bool is_new_profile) { |
rdevlin.cronin | b2daf2e4 | 2016-01-14 20:00:54 | [diff] [blame] | 97 | // Error already exists or has been previously shown. |
skyostil | 32fa6b3f9 | 2016-08-12 13:15:43 | [diff] [blame] | 98 | if (base::ContainsKey(errors_, extension->id()) || |
rdevlin.cronin | b2daf2e4 | 2016-01-14 20:00:54 | [diff] [blame] | 99 | shown_ids_.count(extension->id()) > 0) |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 100 | return; |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 101 | |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 102 | ExternalInstallError::AlertType alert_type = |
| 103 | (ManifestURL::UpdatesFromGallery(extension) && !is_new_profile) |
| 104 | ? ExternalInstallError::BUBBLE_ALERT |
| 105 | : ExternalInstallError::MENU_ALERT; |
| 106 | |
dcheng | c963c714 | 2016-04-08 03:55:22 | [diff] [blame] | 107 | std::unique_ptr<ExternalInstallError> error(new ExternalInstallError( |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 108 | browser_context_, extension->id(), alert_type, this)); |
rdevlin.cronin | b2daf2e4 | 2016-01-14 20:00:54 | [diff] [blame] | 109 | shown_ids_.insert(extension->id()); |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 110 | errors_.insert(std::make_pair(extension->id(), std::move(error))); |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 111 | } |
| 112 | |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 113 | void ExternalInstallManager::RemoveExternalInstallError( |
| 114 | const std::string& extension_id) { |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 115 | auto iter = errors_.find(extension_id); |
lazyboy | 1899eec4 | 2016-03-08 19:00:50 | [diff] [blame] | 116 | if (iter != errors_.end()) { |
Karan Bhatia | e9d5166f | 2017-07-17 22:06:43 | [diff] [blame] | 117 | // The |extension_id| may be owned by the ExternalInstallError, which is |
| 118 | // deleted subsequently. To avoid any UAFs, make a safe copy of |
| 119 | // |extension_id| now. |
| 120 | std::string extension_id_copy = extension_id; |
| 121 | |
lazyboy | 1899eec4 | 2016-03-08 19:00:50 | [diff] [blame] | 122 | if (iter->second.get() == currently_visible_install_alert_) |
| 123 | currently_visible_install_alert_ = nullptr; |
| 124 | errors_.erase(iter); |
Devlin Cronin | 63bd555 | 2018-01-18 19:05:35 | [diff] [blame] | 125 | // No need to erase the ID from |unacknowledged_ids_|; it's already in |
| 126 | // |shown_ids_|. |
rdevlin.cronin | b2daf2e4 | 2016-01-14 20:00:54 | [diff] [blame] | 127 | UpdateExternalExtensionAlert(); |
lazyboy | 1899eec4 | 2016-03-08 19:00:50 | [diff] [blame] | 128 | } |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 129 | } |
| 130 | |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 131 | void ExternalInstallManager::UpdateExternalExtensionAlert() { |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 132 | // If the feature is not enabled do nothing. |
rdevlin.cronin | 9d7ae4d | 2017-01-13 16:38:23 | [diff] [blame] | 133 | if (!IsPromptingEnabled()) |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 134 | return; |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 135 | |
| 136 | // Look for any extensions that were disabled because of being unacknowledged |
| 137 | // external extensions. |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 138 | const ExtensionSet& disabled_extensions = |
| 139 | ExtensionRegistry::Get(browser_context_)->disabled_extensions(); |
Owen Min | b71016d | 2018-01-11 01:51:49 | [diff] [blame] | 140 | const ExtensionSet& blocked_extensions = |
| 141 | ExtensionRegistry::Get(browser_context_)->blocked_extensions(); |
Devlin Cronin | 96a2cf9 | 2018-04-18 19:09:59 | [diff] [blame] | 142 | |
| 143 | // The list of ids can be mutated during this loop, so make a copy. |
| 144 | const std::set<ExtensionId> ids_copy = unacknowledged_ids_; |
| 145 | for (const auto& id : ids_copy) { |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 146 | if (base::ContainsKey(errors_, id) || shown_ids_.count(id) > 0) |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 147 | continue; |
| 148 | |
Owen Min | b71016d | 2018-01-11 01:51:49 | [diff] [blame] | 149 | // Ignore the blocked and disabled extensions. They will be put into |
| 150 | // disabled list once unblocked. |
| 151 | if (blocked_extensions.GetByID(id)) |
| 152 | continue; |
| 153 | |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 154 | const Extension* extension = disabled_extensions.GetByID(id); |
| 155 | CHECK(extension); |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 156 | |
| 157 | // Warn the user about the suspicious extension. |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 158 | if (extension_prefs_->IncrementAcknowledgePromptCount(id) > |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 159 | kMaxExtensionAcknowledgePromptCount) { |
| 160 | // Stop prompting for this extension and record metrics. |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 161 | extension_prefs_->AcknowledgeExternalExtension(id); |
| 162 | LogExternalExtensionEvent(extension, EXTERNAL_EXTENSION_IGNORED); |
Devlin Cronin | 96a2cf9 | 2018-04-18 19:09:59 | [diff] [blame] | 163 | unacknowledged_ids_.erase(id); |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 164 | continue; |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 165 | } |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 166 | |
| 167 | if (is_first_run_) |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 168 | extension_prefs_->SetExternalInstallFirstRun(id); |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 169 | |
| 170 | // |first_run| is true if the extension was installed during a first run |
| 171 | // (even if it's post-first run now). |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 172 | AddExternalInstallError(extension, |
| 173 | extension_prefs_->IsExternalInstallFirstRun(id)); |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 174 | } |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | void ExternalInstallManager::AcknowledgeExternalExtension( |
| 178 | const std::string& id) { |
Devlin Cronin | 96a2cf9 | 2018-04-18 19:09:59 | [diff] [blame] | 179 | unacknowledged_ids_.erase(id); |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 180 | extension_prefs_->AcknowledgeExternalExtension(id); |
| 181 | UpdateExternalExtensionAlert(); |
| 182 | } |
| 183 | |
lazyboy | 1899eec4 | 2016-03-08 19:00:50 | [diff] [blame] | 184 | void ExternalInstallManager::DidChangeInstallAlertVisibility( |
| 185 | ExternalInstallError* external_install_error, |
| 186 | bool visible) { |
| 187 | if (visible) { |
| 188 | currently_visible_install_alert_ = external_install_error; |
| 189 | } else if (!visible && |
| 190 | currently_visible_install_alert_ == external_install_error) { |
| 191 | currently_visible_install_alert_ = nullptr; |
| 192 | } |
| 193 | } |
| 194 | |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 195 | std::vector<ExternalInstallError*> |
| 196 | ExternalInstallManager::GetErrorsForTesting() { |
| 197 | std::vector<ExternalInstallError*> errors; |
| 198 | for (auto const& error : errors_) |
| 199 | errors.push_back(error.second.get()); |
| 200 | return errors; |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 201 | } |
| 202 | |
Devlin Cronin | 63bd555 | 2018-01-18 19:05:35 | [diff] [blame] | 203 | void ExternalInstallManager::ClearShownIdsForTesting() { |
| 204 | shown_ids_.clear(); |
| 205 | } |
| 206 | |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 207 | void ExternalInstallManager::OnExtensionLoaded( |
| 208 | content::BrowserContext* browser_context, |
| 209 | const Extension* extension) { |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 210 | if (!unacknowledged_ids_.count(extension->id())) |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 211 | return; |
| 212 | |
| 213 | // We treat loading as acknowledgement (since the user consciously chose to |
| 214 | // re-enable the extension). |
| 215 | AcknowledgeExternalExtension(extension->id()); |
| 216 | LogExternalExtensionEvent(extension, EXTERNAL_EXTENSION_REENABLED); |
| 217 | |
| 218 | // If we had an error for this extension, remove it. |
lazyboy | 0b9b30f | 2016-01-05 03:15:37 | [diff] [blame] | 219 | RemoveExternalInstallError(extension->id()); |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | void ExternalInstallManager::OnExtensionInstalled( |
| 223 | content::BrowserContext* browser_context, |
[email protected] | 38e87253 | 2014-07-16 23:27:51 | [diff] [blame] | 224 | const Extension* extension, |
| 225 | bool is_update) { |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 226 | // Certain extension locations are specific enough that we can |
| 227 | // auto-acknowledge any extension that came from one of them. |
| 228 | if (Manifest::IsPolicyLocation(extension->location()) || |
| 229 | extension->location() == Manifest::EXTERNAL_COMPONENT) { |
| 230 | AcknowledgeExternalExtension(extension->id()); |
| 231 | return; |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 232 | } |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 233 | |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 234 | if (!IsUnacknowledgedExternalExtension(*extension)) |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 235 | return; |
| 236 | |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 237 | unacknowledged_ids_.insert(extension->id()); |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 238 | LogExternalExtensionEvent(extension, EXTERNAL_EXTENSION_INSTALLED); |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 239 | UpdateExternalExtensionAlert(); |
| 240 | } |
| 241 | |
| 242 | void ExternalInstallManager::OnExtensionUninstalled( |
| 243 | content::BrowserContext* browser_context, |
[email protected] | e43c61f | 2014-07-20 21:46:34 | [diff] [blame] | 244 | const Extension* extension, |
| 245 | extensions::UninstallReason reason) { |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 246 | if (unacknowledged_ids_.erase(extension->id())) |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 247 | LogExternalExtensionEvent(extension, EXTERNAL_EXTENSION_UNINSTALLED); |
| 248 | } |
| 249 | |
| 250 | bool ExternalInstallManager::IsUnacknowledgedExternalExtension( |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 251 | const Extension& extension) const { |
rdevlin.cronin | 9d7ae4d | 2017-01-13 16:38:23 | [diff] [blame] | 252 | if (!IsPromptingEnabled()) |
[email protected] | 374ceb6f | 2014-07-02 19:25:34 | [diff] [blame] | 253 | return false; |
| 254 | |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 255 | int disable_reasons = extension_prefs_->GetDisableReasons(extension.id()); |
| 256 | bool is_from_sideload_wipeout = |
Minh X. Nguyen | 4547901 | 2017-08-18 21:35:36 | [diff] [blame] | 257 | (disable_reasons & disable_reason::DISABLE_SIDELOAD_WIPEOUT) != 0; |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 258 | // We don't consider extensions that weren't disabled for being external so |
| 259 | // that we grandfather in extensions. External extensions are only disabled on |
| 260 | // install with the "prompt for external extensions" feature enabled. |
| 261 | bool is_disabled_external = |
Minh X. Nguyen | 4547901 | 2017-08-18 21:35:36 | [diff] [blame] | 262 | (disable_reasons & disable_reason::DISABLE_EXTERNAL_EXTENSION) != 0; |
rdevlin.cronin | e145671 | 2016-12-29 22:47:28 | [diff] [blame] | 263 | return is_disabled_external && !is_from_sideload_wipeout && |
| 264 | Manifest::IsExternalLocation(extension.location()) && |
| 265 | !extension_prefs_->IsExternalExtensionAcknowledged(extension.id()); |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 266 | } |
| 267 | |
| 268 | void ExternalInstallManager::Observe( |
| 269 | int type, |
| 270 | const content::NotificationSource& source, |
| 271 | const content::NotificationDetails& details) { |
rdevlin.cronin | a1c3f1a | 2017-05-18 17:45:46 | [diff] [blame] | 272 | switch (type) { |
| 273 | case extensions::NOTIFICATION_EXTENSION_REMOVED: { |
| 274 | // The error is invalidated if the extension has been loaded or removed. |
| 275 | // It's a shame we have to use the notification system (instead of the |
| 276 | // registry observer) for this, but the ExtensionUnloaded notification is |
| 277 | // not sent out if the extension is disabled (which it is here). |
| 278 | const std::string& extension_id = |
| 279 | content::Details<const Extension>(details).ptr()->id(); |
| 280 | if (base::ContainsKey(errors_, extension_id)) |
| 281 | RemoveExternalInstallError(extension_id); |
| 282 | break; |
| 283 | } |
| 284 | case chrome::NOTIFICATION_PROFILE_DESTROYED: |
| 285 | DCHECK_EQ(Profile::FromBrowserContext(browser_context_), |
| 286 | content::Source<const Profile>(source).ptr()); |
| 287 | // Delete all errors when the profile is shutting down, before associated |
| 288 | // services are deleted. |
| 289 | errors_.clear(); |
| 290 | break; |
| 291 | default: |
| 292 | NOTREACHED(); |
| 293 | } |
[email protected] | 2894a51 | 2014-06-26 19:03:56 | [diff] [blame] | 294 | } |
| 295 | |
| 296 | } // namespace extensions |