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

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

Issue 296053007: Don't report origin changes during loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge master. 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
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 void ChangeToLoadedState(); 489 void ChangeToLoadedState();
490 490
491 // Callback that is called when the Google URL is updated. 491 // Callback that is called when the Google URL is updated.
492 void OnGoogleURLUpdated(GURL old_url, GURL new_url); 492 void OnGoogleURLUpdated(GURL old_url, GURL new_url);
493 493
494 // Called by DefaultSearchManager when the effective default search engine has 494 // Called by DefaultSearchManager when the effective default search engine has
495 // changed. 495 // changed.
496 void OnDefaultSearchChange(const TemplateURLData* new_dse_data, 496 void OnDefaultSearchChange(const TemplateURLData* new_dse_data,
497 DefaultSearchManager::Source source); 497 DefaultSearchManager::Source source);
498 498
499 // Applies a DSE change. May be called at startup or after transitioning to 499 // Applies a DSE change and reports metrics if appropriate.
500 // the loaded state.
501 void ApplyDefaultSearchChange(const TemplateURLData* new_dse_data, 500 void ApplyDefaultSearchChange(const TemplateURLData* new_dse_data,
502 DefaultSearchManager::Source source); 501 DefaultSearchManager::Source source);
503 502
503
504 // Applies a DSE change. May be called at startup or after transitioning to
505 // the loaded state. Returns true if a change actually occurred.
506 bool ApplyDefaultSearchChangeNoMetrics(const TemplateURLData* new_dse_data,
507 DefaultSearchManager::Source source);
508
504 // Returns true if there is no TemplateURL that has a search url with the 509 // Returns true if there is no TemplateURL that has a search url with the
505 // specified host, or the only TemplateURLs matching the specified host can 510 // specified host, or the only TemplateURLs matching the specified host can
506 // be replaced. 511 // be replaced.
507 bool CanReplaceKeywordForHost(const std::string& host, 512 bool CanReplaceKeywordForHost(const std::string& host,
508 TemplateURL** to_replace); 513 TemplateURL** to_replace);
509 514
510 // Returns true if the TemplateURL is replaceable. This doesn't look at the 515 // Returns true if the TemplateURL is replaceable. This doesn't look at the
511 // uniqueness of the keyword or host and is intended to be called after those 516 // uniqueness of the keyword or host and is intended to be called after those
512 // checks have been done. This returns true if the TemplateURL doesn't appear 517 // checks have been done. This returns true if the TemplateURL doesn't appear
513 // in the default list and is marked as safe_for_autoreplace. 518 // in the default list and is marked as safe_for_autoreplace.
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 784
780 scoped_ptr<GoogleURLTracker::Subscription> google_url_updated_subscription_; 785 scoped_ptr<GoogleURLTracker::Subscription> google_url_updated_subscription_;
781 786
782 // Used to disable the prepopulated search engines in tests. 787 // Used to disable the prepopulated search engines in tests.
783 static bool g_fallback_search_engines_disabled; 788 static bool g_fallback_search_engines_disabled;
784 789
785 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); 790 DISALLOW_COPY_AND_ASSIGN(TemplateURLService);
786 }; 791 };
787 792
788 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 793 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698