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

Unified Diff: athena/main/url_search_provider.h

Issue 514583002: Use SearchProvider for Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO 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
« no previous file with comments | « no previous file | athena/main/url_search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/main/url_search_provider.h
diff --git a/athena/main/url_search_provider.h b/athena/main/url_search_provider.h
index 632d01a997d80a7986fdea4695f3df843b36b56e..86d6be3268cc0d1853ce9160059d742c4b26dc33 100644
--- a/athena/main/url_search_provider.h
+++ b/athena/main/url_search_provider.h
@@ -5,11 +5,13 @@
#ifndef ATHENA_MAIN_URL_SEARCH_PROVIDER_H_
#define ATHENA_MAIN_URL_SEARCH_PROVIDER_H_
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "components/omnibox/autocomplete_input.h"
-#include "net/url_request/url_fetcher_delegate.h"
+#include "components/omnibox/autocomplete_provider_listener.h"
#include "ui/app_list/search_provider.h"
+class AutocompleteProvider;
class TemplateURLService;
namespace content {
@@ -20,7 +22,7 @@ namespace athena {
// A sample search provider.
class UrlSearchProvider : public app_list::SearchProvider,
- public net::URLFetcherDelegate {
+ public AutocompleteProviderListener {
public:
UrlSearchProvider(content::BrowserContext* browser_context);
virtual ~UrlSearchProvider();
@@ -29,20 +31,17 @@ class UrlSearchProvider : public app_list::SearchProvider,
virtual void Start(const base::string16& query) OVERRIDE;
virtual void Stop() OVERRIDE;
- // Overridden from net::URLFetcherDelegate.
- virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
+ // Overridden from AutocompleteProviderListener
+ virtual void OnProviderUpdate(bool updated_matches) OVERRIDE;
private:
- void StartFetchingSuggestions();
-
content::BrowserContext* browser_context_;
// TODO(mukai): This should be provided through BrowserContextKeyedService.
scoped_ptr<TemplateURLService> template_url_service_;
AutocompleteInput input_;
- scoped_ptr<net::URLFetcher> suggestion_fetcher_;
- bool should_fetch_suggestions_again_;
+ scoped_refptr<AutocompleteProvider> provider_;
DISALLOW_COPY_AND_ASSIGN(UrlSearchProvider);
};
« no previous file with comments | « no previous file | athena/main/url_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698