OLD | NEW |
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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 // Same for chrome://theme/ resources. | 1080 // Same for chrome://theme/ resources. |
1081 if (extension->HasHostPermission(GURL(chrome::kChromeUIThemeURL))) { | 1081 if (extension->HasHostPermission(GURL(chrome::kChromeUIThemeURL))) { |
1082 ThemeSource* theme_source = new ThemeSource(profile_); | 1082 ThemeSource* theme_source = new ThemeSource(profile_); |
1083 ChromeURLDataManager::AddDataSource(profile_, theme_source); | 1083 ChromeURLDataManager::AddDataSource(profile_, theme_source); |
1084 } | 1084 } |
1085 #endif | 1085 #endif |
1086 | 1086 |
1087 // Same for chrome://thumb/ resources. | 1087 // Same for chrome://thumb/ resources. |
1088 if (extension->HasHostPermission(GURL(chrome::kChromeUIThumbnailURL))) { | 1088 if (extension->HasHostPermission(GURL(chrome::kChromeUIThumbnailURL))) { |
1089 ThumbnailSource* thumbnail_source = new ThumbnailSource(profile_); | 1089 ThumbnailSource* thumbnail_source = new ThumbnailSource(profile_); |
1090 ChromeURLDataManagerFactory::GetForProfile(profile_)-> | 1090 ChromeURLDataManager::AddDataSource(profile_, thumbnail_source); |
1091 AddDataSource(thumbnail_source); | |
1092 } | 1091 } |
1093 | 1092 |
1094 #if defined(ENABLE_PLUGINS) | 1093 #if defined(ENABLE_PLUGINS) |
1095 // TODO(mpcomplete): This ends up affecting all profiles. See crbug.com/80757. | 1094 // TODO(mpcomplete): This ends up affecting all profiles. See crbug.com/80757. |
1096 bool plugins_changed = false; | 1095 bool plugins_changed = false; |
1097 for (size_t i = 0; i < extension->plugins().size(); ++i) { | 1096 for (size_t i = 0; i < extension->plugins().size(); ++i) { |
1098 const Extension::PluginInfo& plugin = extension->plugins()[i]; | 1097 const Extension::PluginInfo& plugin = extension->plugins()[i]; |
1099 PluginService::GetInstance()->RefreshPlugins(); | 1098 PluginService::GetInstance()->RefreshPlugins(); |
1100 PluginService::GetInstance()->AddExtraPluginPath(plugin.path); | 1099 PluginService::GetInstance()->AddExtraPluginPath(plugin.path); |
1101 plugins_changed = true; | 1100 plugins_changed = true; |
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3123 scoped_refptr<const Extension> extension = GetInstalledExtension(*it); | 3122 scoped_refptr<const Extension> extension = GetInstalledExtension(*it); |
3124 DCHECK(extension); | 3123 DCHECK(extension); |
3125 if (!extension) | 3124 if (!extension) |
3126 continue; | 3125 continue; |
3127 blacklisted_extensions_.Insert(extension); | 3126 blacklisted_extensions_.Insert(extension); |
3128 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); | 3127 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); |
3129 } | 3128 } |
3130 | 3129 |
3131 IdentifyAlertableExtensions(); | 3130 IdentifyAlertableExtensions(); |
3132 } | 3131 } |
OLD | NEW |