Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: chrome/browser/extensions/extension_service.cc

Issue 24365004: Add EXTERNAL_POLICY to list of possible extension locations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after
2486 extension, "Extensions.Permissions_Install"); 2486 extension, "Extensions.Permissions_Install");
2487 } else { 2487 } else {
2488 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateType", 2488 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateType",
2489 extension->GetType(), 100); 2489 extension->GetType(), 100);
2490 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateSource", 2490 UMA_HISTOGRAM_ENUMERATION("Extensions.UpdateSource",
2491 extension->location(), Manifest::NUM_LOCATIONS); 2491 extension->location(), Manifest::NUM_LOCATIONS);
2492 } 2492 }
2493 2493
2494 // Certain extension locations are specific enough that we can 2494 // Certain extension locations are specific enough that we can
2495 // auto-acknowledge any extension that came from one of them. 2495 // auto-acknowledge any extension that came from one of them.
2496 if (extension->location() == Manifest::EXTERNAL_POLICY_DOWNLOAD) 2496 if (Manifest::IsPolicyLocation(extension->location()))
2497 AcknowledgeExternalExtension(extension->id()); 2497 AcknowledgeExternalExtension(extension->id());
2498 const Extension::State initial_state = 2498 const Extension::State initial_state =
2499 initial_enable ? Extension::ENABLED : Extension::DISABLED; 2499 initial_enable ? Extension::ENABLED : Extension::DISABLED;
2500 if (ShouldDelayExtensionUpdate(id, wait_for_idle)) { 2500 if (ShouldDelayExtensionUpdate(id, wait_for_idle)) {
2501 extension_prefs_->SetDelayedInstallInfo( 2501 extension_prefs_->SetDelayedInstallInfo(
2502 extension, 2502 extension,
2503 initial_state, 2503 initial_state,
2504 blacklist_state, 2504 blacklist_state,
2505 extensions::ExtensionPrefs::DELAY_REASON_WAIT_FOR_IDLE, 2505 extensions::ExtensionPrefs::DELAY_REASON_WAIT_FOR_IDLE,
2506 page_ordinal); 2506 page_ordinal);
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
3161 } 3161 }
3162 3162
3163 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { 3163 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) {
3164 update_observers_.AddObserver(observer); 3164 update_observers_.AddObserver(observer);
3165 } 3165 }
3166 3166
3167 void ExtensionService::RemoveUpdateObserver( 3167 void ExtensionService::RemoveUpdateObserver(
3168 extensions::UpdateObserver* observer) { 3168 extensions::UpdateObserver* observer) {
3169 update_observers_.RemoveObserver(observer); 3169 update_observers_.RemoveObserver(observer);
3170 } 3170 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698