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

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

Issue 8704007: Protector adds the default prepopulated engine if it was removed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added histograms for missing/fallback DSP. Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 const TemplateURL* GetTemplateURLForHost(const std::string& host) const; 138 const TemplateURL* GetTemplateURLForHost(const std::string& host) const;
139 139
140 // Adds a new TemplateURL to this model. TemplateURLService will own the 140 // Adds a new TemplateURL to this model. TemplateURLService will own the
141 // reference, and delete it when the TemplateURL is removed. 141 // reference, and delete it when the TemplateURL is removed.
142 void Add(TemplateURL* template_url); 142 void Add(TemplateURL* template_url);
143 143
144 // Removes the keyword from the model. This deletes the supplied TemplateURL. 144 // Removes the keyword from the model. This deletes the supplied TemplateURL.
145 // This fails if the supplied template_url is the default search provider. 145 // This fails if the supplied template_url is the default search provider.
146 void Remove(const TemplateURL* template_url); 146 void Remove(const TemplateURL* template_url);
147 147
148 // Updates the information in |existing_turl| using the information from
149 // |new_values|, but the ID for |existing_turl| is retained.
150 void Update(const TemplateURL* existing_turl, const TemplateURL& new_values);
151
148 // Removes all auto-generated keywords that were created in the specified 152 // Removes all auto-generated keywords that were created in the specified
149 // range. 153 // range.
150 void RemoveAutoGeneratedBetween(base::Time created_after, 154 void RemoveAutoGeneratedBetween(base::Time created_after,
151 base::Time created_before); 155 base::Time created_before);
152 156
153 // Removes all auto-generated keywords that were created on or after the 157 // Removes all auto-generated keywords that were created on or after the
154 // date passed in. 158 // date passed in.
155 void RemoveAutoGeneratedSince(base::Time created_after); 159 void RemoveAutoGeneratedSince(base::Time created_after);
156 160
157 // If the given extension has an omnibox keyword, adds a TemplateURL for that 161 // If the given extension has an omnibox keyword, adds a TemplateURL for that
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 // from Sync. This is to facilitate the fact that changes to the value of 593 // from Sync. This is to facilitate the fact that changes to the value of
590 // prefs::kSyncedDefaultSearchProviderGUID do not always come before the 594 // prefs::kSyncedDefaultSearchProviderGUID do not always come before the
591 // TemplateURL entry it refers to, and to handle the case when we want to use 595 // TemplateURL entry it refers to, and to handle the case when we want to use
592 // the Synced default when the default search provider becomes unmanaged. 596 // the Synced default when the default search provider becomes unmanaged.
593 bool pending_synced_default_search_; 597 bool pending_synced_default_search_;
594 598
595 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); 599 DISALLOW_COPY_AND_ASSIGN(TemplateURLService);
596 }; 600 };
597 601
598 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ 602 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698