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

Unified Diff: chrome/browser/ui/search_engines/keyword_editor_controller.cc

Issue 684493002: Don't persist and sync omnibox extension keywords. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 1 month 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/ui/search_engines/keyword_editor_controller.cc
diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller.cc b/chrome/browser/ui/search_engines/keyword_editor_controller.cc
index 116a22306d0e1f8e1fb90ccb7304f5f28e7e8532..0087427c9c49ae75b5646ddcdb46c9ef8f1bcbc5 100644
--- a/chrome/browser/ui/search_engines/keyword_editor_controller.cc
+++ b/chrome/browser/ui/search_engines/keyword_editor_controller.cc
@@ -60,9 +60,9 @@ void KeywordEditorController::ModifyTemplateURL(TemplateURL* template_url,
}
bool KeywordEditorController::CanEdit(const TemplateURL* url) const {
- return (url->GetType() != TemplateURL::NORMAL_CONTROLLED_BY_EXTENSION) &&
- (!url_model_->is_default_search_managed() ||
- (url != url_model_->GetDefaultSearchProvider()));
+ return (url->GetType() == TemplateURL::NORMAL) &&
+ (url != url_model_->GetDefaultSearchProvider() ||
+ !url_model_->is_default_search_managed());
}
bool KeywordEditorController::CanMakeDefault(const TemplateURL* url) const {
@@ -70,7 +70,8 @@ bool KeywordEditorController::CanMakeDefault(const TemplateURL* url) const {
}
bool KeywordEditorController::CanRemove(const TemplateURL* url) const {
- return url != url_model_->GetDefaultSearchProvider();
+ return (url->GetType() == TemplateURL::NORMAL) &&
+ (url != url_model_->GetDefaultSearchProvider());
}
void KeywordEditorController::RemoveTemplateURL(int index) {

Powered by Google App Engine
This is Rietveld 408576698