Chromium Code Reviews| 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 9d8b106d44cb87b59a8b7fc53d86b6431f3c0031..909a51a3fc9b5d903f3f73a65d93e34f1d4cc501 100644 |
| --- a/chrome/browser/ui/search_engines/keyword_editor_controller.cc |
| +++ b/chrome/browser/ui/search_engines/keyword_editor_controller.cc |
| @@ -61,9 +61,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 && |
|
Peter Kasting
2014/10/29 18:55:51
Nit: Don't remove parens around this, file style i
vasilii
2014/11/03 15:14:30
Done.
|
| + !(url == url_model_->GetDefaultSearchProvider() && |
|
Peter Kasting
2014/10/29 18:55:51
Nit: Don't factor the "!" out of this, leave it di
vasilii
2014/11/03 15:14:30
Done.
|
| + url_model_->is_default_search_managed()); |
| } |
| bool KeywordEditorController::CanMakeDefault(const TemplateURL* url) const { |
| @@ -71,7 +71,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 && |
|
Peter Kasting
2014/10/29 18:55:51
Nit: Extra space; parens around subexprs
vasilii
2014/11/03 15:14:30
Done.
|
| + url != url_model_->GetDefaultSearchProvider(); |
| } |
| void KeywordEditorController::RemoveTemplateURL(int index) { |