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

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

Issue 12390007: Merge 184833 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_sorting.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 // Show the extension disabled error if a permissions increase was the 2095 // Show the extension disabled error if a permissions increase was the
2096 // only reason it was disabled. 2096 // only reason it was disabled.
2097 if (extension_prefs_->GetDisableReasons(extension->id()) == 2097 if (extension_prefs_->GetDisableReasons(extension->id()) ==
2098 Extension::DISABLE_PERMISSIONS_INCREASE) { 2098 Extension::DISABLE_PERMISSIONS_INCREASE) {
2099 extensions::AddExtensionDisabledError(this, extension); 2099 extensions::AddExtensionDisabledError(this, extension);
2100 } 2100 }
2101 } else { 2101 } else {
2102 // All apps that are displayed in the launcher are ordered by their ordinals 2102 // All apps that are displayed in the launcher are ordered by their ordinals
2103 // so we must ensure they have valid ordinals. 2103 // so we must ensure they have valid ordinals.
2104 if (extension->RequiresSortOrdinal()) { 2104 if (extension->RequiresSortOrdinal()) {
2105 if (!extension->ShouldDisplayInNewTabPage()) {
2106 extension_prefs_->extension_sorting()->MarkExtensionAsHidden(
2107 extension->id());
2108 }
2105 extension_prefs_->extension_sorting()->EnsureValidOrdinals( 2109 extension_prefs_->extension_sorting()->EnsureValidOrdinals(
2106 extension->id(), syncer::StringOrdinal()); 2110 extension->id(), syncer::StringOrdinal());
2107 } 2111 }
2108 2112
2109 extensions_.Insert(extension); 2113 extensions_.Insert(extension);
2110 SyncExtensionChangeIfNeeded(*extension); 2114 SyncExtensionChangeIfNeeded(*extension);
2111 NotifyExtensionLoaded(extension); 2115 NotifyExtensionLoaded(extension);
2112 DoPostLoadTasks(extension); 2116 DoPostLoadTasks(extension);
2113 } 2117 }
2114 } 2118 }
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
3103 scoped_refptr<const Extension> extension = GetInstalledExtension(*it); 3107 scoped_refptr<const Extension> extension = GetInstalledExtension(*it);
3104 DCHECK(extension); 3108 DCHECK(extension);
3105 if (!extension) 3109 if (!extension)
3106 continue; 3110 continue;
3107 blacklisted_extensions_.Insert(extension); 3111 blacklisted_extensions_.Insert(extension);
3108 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); 3112 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST);
3109 } 3113 }
3110 3114
3111 IdentifyAlertableExtensions(); 3115 IdentifyAlertableExtensions();
3112 } 3116 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_sorting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698