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

Unified Diff: chrome/browser/autocomplete/keyword_provider.cc

Issue 11365181: Remove GetExtensionService from Profile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: replace missing extension_system include Created 8 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_json.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/keyword_provider.cc
diff --git a/chrome/browser/autocomplete/keyword_provider.cc b/chrome/browser/autocomplete/keyword_provider.cc
index 10884948b5c6614285e77e1b6294d3ed0e56ed1f..c37da20e228f36040e821a071aecc4df86b70668 100644
--- a/chrome/browser/autocomplete/keyword_provider.cc
+++ b/chrome/browser/autocomplete/keyword_provider.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/autocomplete/autocomplete_provider_listener.h"
#include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_service.h"
@@ -175,11 +176,13 @@ string16 KeywordProvider::GetKeywordForText(
// Don't provide a keyword for inactive/disabled extension keywords.
if (template_url->IsExtensionKeyword()) {
- const extensions::Extension* extension = profile_->GetExtensionService()->
+ ExtensionService* extension_service =
+ extensions::ExtensionSystem::Get(profile_)->extension_service();
+ const extensions::Extension* extension = extension_service->
GetExtensionById(template_url->GetExtensionId(), false);
if (!extension ||
(profile_->IsOffTheRecord() &&
- !profile_->GetExtensionService()->IsIncognitoEnabled(extension->id())))
+ !extension_service->IsIncognitoEnabled(extension->id())))
return string16();
}
@@ -251,7 +254,8 @@ void KeywordProvider::Start(const AutocompleteInput& input,
// Prune any extension keywords that are disallowed in incognito mode (if
// we're incognito), or disabled.
if (profile_ && template_url->IsExtensionKeyword()) {
- ExtensionService* service = profile_->GetExtensionService();
+ ExtensionService* service = extensions::ExtensionSystem::Get(profile_)->
+ extension_service();
const extensions::Extension* extension = service->GetExtensionById(
template_url->GetExtensionId(), false);
bool enabled =
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698