Lines Matching defs:extension

19 #include "extensions/common/extension.h"
37 // Prompt the user this many times before considering an extension acknowledged.
40 void LogExternalExtensionEvent(const Extension* extension,
45 if (ManifestURL::UpdatesFromGallery(extension)) {
76 void ExternalInstallManager::AddExternalInstallError(const Extension* extension,
82 (ManifestURL::UpdatesFromGallery(extension) && !is_new_profile)
87 browser_context_, extension->id(), alert_type, this));
109 const Extension* extension = NULL;
116 extension = iter->get();
121 if (!extension)
124 // Otherwise, warn the user about the suspicious extension.
125 if (extension_prefs_->IncrementAcknowledgePromptCount(extension->id()) >
127 // Stop prompting for this extension and record metrics.
128 extension_prefs_->AcknowledgeExternalExtension(extension->id());
129 LogExternalExtensionEvent(extension, EXTERNAL_EXTENSION_IGNORED);
131 // Check if there's another extension that needs prompting.
137 extension_prefs_->SetExternalInstallFirstRun(extension->id());
139 // |first_run| is true if the extension was installed during a first run
142 extension, extension_prefs_->IsExternalInstallFirstRun(extension->id()));
158 const Extension* extension) {
159 if (!IsUnacknowledgedExternalExtension(extension))
163 // re-enable the extension).
164 AcknowledgeExternalExtension(extension->id());
165 LogExternalExtensionEvent(extension, EXTERNAL_EXTENSION_REENABLED);
167 // If we had an error for this extension, remove it.
168 if (error_.get() && extension->id() == error_->extension_id())
174 const Extension* extension,
176 // Certain extension locations are specific enough that we can
177 // auto-acknowledge any extension that came from one of them.
178 if (Manifest::IsPolicyLocation(extension->location()) ||
179 extension->location() == Manifest::EXTERNAL_COMPONENT) {
180 AcknowledgeExternalExtension(extension->id());
184 if (!IsUnacknowledgedExternalExtension(extension))
187 LogExternalExtensionEvent(extension, EXTERNAL_EXTENSION_INSTALLED);
194 const Extension* extension,
196 if (IsUnacknowledgedExternalExtension(extension))
197 LogExternalExtensionEvent(extension, EXTERNAL_EXTENSION_UNINSTALLED);
201 const Extension* extension) const {
205 return (Manifest::IsExternalLocation(extension->location()) &&
206 !extension_prefs_->IsExternalExtensionAcknowledged(extension->id()) &&
207 !(extension_prefs_->GetDisableReasons(extension->id()) &
216 // The error is invalidated if the extension has been loaded or removed.
219 // not sent out if the extension is disabled (which it is here).