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

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

Issue 10913275: Ben's fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "chrome/browser/prefs/pref_service.h" 76 #include "chrome/browser/prefs/pref_service.h"
77 #include "chrome/browser/profiles/profile.h" 77 #include "chrome/browser/profiles/profile.h"
78 #include "chrome/browser/profiles/profile_manager.h" 78 #include "chrome/browser/profiles/profile_manager.h"
79 #include "chrome/browser/search_engines/template_url_service.h" 79 #include "chrome/browser/search_engines/template_url_service.h"
80 #include "chrome/browser/search_engines/template_url_service_factory.h" 80 #include "chrome/browser/search_engines/template_url_service_factory.h"
81 #include "chrome/browser/themes/theme_service.h" 81 #include "chrome/browser/themes/theme_service.h"
82 #include "chrome/browser/themes/theme_service_factory.h" 82 #include "chrome/browser/themes/theme_service_factory.h"
83 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 83 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
84 #include "chrome/browser/ui/webui/favicon_source.h" 84 #include "chrome/browser/ui/webui/favicon_source.h"
85 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h" 85 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h"
86 #include "chrome/browser/ui/webui/theme_source.h"
86 #include "chrome/common/child_process_logging.h" 87 #include "chrome/common/child_process_logging.h"
87 #include "chrome/common/chrome_notification_types.h" 88 #include "chrome/common/chrome_notification_types.h"
88 #include "chrome/common/chrome_paths.h" 89 #include "chrome/common/chrome_paths.h"
89 #include "chrome/common/chrome_switches.h" 90 #include "chrome/common/chrome_switches.h"
90 #include "chrome/common/chrome_version_info.h" 91 #include "chrome/common/chrome_version_info.h"
91 #include "chrome/common/extensions/extension.h" 92 #include "chrome/common/extensions/extension.h"
92 #include "chrome/common/extensions/extension_error_utils.h" 93 #include "chrome/common/extensions/extension_error_utils.h"
93 #include "chrome/common/extensions/extension_file_util.h" 94 #include "chrome/common/extensions/extension_file_util.h"
94 #include "chrome/common/extensions/extension_manifest_constants.h" 95 #include "chrome/common/extensions/extension_manifest_constants.h"
95 #include "chrome/common/extensions/extension_messages.h" 96 #include "chrome/common/extensions/extension_messages.h"
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 } 1013 }
1013 1014
1014 // If the extension has permission to load chrome://favicon/ resources we need 1015 // If the extension has permission to load chrome://favicon/ resources we need
1015 // to make sure that the FaviconSource is registered with the 1016 // to make sure that the FaviconSource is registered with the
1016 // ChromeURLDataManager. 1017 // ChromeURLDataManager.
1017 if (extension->HasHostPermission(GURL(chrome::kChromeUIFaviconURL))) { 1018 if (extension->HasHostPermission(GURL(chrome::kChromeUIFaviconURL))) {
1018 FaviconSource* favicon_source = new FaviconSource(profile_, 1019 FaviconSource* favicon_source = new FaviconSource(profile_,
1019 FaviconSource::FAVICON); 1020 FaviconSource::FAVICON);
1020 ChromeURLDataManager::AddDataSource(profile_, favicon_source); 1021 ChromeURLDataManager::AddDataSource(profile_, favicon_source);
1021 } 1022 }
1023
1024 // Same for chrome://theme/ resources.
1025 if (extension->HasHostPermission(GURL(chrome::kChromeUIThemeURL))) {
1026 ThemeSource* theme_source = new ThemeSource(profile_);
1027 ChromeURLDataManager::AddDataSource(profile_, theme_source);
1028 }
1029
1022 // Same for chrome://thumb/ resources. 1030 // Same for chrome://thumb/ resources.
1023 if (extension->HasHostPermission(GURL(chrome::kChromeUIThumbnailURL))) { 1031 if (extension->HasHostPermission(GURL(chrome::kChromeUIThumbnailURL))) {
1024 ThumbnailSource* thumbnail_source = new ThumbnailSource(profile_); 1032 ThumbnailSource* thumbnail_source = new ThumbnailSource(profile_);
1025 ChromeURLDataManagerFactory::GetForProfile(profile_)-> 1033 ChromeURLDataManagerFactory::GetForProfile(profile_)->
1026 AddDataSource(thumbnail_source); 1034 AddDataSource(thumbnail_source);
1027 } 1035 }
1028 1036
1029 // TODO(mpcomplete): This ends up affecting all profiles. See crbug.com/80757. 1037 // TODO(mpcomplete): This ends up affecting all profiles. See crbug.com/80757.
1030 bool plugins_changed = false; 1038 bool plugins_changed = false;
1031 for (size_t i = 0; i < extension->plugins().size(); ++i) { 1039 for (size_t i = 0; i < extension->plugins().size(); ++i) {
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 extensions::ExtensionHost* extension_host) { 2632 extensions::ExtensionHost* extension_host) {
2625 if (!extension_host) 2633 if (!extension_host)
2626 return; 2634 return;
2627 2635
2628 #if !defined(OS_ANDROID) 2636 #if !defined(OS_ANDROID)
2629 extensions::LaunchPlatformApp(extension_host->profile(), 2637 extensions::LaunchPlatformApp(extension_host->profile(),
2630 extension_host->extension(), 2638 extension_host->extension(),
2631 NULL, FilePath()); 2639 NULL, FilePath());
2632 #endif 2640 #endif
2633 } 2641 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager_util.cc ('k') | chrome/browser/icon_loader_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698