OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/crx_installer.h" | 5 #include "chrome/browser/extensions/crx_installer.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 206 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
207 DCHECK(error); | 207 DCHECK(error); |
208 | 208 |
209 const char* kHistogramName = "Extensions.WebStoreInstallDecision"; | 209 const char* kHistogramName = "Extensions.WebStoreInstallDecision"; |
210 if (is_gallery_install()) { | 210 if (is_gallery_install()) { |
211 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallAllowedBecauseStore, | 211 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallAllowedBecauseStore, |
212 NumWebStoreInstallDecision); | 212 NumWebStoreInstallDecision); |
213 } else if (extension->is_theme()) { | 213 } else if (extension->is_theme()) { |
214 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallAllowedBecauseTheme, | 214 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallAllowedBecauseTheme, |
215 NumWebStoreInstallDecision); | 215 NumWebStoreInstallDecision); |
216 } else if (extensions::switch_utils::IsOffStoreInstallEnabled()) { | 216 } else if (extensions::switch_utils::IsEasyOffStoreInstallEnabled()) { |
217 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallAllowedBecauseAllAllowed, | 217 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallAllowedBecauseAllAllowed, |
218 NumWebStoreInstallDecision); | 218 NumWebStoreInstallDecision); |
219 } else if (allow_off_store_install_) { | 219 } else if (allow_off_store_install_) { |
220 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallAllowedBecauseThisAllowed, | 220 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallAllowedBecauseThisAllowed, |
221 NumWebStoreInstallDecision); | 221 NumWebStoreInstallDecision); |
222 } else { | 222 } else { |
223 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallDisallowedBecauseOffStore, | 223 UMA_HISTOGRAM_ENUMERATION(kHistogramName, InstallDisallowedBecauseOffStore, |
224 NumWebStoreInstallDecision); | 224 NumWebStoreInstallDecision); |
225 *error = l10n_util::GetStringUTF16( | 225 *error = l10n_util::GetStringUTF16( |
226 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE); | 226 IDS_EXTENSION_INSTALL_DISALLOWED_ON_SITE); |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 // Some users (such as the download shelf) need to know when a | 589 // Some users (such as the download shelf) need to know when a |
590 // CRXInstaller is done. Listening for the EXTENSION_* events | 590 // CRXInstaller is done. Listening for the EXTENSION_* events |
591 // is problematic because they don't know anything about the | 591 // is problematic because they don't know anything about the |
592 // extension before it is unpacked, so they cannot filter based | 592 // extension before it is unpacked, so they cannot filter based |
593 // on the extension. | 593 // on the extension. |
594 content::NotificationService::current()->Notify( | 594 content::NotificationService::current()->Notify( |
595 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 595 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
596 content::Source<CrxInstaller>(this), | 596 content::Source<CrxInstaller>(this), |
597 content::Details<const Extension>(extension)); | 597 content::Details<const Extension>(extension)); |
598 } | 598 } |
OLD | NEW |