Index: chrome/utility/importer/firefox_importer.cc |
diff --git a/chrome/utility/importer/firefox_importer.cc b/chrome/utility/importer/firefox_importer.cc |
index ab7d2966ec605cc90cc5aa594bd556413dc1731a..3762c8b0f91377367a54ee62e8ba7ecaa9a3c926 100644 |
--- a/chrome/utility/importer/firefox_importer.cc |
+++ b/chrome/utility/importer/firefox_importer.cc |
@@ -383,6 +383,9 @@ void FirefoxImporter::ImportHomepage() { |
void FirefoxImporter::GetSearchEnginesXMLData( |
std::vector<std::string>* search_engine_data) { |
+ // TODO(mpawlowski): This may no longer work, search engines are stored in |
+ // search.json since Firefox 3.5, not in search.sqlite. XML definitions are |
+ // still necessary. http://crbug.com/329175 |
base::FilePath file = source_path_.AppendASCII("search.sqlite"); |
if (!base::PathExists(file)) |
return; |
@@ -401,7 +404,11 @@ void FirefoxImporter::GetSearchEnginesXMLData( |
if (!s.is_valid()) |
return; |
- base::FilePath app_path = app_path_.AppendASCII("searchplugins"); |
+ // Since Firefox 21, searchplugins are in 'browser' subdirectory: |
+ base::FilePath app_path = app_path_.AppendASCII("browser/searchplugins"); |
jeremy
2013/12/17 11:48:09
I'm uncomfortable with the static initialization u
jeremy
2013/12/17 11:48:09
Consider splitting into a new searchplugins_path a
mpawlowski
2013/12/17 12:31:25
We seem to be using it all over the place in vario
|
+ if (!base::PathExists(app_path)) |
+ // This might be an older Firefox, try old location: |
+ app_path = app_path_.AppendASCII("searchplugins"); |
base::FilePath profile_path = source_path_.AppendASCII("searchplugins"); |
// Firefox doesn't store a search engine in its sqlite database unless the |