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

Unified Diff: chrome/browser/importer/firefox_importer_utils.cc

Issue 16982004: Move Firefox importer's INI parser to c/browser/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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
« no previous file with comments | « chrome/browser/common/ini_parser.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/firefox_importer_utils.cc
diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc
index 70c11f17c8c5b016d4f906c7ccbb16a696cfe04d..26cb936c9c9cc46779ee9d4de0338d0224510f82 100644
--- a/chrome/browser/importer/firefox_importer_utils.cc
+++ b/chrome/browser/importer/firefox_importer_utils.cc
@@ -16,6 +16,7 @@
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "chrome/browser/common/ini_parser.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_parser.h"
#include "chrome/browser/search_engines/template_url_prepopulate_data.h"
@@ -50,9 +51,12 @@ class FirefoxURLParameterFilter : public TemplateURLParser::ParameterFilter {
} // namespace
base::FilePath GetFirefoxProfilePath() {
- DictionaryValue root;
base::FilePath ini_file = GetProfilesINI();
- ParseProfileINI(ini_file, &root);
+ std::string content;
+ file_util::ReadFileToString(ini_file, &content);
+ DictionaryValueINIParser ini_parser;
+ ini_parser.Parse(content);
+ const DictionaryValue& root = ini_parser.root();
base::FilePath source_path;
for (int i = 0; ; ++i) {
« no previous file with comments | « chrome/browser/common/ini_parser.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698