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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10238014: Fix search engine automation hooks to work with multiple profiles. (Closed) Base URL: svn://svn.chromium.org/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/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index a7ecae85de2080d06b2bb6046459f1fc7f3025f0..ca97c5a56e9c8d7d76f1e7e88266844df67e1fe1 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -3261,7 +3261,7 @@ void TestingAutomationProvider::LoadSearchEngineInfo(
return;
}
url_model->AddObserver(new AutomationProviderSearchEngineObserver(
- this, reply_message));
+ this, browser->profile(), reply_message));
url_model->Load();
}
@@ -3330,12 +3330,12 @@ void TestingAutomationProvider::AddOrEditSearchEngine(
return;
}
url_model->AddObserver(new AutomationProviderSearchEngineObserver(
- this, reply_message));
+ this, browser->profile(), reply_message));
controller->ModifyTemplateURL(template_url, new_title, new_keyword,
new_ref_url);
} else {
url_model->AddObserver(new AutomationProviderSearchEngineObserver(
- this, reply_message));
+ this, browser->profile(), reply_message));
controller->AddTemplateURL(new_title, new_keyword, new_ref_url);
}
}
@@ -3365,11 +3365,11 @@ void TestingAutomationProvider::PerformActionOnSearchEngine(
}
if (action == "delete") {
url_model->AddObserver(new AutomationProviderSearchEngineObserver(
- this, reply_message));
+ this, browser->profile(), reply_message));
url_model->Remove(template_url);
} else if (action == "default") {
url_model->AddObserver(new AutomationProviderSearchEngineObserver(
- this, reply_message));
+ this, browser->profile(), reply_message));
url_model->SetDefaultSearchProvider(template_url);
} else {
AutomationJSONReply(this, reply_message).SendError(

Powered by Google App Engine
This is Rietveld 408576698