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

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

Issue 11411330: Have ExtensionService notify ThemeService directly for themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on head Created 8 years 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/themes/theme_service.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 <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 // so we must ensure they have valid ordinals. 2100 // so we must ensure they have valid ordinals.
2101 if (extension->RequiresSortOrdinal()) { 2101 if (extension->RequiresSortOrdinal()) {
2102 extension_prefs_->extension_sorting()->EnsureValidOrdinals( 2102 extension_prefs_->extension_sorting()->EnsureValidOrdinals(
2103 extension->id(), syncer::StringOrdinal()); 2103 extension->id(), syncer::StringOrdinal());
2104 } 2104 }
2105 2105
2106 extensions_.Insert(extension); 2106 extensions_.Insert(extension);
2107 SyncExtensionChangeIfNeeded(*extension); 2107 SyncExtensionChangeIfNeeded(*extension);
2108 NotifyExtensionLoaded(extension); 2108 NotifyExtensionLoaded(extension);
2109 DoPostLoadTasks(extension); 2109 DoPostLoadTasks(extension);
2110
2111 #if defined(ENABLE_THEMES)
2112 if (extension->is_theme()) {
2113 // Now that the theme extension is visible from outside the
2114 // ExtensionService, notify the ThemeService about the
2115 // newly-installed theme.
2116 ThemeServiceFactory::GetForProfile(profile_)->SetTheme(extension);
2117 }
2118 #endif
2110 } 2119 }
2111 2120
2112 void ExtensionService::AddComponentExtension(const Extension* extension) { 2121 void ExtensionService::AddComponentExtension(const Extension* extension) {
2113 const std::string old_version_string( 2122 const std::string old_version_string(
2114 extension_prefs_->GetVersionString(extension->id())); 2123 extension_prefs_->GetVersionString(extension->id()));
2115 const Version old_version(old_version_string); 2124 const Version old_version(old_version_string);
2116 2125
2117 if (!old_version.IsValid() || !old_version.Equals(*extension->version())) { 2126 if (!old_version.IsValid() || !old_version.Equals(*extension->version())) {
2118 VLOG(1) << "Component extension " << extension->name() << " (" 2127 VLOG(1) << "Component extension " << extension->name() << " ("
2119 << extension->id() << ") installing/upgrading from '" 2128 << extension->id() << ") installing/upgrading from '"
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
3022 extension_id, kOnUpdateAvailableEvent); 3031 extension_id, kOnUpdateAvailableEvent);
3023 } else { 3032 } else {
3024 // Delay installation if the extension is not idle. 3033 // Delay installation if the extension is not idle.
3025 return !IsExtensionIdle(extension_id); 3034 return !IsExtensionIdle(extension_id);
3026 } 3035 }
3027 } 3036 }
3028 3037
3029 void ExtensionService::OnBlacklistUpdated() { 3038 void ExtensionService::OnBlacklistUpdated() {
3030 CheckManagementPolicy(); 3039 CheckManagementPolicy();
3031 } 3040 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698