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

Unified Diff: chrome/browser/search_engines/template_url_service.h

Issue 10033017: More misc. cleanups to minimize future refactoring diffs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/search_engines/template_url_service.h
===================================================================
--- chrome/browser/search_engines/template_url_service.h (revision 131375)
+++ chrome/browser/search_engines/template_url_service.h (working copy)
@@ -406,6 +406,8 @@
// Updates the information in |existing_turl| using the information from
// |new_values|, but the ID for |existing_turl| is retained.
// Notifying observers is the responsibility of the caller.
+ // NOTE: This should not be called with an extension keyword as there are no
+ // updates needed in that case.
void UpdateNoNotify(const TemplateURL* existing_turl,
const TemplateURL& new_values);
@@ -444,8 +446,11 @@
// Adds a new TemplateURL to this model. TemplateURLService will own the
// reference, and delete it when the TemplateURL is removed.
+ // If |newly_adding| is false, we assume that this TemplateURL was already
+ // part of the model in the past, and therefore we don't need to do things
+ // like assign it an ID or notify sync.
// Caller is responsible for notifying observers.
- void AddNoNotify(TemplateURL* template_url);
+ void AddNoNotify(TemplateURL* template_url, bool newly_adding);
// Removes the keyword from the model. This deletes the supplied TemplateURL.
// This fails if the supplied template_url is the default search provider.

Powered by Google App Engine
This is Rietveld 408576698