diff options
Diffstat (limited to 'chrome/browser/protector')
3 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/protector/base_setting_change.h b/chrome/browser/protector/base_setting_change.h index 14af703..d378af2 100644 --- a/chrome/browser/protector/base_setting_change.h +++ b/chrome/browser/protector/base_setting_change.h @@ -137,7 +137,7 @@ extern const size_t kHomepageChangeNamePriority; // |backup| will be owned by the returned |BaseSettingChange| instance. |actual| // is not owned and is safe to destroy after Protector::ShowChange has been // called for the returned instance. -BaseSettingChange* CreateDefaultSearchProviderChange(const TemplateURL* actual, +BaseSettingChange* CreateDefaultSearchProviderChange(TemplateURL* actual, TemplateURL* backup); // Allocates and initializes BaseSettingChange implementation for session diff --git a/chrome/browser/protector/default_search_provider_change.cc b/chrome/browser/protector/default_search_provider_change.cc index dbd0027..a632f3f 100644 --- a/chrome/browser/protector/default_search_provider_change.cc +++ b/chrome/browser/protector/default_search_provider_change.cc @@ -82,7 +82,7 @@ class DefaultSearchProviderChange : public BaseSettingChange, public TemplateURLServiceObserver, public content::NotificationObserver { public: - DefaultSearchProviderChange(const TemplateURL* new_search_provider, + DefaultSearchProviderChange(TemplateURL* new_search_provider, TemplateURL* backup_search_provider); // BaseSettingChange overrides: @@ -145,7 +145,7 @@ class DefaultSearchProviderChange : public BaseSettingChange, // The default search at the moment the change was detected. Will be used to // restore the new default search back if Apply is called. Will be set to // |NULL| if removed from the TemplateURLService. - const TemplateURL* new_search_provider_; + TemplateURL* new_search_provider_; // Default search provider set by Init for the period until user makes a // choice and either Apply or Discard is performed. Never is |NULL| during // that period since the change will dismiss itself if this provider gets @@ -160,7 +160,7 @@ class DefaultSearchProviderChange : public BaseSettingChange, }; DefaultSearchProviderChange::DefaultSearchProviderChange( - const TemplateURL* new_search_provider, + TemplateURL* new_search_provider, TemplateURL* backup_search_provider) : new_histogram_id_(GetSearchProviderHistogramID(new_search_provider)), is_fallback_(false), @@ -387,7 +387,7 @@ const TemplateURL* DefaultSearchProviderChange::SetDefaultSearchProvider( scoped_ptr<TemplateURL>* search_provider) { TemplateURLService* url_service = GetTemplateURLService(); TemplateURLService::TemplateURLVector urls = url_service->GetTemplateURLs(); - const TemplateURL* new_default_provider = NULL; + TemplateURL* new_default_provider = NULL; // Check if this provider already exists and add it otherwise. TemplateURLService::TemplateURLVector::const_iterator i = @@ -432,7 +432,7 @@ TemplateURLService* DefaultSearchProviderChange::GetTemplateURLService() { return url_service; } -BaseSettingChange* CreateDefaultSearchProviderChange(const TemplateURL* actual, +BaseSettingChange* CreateDefaultSearchProviderChange(TemplateURL* actual, TemplateURL* backup) { return new DefaultSearchProviderChange(actual, backup); } diff --git a/chrome/browser/protector/default_search_provider_change_browsertest.cc b/chrome/browser/protector/default_search_provider_change_browsertest.cc index f95ac0b..0709478 100644 --- a/chrome/browser/protector/default_search_provider_change_browsertest.cc +++ b/chrome/browser/protector/default_search_provider_change_browsertest.cc @@ -83,7 +83,7 @@ class DefaultSearchProviderChangeTest : public InProcessBrowserTest { return new TemplateURL(browser()->profile(), data); } - const TemplateURL* FindTemplateURL(const std::string& search_url) { + TemplateURL* FindTemplateURL(const std::string& search_url) { TemplateURLService::TemplateURLVector urls = turl_service_->GetTemplateURLs(); for (TemplateURLService::TemplateURLVector::const_iterator @@ -377,8 +377,7 @@ IN_PROC_BROWSER_TEST_F(DefaultSearchProviderChangeTest, AddAndSetDefault(current_url); - const TemplateURL* prepopulated_default = - FindTemplateURL(prepopulated_url_->url()); + TemplateURL* prepopulated_default = FindTemplateURL(prepopulated_url_->url()); // Prepopulated default search must exist, remove it. ASSERT_TRUE(prepopulated_default); turl_service_->Remove(prepopulated_default); @@ -567,7 +566,7 @@ IN_PROC_BROWSER_TEST_F(DefaultSearchProviderChangeTest, // same as the current search provider. int prepopulated_histogram_id = protector::GetSearchProviderHistogramID(prepopulated_url_.get()); - const TemplateURL* current_url = turl_service_->GetDefaultSearchProvider(); + TemplateURL* current_url = turl_service_->GetDefaultSearchProvider(); // Verify that current search provider is same as the prepopulated default. ASSERT_TRUE(current_url); |
