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

Unified Diff: chrome/browser/extensions/api/search_engines_private/search_engines_private_event_router.h

Issue 1688333002: Deleting chrome.searchEnginesPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manage_search_engines_ui1
Patch Set: Update histograms.xml Created 4 years, 10 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/extensions/api/search_engines_private/search_engines_private_event_router.h
diff --git a/chrome/browser/extensions/api/search_engines_private/search_engines_private_event_router.h b/chrome/browser/extensions/api/search_engines_private/search_engines_private_event_router.h
deleted file mode 100644
index 088c97ffeabd8fddb5753ec2bb36fa58841089b6..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/search_engines_private/search_engines_private_event_router.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_EXTENSIONS_API_SEARCH_ENGINES_PRIVATE_SEARCH_ENGINES_PRIVATE_EVENT_ROUTER_H_
-#define CHROME_BROWSER_EXTENSIONS_API_SEARCH_ENGINES_PRIVATE_SEARCH_ENGINES_PRIVATE_EVENT_ROUTER_H_
-
-#include "base/macros.h"
-#include "components/keyed_service/core/keyed_service.h"
-#include "components/search_engines/template_url_service.h"
-#include "components/search_engines/template_url_service_observer.h"
-#include "extensions/browser/event_router.h"
-
-namespace content {
-class BrowserContext;
-}
-
-namespace extensions {
-
-// This is an event router that will observe changes to the available and
-// selected search engines via the TemplateURLService, and notify listeners to
-// events on the searchEnginesPrivate API of changes.
-class SearchEnginesPrivateEventRouter : public KeyedService,
- public EventRouter::Observer,
- public TemplateURLServiceObserver {
- public:
- static SearchEnginesPrivateEventRouter* Create(
- content::BrowserContext* browser_context);
- ~SearchEnginesPrivateEventRouter() override;
-
- // TemplateURLServiceObserver implementation.
- void OnTemplateURLServiceChanged() override;
-
- protected:
- explicit SearchEnginesPrivateEventRouter(content::BrowserContext* context);
-
- // KeyedService overrides:
- void Shutdown() override;
-
- // EventRouter::Observer overrides:
- void OnListenerAdded(const EventListenerInfo& details) override;
- void OnListenerRemoved(const EventListenerInfo& details) override;
-
- TemplateURLService* template_url_service_;
-
- private:
- // Decide if we should listen for search engines changes or not. If there are
- // any JavaScript listeners registered for the onDefaultSearchEnginesChanged
- // event, then we want to register for change notifications.
- // Otherwise, we want to unregister and not be listening for changes.
- void StartOrStopListeningForSearchEnginesChanges();
-
- content::BrowserContext* context_;
- bool listening_;
-
- DISALLOW_COPY_AND_ASSIGN(SearchEnginesPrivateEventRouter);
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_API_SEARCH_ENGINES_PRIVATE_SEARCH_ENGINES_PRIVATE_EVENT_ROUTER_H_

Powered by Google App Engine
This is Rietveld 408576698