OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <iterator> | 8 #include <iterator> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2468 extension, "Extensions.Permissions_Install"); | 2468 extension, "Extensions.Permissions_Install"); |
2469 } else { | 2469 } else { |
2470 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateType", | 2470 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateType", |
2471 extension->GetType(), 100); | 2471 extension->GetType(), 100); |
2472 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateSource", | 2472 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateSource", |
2473 extension->location(), Manifest::NUM_LOCATIONS); | 2473 extension->location(), Manifest::NUM_LOCATIONS); |
2474 } | 2474 } |
2475 | 2475 |
2476 // Certain extension locations are specific enough that we can | 2476 // Certain extension locations are specific enough that we can |
2477 // auto-acknowledge any extension that came from one of them. | 2477 // auto-acknowledge any extension that came from one of them. |
2478 if (extension->location() == Manifest::EXTERNAL_POLICY_DOWNLOAD) | 2478 if (extension->location() == Manifest::EXTERNAL_POLICY || |
| 2479 extension->location() == Manifest::EXTERNAL_POLICY_DOWNLOAD) { |
2479 AcknowledgeExternalExtension(extension->id()); | 2480 AcknowledgeExternalExtension(extension->id()); |
| 2481 } |
2480 const Extension::State initial_state = | 2482 const Extension::State initial_state = |
2481 initial_enable ? Extension::ENABLED : Extension::DISABLED; | 2483 initial_enable ? Extension::ENABLED : Extension::DISABLED; |
2482 if (ShouldDelayExtensionUpdate(id, wait_for_idle)) { | 2484 if (ShouldDelayExtensionUpdate(id, wait_for_idle)) { |
2483 extension_prefs_->SetDelayedInstallInfo( | 2485 extension_prefs_->SetDelayedInstallInfo( |
2484 extension, | 2486 extension, |
2485 initial_state, | 2487 initial_state, |
2486 blacklist_state, | 2488 blacklist_state, |
2487 extensions::ExtensionPrefs::DELAY_REASON_WAIT_FOR_IDLE, | 2489 extensions::ExtensionPrefs::DELAY_REASON_WAIT_FOR_IDLE, |
2488 page_ordinal); | 2490 page_ordinal); |
2489 | 2491 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3144 } | 3146 } |
3145 | 3147 |
3146 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { | 3148 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { |
3147 update_observers_.AddObserver(observer); | 3149 update_observers_.AddObserver(observer); |
3148 } | 3150 } |
3149 | 3151 |
3150 void ExtensionService::RemoveUpdateObserver( | 3152 void ExtensionService::RemoveUpdateObserver( |
3151 extensions::UpdateObserver* observer) { | 3153 extensions::UpdateObserver* observer) { |
3152 update_observers_.RemoveObserver(observer); | 3154 update_observers_.RemoveObserver(observer); |
3153 } | 3155 } |
OLD | NEW |