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

Side by Side Diff: chrome/browser/search_engines/template_url_service.h

Issue 287103002: Introduce ability to register callback with GoogleURLTracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // Also sets the out param to indicate whether the keyword belongs to an 321 // Also sets the out param to indicate whether the keyword belongs to an
322 // Omnibox extension. 322 // Omnibox extension.
323 base::string16 GetKeywordShortName(const base::string16& keyword, 323 base::string16 GetKeywordShortName(const base::string16& keyword,
324 bool* is_omnibox_api_extension_keyword); 324 bool* is_omnibox_api_extension_keyword);
325 325
326 // content::NotificationObserver implementation. 326 // content::NotificationObserver implementation.
327 virtual void Observe(int type, 327 virtual void Observe(int type,
328 const content::NotificationSource& source, 328 const content::NotificationSource& source,
329 const content::NotificationDetails& details) OVERRIDE; 329 const content::NotificationDetails& details) OVERRIDE;
330 330
331 // Callback that is called when the Google URL is updated.
332 void OnGoogleURLUpdated(GURL old_url, GURL new_url);
333
331 // KeyedService implementation. 334 // KeyedService implementation.
332 virtual void Shutdown() OVERRIDE; 335 virtual void Shutdown() OVERRIDE;
333 336
334 // syncer::SyncableService implementation. 337 // syncer::SyncableService implementation.
335 338
336 // Returns all syncable TemplateURLs from this model as SyncData. This should 339 // Returns all syncable TemplateURLs from this model as SyncData. This should
337 // include every search engine and no Extension keywords. 340 // include every search engine and no Extension keywords.
338 virtual syncer::SyncDataList GetAllSyncData( 341 virtual syncer::SyncDataList GetAllSyncData(
339 syncer::ModelType type) const OVERRIDE; 342 syncer::ModelType type) const OVERRIDE;
340 // Process new search engine changes from Sync, merging them into our local 343 // Process new search engine changes from Sync, merging them into our local
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 // We set this value to increasingly specific values when we know what is the 768 // We set this value to increasingly specific values when we know what is the
766 // cause/origin of a default search change. 769 // cause/origin of a default search change.
767 DefaultSearchChangeOrigin dsp_change_origin_; 770 DefaultSearchChangeOrigin dsp_change_origin_;
768 771
769 // Stores a list of callbacks to be run after TemplateURLService has loaded. 772 // Stores a list of callbacks to be run after TemplateURLService has loaded.
770 base::CallbackList<void(void)> on_loaded_callbacks_; 773 base::CallbackList<void(void)> on_loaded_callbacks_;
771 774
772 // Helper class to manage the default search engine. 775 // Helper class to manage the default search engine.
773 DefaultSearchManager default_search_manager_; 776 DefaultSearchManager default_search_manager_;
774 777
778 scoped_ptr<base::CallbackList<void(GURL, GURL)>::Subscription>
779 google_url_updated_subscription_;
780
775 // Used to disable the prepopulated search engines in tests. 781 // Used to disable the prepopulated search engines in tests.
776 static bool g_fallback_search_engines_disabled; 782 static bool g_fallback_search_engines_disabled;
777 783
778 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); 784 DISALLOW_COPY_AND_ASSIGN(TemplateURLService);
779 }; 785 };
780 786
781 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 787 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698