| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 if (sync_bundle && sync_bundle->HasExtensionId(extension_id)) { | 740 if (sync_bundle && sync_bundle->HasExtensionId(extension_id)) { |
| 741 sync_bundle->sync_processor->ProcessSyncChanges( | 741 sync_bundle->sync_processor->ProcessSyncChanges( |
| 742 FROM_HERE, SyncChangeList(1, sync_change)); | 742 FROM_HERE, SyncChangeList(1, sync_change)); |
| 743 sync_bundle->synced_extensions.erase(extension_id); | 743 sync_bundle->synced_extensions.erase(extension_id); |
| 744 } | 744 } |
| 745 | 745 |
| 746 // Track the uninstallation. | 746 // Track the uninstallation. |
| 747 UMA_HISTOGRAM_ENUMERATION("Extensions.ExtensionUninstalled", 1, 2); | 747 UMA_HISTOGRAM_ENUMERATION("Extensions.ExtensionUninstalled", 1, 2); |
| 748 | 748 |
| 749 static bool default_apps_trial_exists = | 749 static bool default_apps_trial_exists = |
| 750 base::FieldTrialList::TrialExists(kDefaultAppsTrial_Name); | 750 base::FieldTrialList::TrialExists(kDefaultAppsTrialName); |
| 751 if (default_apps_trial_exists) { | 751 if (default_apps_trial_exists) { |
| 752 UMA_HISTOGRAM_ENUMERATION( | 752 UMA_HISTOGRAM_ENUMERATION( |
| 753 base::FieldTrial::MakeName("Extensions.ExtensionUninstalled", | 753 base::FieldTrial::MakeName("Extensions.ExtensionUninstalled", |
| 754 kDefaultAppsTrial_Name), | 754 kDefaultAppsTrialName), |
| 755 1, 2); | 755 1, 2); |
| 756 } | 756 } |
| 757 | 757 |
| 758 // Uninstalling one extension might have solved the problems of others. | 758 // Uninstalling one extension might have solved the problems of others. |
| 759 // Therefore, we clear warnings of this type for all extensions. | 759 // Therefore, we clear warnings of this type for all extensions. |
| 760 std::set<ExtensionWarningSet::WarningType> warnings; | 760 std::set<ExtensionWarningSet::WarningType> warnings; |
| 761 extension_warnings_.GetWarningsAffectingExtension(extension_id, &warnings); | 761 extension_warnings_.GetWarningsAffectingExtension(extension_id, &warnings); |
| 762 extension_warnings_.ClearWarnings(warnings); | 762 extension_warnings_.ClearWarnings(warnings); |
| 763 | 763 |
| 764 return true; | 764 return true; |
| (...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2519 | 2519 |
| 2520 ExtensionService::NaClModuleInfoList::iterator | 2520 ExtensionService::NaClModuleInfoList::iterator |
| 2521 ExtensionService::FindNaClModule(const GURL& url) { | 2521 ExtensionService::FindNaClModule(const GURL& url) { |
| 2522 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2522 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2523 iter != nacl_module_list_.end(); ++iter) { | 2523 iter != nacl_module_list_.end(); ++iter) { |
| 2524 if (iter->url == url) | 2524 if (iter->url == url) |
| 2525 return iter; | 2525 return iter; |
| 2526 } | 2526 } |
| 2527 return nacl_module_list_.end(); | 2527 return nacl_module_list_.end(); |
| 2528 } | 2528 } |
| OLD | NEW |