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

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

Issue 460313002: No chrome dependencies in KeywordProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename setter Created 6 years, 4 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
Index: chrome/browser/autocomplete/keyword_extensions_delegate_impl.h
diff --git a/chrome/browser/autocomplete/keyword_extensions_delegate_impl.h b/chrome/browser/autocomplete/keyword_extensions_delegate_impl.h
index a0bf2c72793168e9f2375b05c12a97abf7630e8c..aa181fa05ef4a2025b59696aa772d34f87e1f251 100644
--- a/chrome/browser/autocomplete/keyword_extensions_delegate_impl.h
+++ b/chrome/browser/autocomplete/keyword_extensions_delegate_impl.h
@@ -23,17 +23,18 @@
#error "Should not be included when extensions are disabled"
#endif
+class Profile;
+
class KeywordExtensionsDelegateImpl : public KeywordExtensionsDelegate,
public content::NotificationObserver {
public:
- explicit KeywordExtensionsDelegateImpl(KeywordProvider* provider);
+ KeywordExtensionsDelegateImpl(Profile* profile, KeywordProvider* provider);
virtual ~KeywordExtensionsDelegateImpl();
private:
// KeywordExtensionsDelegate:
virtual void IncrementInputId() OVERRIDE;
- virtual bool IsEnabledExtension(Profile* profile,
- const std::string& extension_id) OVERRIDE;
+ virtual bool IsEnabledExtension(const std::string& extension_id) OVERRIDE;
virtual bool Start(const AutocompleteInput& input,
bool minimal_changes,
const TemplateURL* template_url,
@@ -47,7 +48,6 @@ class KeywordExtensionsDelegateImpl : public KeywordExtensionsDelegate,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- Profile* profile() { return provider_->profile_; }
ACMatches* matches() { return &provider_->matches_; }
void set_done(bool done) {
provider_->done_ = done;
@@ -73,6 +73,8 @@ class KeywordExtensionsDelegateImpl : public KeywordExtensionsDelegate,
// the URL bar while the autocomplete popup is open.
std::string current_keyword_extension_id_;
+ Profile* profile_;
+
// The owner of this class.
KeywordProvider* provider_;

Powered by Google App Engine
This is Rietveld 408576698