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

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 11446034: SupportsUserData and manifest handlers for Extension; use them for the Omnibox API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + manifestdata 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 58af9f032b9709c1c4a9d1a41e7e6fe8c384a184..245ac411f1468465a1644259d16500760e24f8d6 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -75,8 +75,6 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/search_engines/template_url_service.h"
-#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
@@ -158,17 +156,6 @@ enum ExternalExtensionEvent {
EXTERNAL_EXTENSION_BUCKET_BOUNDARY,
};
-#if defined(OS_LINUX)
-static const int kOmniboxIconPaddingLeft = 2;
-static const int kOmniboxIconPaddingRight = 2;
-#elif defined(OS_MACOSX)
-static const int kOmniboxIconPaddingLeft = 0;
-static const int kOmniboxIconPaddingRight = 2;
-#else
-static const int kOmniboxIconPaddingLeft = 0;
-static const int kOmniboxIconPaddingRight = 0;
-#endif
-
// Prompt the user this many times before considering an extension acknowledged.
static const int kMaxExtensionAcknowledgePromptCount = 3;
@@ -437,12 +424,6 @@ ExtensionService::ExtensionService(Profile* profile,
}
}
- // Use monochrome icons for Omnibox icons.
- omnibox_popup_icon_manager_.set_monochrome(true);
- omnibox_icon_manager_.set_monochrome(true);
- omnibox_icon_manager_.set_padding(gfx::Insets(0, kOmniboxIconPaddingLeft,
- 0, kOmniboxIconPaddingRight));
-
// Set this as the ExtensionService for extension sorting to ensure it
// cause syncs if required.
extension_prefs_->extension_sorting()->SetExtensionService(this);
@@ -868,11 +849,6 @@ bool ExtensionService::UninstallExtension(
RecordPermissionMessagesHistogram(
extension, "Extensions.Permissions_Uninstall");
- TemplateURLService* url_service =
- TemplateURLServiceFactory::GetForProfile(profile_);
- if (url_service)
- url_service->UnregisterExtensionKeyword(extension);
-
// Unload before doing more cleanup to ensure that nothing is hanging on to
// any of these resources.
UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_UNINSTALL);
@@ -1128,18 +1104,6 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) {
ExtensionWebUI::RegisterChromeURLOverrides(
profile_, extension->GetChromeURLOverrides());
- TemplateURLService* url_service =
- TemplateURLServiceFactory::GetForProfile(profile_);
- if (url_service)
- url_service->RegisterExtensionKeyword(extension);
-
- // Load the icon for omnibox-enabled extensions so it will be ready to display
- // in the URL bar.
- if (!extension->omnibox_keyword().empty()) {
- omnibox_popup_icon_manager_.LoadIcon(extension);
- omnibox_icon_manager_.LoadIcon(extension);
- }
-
// If the extension has permission to load chrome://favicon/ resources we need
// to make sure that the FaviconSource is registered with the
// ChromeURLDataManager.
@@ -2652,16 +2616,6 @@ bool ExtensionService::ShouldBlockUrlInBrowserTab(GURL* url) {
return false;
}
-gfx::Image ExtensionService::GetOmniboxIcon(
- const std::string& extension_id) {
- return gfx::Image(omnibox_icon_manager_.GetIcon(extension_id));
-}
-
-gfx::Image ExtensionService::GetOmniboxPopupIcon(
- const std::string& extension_id) {
- return gfx::Image(omnibox_popup_icon_manager_.GetIcon(extension_id));
-}
-
bool ExtensionService::OnExternalExtensionFileFound(
const std::string& id,
const Version* version,
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | chrome/browser/profiles/profile_dependency_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698