diff options
author | jeanluc@google.com <jeanluc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 23:49:31 +0000 |
---|---|---|
committer | jeanluc@google.com <jeanluc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-05 23:49:31 +0000 |
commit | b6fd1fa73e3905cb343a78b84a88aef3cb53ab40 (patch) | |
tree | 61b04a98b99aaca3138b868402b2005b59594119 /chrome/browser/gtk | |
parent | 2858bbf9099f835325422009c5945e9b26a97d42 (diff) | |
download | chromium_src-b6fd1fa73e3905cb343a78b84a88aef3cb53ab40.zip chromium_src-b6fd1fa73e3905cb343a78b84a88aef3cb53ab40.tar.gz chromium_src-b6fd1fa73e3905cb343a78b84a88aef3cb53ab40.tar.bz2 |
Allow the default search provider to be specified via group policy. Also allow group policy to specify that there is no default. Respond to at run time to changes of policy. Handle the default search becoming managed or un-managed, or having the default change while staying managed. Optimize notification of observers so that we don't repeatedly notify observers for what is one change.
Change in Preferences.xib: Add defaultSearchEngineEnabled keypath to enable/disable the default search engine combobox in the Basic preference pane.
BUG=49306
TEST=ConfigurationPolicyPrefStoreDefaultSearchTest.*, TemplateURLModelTest.*, KeywordEditorControllerTest*, SearchProviderInstall*, ConfigDirPolicyProviderValueTestInstance*, ConfigurationPolicyProvider*
Review URL: http://codereview.chromium.org/3402023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r-- | chrome/browser/gtk/keyword_editor_view.cc | 2 | ||||
-rw-r--r-- | chrome/browser/gtk/options/general_page_gtk.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/gtk/keyword_editor_view.cc b/chrome/browser/gtk/keyword_editor_view.cc index 5937bfb..8967f4e 100644 --- a/chrome/browser/gtk/keyword_editor_view.cc +++ b/chrome/browser/gtk/keyword_editor_view.cc @@ -213,8 +213,8 @@ void KeywordEditorView::EnableControls() { bool can_remove = false; int model_row = GetSelectedModelRow(); if (model_row != -1) { - can_edit = true; const TemplateURL* selected_url = controller_->GetTemplateURL(model_row); + can_edit = controller_->CanEdit(selected_url); can_make_default = controller_->CanMakeDefault(selected_url); can_remove = controller_->CanRemove(selected_url); } diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc index 734ee8c..1cc1ef9 100644 --- a/chrome/browser/gtk/options/general_page_gtk.cc +++ b/chrome/browser/gtk/options/general_page_gtk.cc @@ -621,7 +621,8 @@ void GeneralPageGtk::OnTemplateURLModelChanged() { GTK_COMBO_BOX(default_search_engine_combobox_), &iter); } } - EnableDefaultSearchEngineComboBox(populated); + EnableDefaultSearchEngineComboBox(populated && + !template_url_model_->is_default_search_managed()); default_search_initializing_ = false; } |