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

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

Issue 545683003: Add a test for KeywordExtensionsDelegateImpl::IsEnabledExtension(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix409705
Patch Set: rebase to head where the fix for bug 409705 has gone in, address comments Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/keyword_extensions_delegate_impl.cc
diff --git a/chrome/browser/autocomplete/keyword_extensions_delegate_impl.cc b/chrome/browser/autocomplete/keyword_extensions_delegate_impl.cc
index bc647ea01eda6f542bf68420b0849d0a54c63adb..3af9ed9e105a71ce04c1f1efc8d039fb66884e5e 100644
--- a/chrome/browser/autocomplete/keyword_extensions_delegate_impl.cc
+++ b/chrome/browser/autocomplete/keyword_extensions_delegate_impl.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
-#include "extensions/browser/extension_system.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/browser/notification_types.h"
namespace omnibox_api = extensions::api::omnibox;
@@ -51,13 +51,12 @@ void KeywordExtensionsDelegateImpl::IncrementInputId() {
bool KeywordExtensionsDelegateImpl::IsEnabledExtension(
const std::string& extension_id) {
- ExtensionService* extension_service =
- extensions::ExtensionSystem::Get(profile_)->extension_service();
const extensions::Extension* extension =
- extension_service->GetExtensionById(extension_id, false);
+ extensions::ExtensionRegistry::Get(
Yoyo Zhou 2014/09/05 19:50:54 right, I should have noticed this.
+ profile_)->enabled_extensions().GetByID(extension_id);
return extension &&
(!profile_->IsOffTheRecord() ||
- !extensions::util::IsIncognitoEnabled(extension_id, profile_));
+ extensions::util::IsIncognitoEnabled(extension_id, profile_));
}
bool KeywordExtensionsDelegateImpl::Start(
« no previous file with comments | « no previous file | chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698