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

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

Issue 10969044: cros: Implement default app ordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 8 years, 3 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) 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 <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 1964
1965 if (extension_prefs_->GetDisableReasons(extension->id()) & 1965 if (extension_prefs_->GetDisableReasons(extension->id()) &
1966 Extension::DISABLE_PERMISSIONS_INCREASE) { 1966 Extension::DISABLE_PERMISSIONS_INCREASE) {
1967 extensions::AddExtensionDisabledError(this, extension); 1967 extensions::AddExtensionDisabledError(this, extension);
1968 } 1968 }
1969 return; 1969 return;
1970 } 1970 }
1971 1971
1972 // All apps that are displayed in the launcher are ordered by their ordinals 1972 // All apps that are displayed in the launcher are ordered by their ordinals
1973 // so we must ensure they have valid ordinals. 1973 // so we must ensure they have valid ordinals.
1974 if (extension->ShouldDisplayInLauncher()) 1974 if (extension->ShouldDisplayInLauncher()) {
1975 extension_prefs_->extension_sorting()->EnsureValidOrdinals(extension->id()); 1975 extension_prefs_->extension_sorting()->EnsureValidOrdinals(
1976 extension->id(), syncer::StringOrdinal());
1977 }
1976 1978
1977 extensions_.Insert(scoped_extension); 1979 extensions_.Insert(scoped_extension);
1978 SyncExtensionChangeIfNeeded(*extension); 1980 SyncExtensionChangeIfNeeded(*extension);
1979 NotifyExtensionLoaded(extension); 1981 NotifyExtensionLoaded(extension);
1980 QueueRestoreAppWindow(extension); 1982 QueueRestoreAppWindow(extension);
1981 } 1983 }
1982 1984
1983 void ExtensionService::InitializePermissions(const Extension* extension) { 1985 void ExtensionService::InitializePermissions(const Extension* extension) {
1984 // If the extension has used the optional permissions API, it will have a 1986 // If the extension has used the optional permissions API, it will have a
1985 // custom set of active permissions defined in the extension prefs. Here, 1987 // custom set of active permissions defined in the extension prefs. Here,
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
2664 extension_host->extension(), 2666 extension_host->extension(),
2665 NULL, FilePath()); 2667 NULL, FilePath());
2666 #endif 2668 #endif
2667 } 2669 }
2668 2670
2669 void ExtensionService::InspectExtensionHost( 2671 void ExtensionService::InspectExtensionHost(
2670 extensions::ExtensionHost* host) { 2672 extensions::ExtensionHost* host) {
2671 if (host) 2673 if (host)
2672 DevToolsWindow::OpenDevToolsWindow(host->render_view_host()); 2674 DevToolsWindow::OpenDevToolsWindow(host->render_view_host());
2673 } 2675 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/extension_sorting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698