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

Issue 16982004: Move Firefox importer's INI parser to c/browser/common. (Closed)

Created:
7 years, 6 months ago by tommycli
Modified:
7 years, 6 months ago
CC:
vandebo (ex-Chrome), chromium-reviews, tfarina, browser-components-watch_chromium.org, brettw
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Move Firefox importer's INI parser to c/browser/common. Media Galleries API Picasa Import will require reading some INI files. Rather than re-invent the wheel and duplicate code, we are moving the INI parser used by Firefox import into chrome/browser/common. BUG=151701 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207111

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Added a unit test. #

Patch Set 4 : Add unit test missing file. #

Total comments: 6

Patch Set 5 : Move to base/, namespace base, and exported. #

Total comments: 38

Patch Set 6 : #

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Patch Set 9 : Add multiple calls to Parse unit test. #

Total comments: 2

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : Forbid multiple invocations. #

Patch Set 13 : #

Patch Set 14 : Fix build on compilers that don't support uniform initializers. #

Patch Set 15 : Change test case to POD #

Patch Set 16 : Remove extended initializer list for linux_chromeos build. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -47 lines) Patch
M base/base.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
A base/ini_parser.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +69 lines, -0 lines 0 comments Download
A base/ini_parser.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +66 lines, -0 lines 0 comments Download
A base/ini_parser_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +131 lines, -0 lines 0 comments Download
M chrome/browser/importer/firefox_importer_utils.cc View 1 2 3 4 3 chunks +6 lines, -47 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
tommycli
thestig: Need OWNER stamp. gab: Need review on chrome/browser/importer changes. erikwright: Need review on chrome/browser/common ...
7 years, 6 months ago (2013-06-13 19:55:59 UTC) #1
Lei Zhang
https://codereview.chromium.org/16982004/diff/1/chrome/browser/importer/firefox_importer_utils.cc File chrome/browser/importer/firefox_importer_utils.cc (left): https://codereview.chromium.org/16982004/diff/1/chrome/browser/importer/firefox_importer_utils.cc#oldcode133 chrome/browser/importer/firefox_importer_utils.cc:133: void ParseProfileINI(const base::FilePath& file, DictionaryValue* root) { Don't you ...
7 years, 6 months ago (2013-06-13 21:04:30 UTC) #2
erikwright (departed)
Could you add unit-test coverage for this code? I realize it's not new, but one ...
7 years, 6 months ago (2013-06-13 22:36:08 UTC) #3
tommycli
On 2013/06/13 22:36:08, erikwright wrote: > Could you add unit-test coverage for this code? I ...
7 years, 6 months ago (2013-06-13 23:01:56 UTC) #4
tommycli
https://codereview.chromium.org/16982004/diff/1/chrome/browser/importer/firefox_importer_utils.cc File chrome/browser/importer/firefox_importer_utils.cc (left): https://codereview.chromium.org/16982004/diff/1/chrome/browser/importer/firefox_importer_utils.cc#oldcode133 chrome/browser/importer/firefox_importer_utils.cc:133: void ParseProfileINI(const base::FilePath& file, DictionaryValue* root) { On 2013/06/13 ...
7 years, 6 months ago (2013-06-13 23:02:03 UTC) #5
Lei Zhang
This looks good sans the unit test. https://codereview.chromium.org/16982004/diff/8001/chrome/browser/common/ini_parser.h File chrome/browser/common/ini_parser.h (right): https://codereview.chromium.org/16982004/diff/8001/chrome/browser/common/ini_parser.h#newcode38 chrome/browser/common/ini_parser.h:38: DictionaryValue root_; ...
7 years, 6 months ago (2013-06-13 23:21:17 UTC) #6
erikwright (departed)
I checked into the story with this directory. It was part of an early vision ...
7 years, 6 months ago (2013-06-14 01:12:29 UTC) #7
Lei Zhang
On 2013/06/14 01:12:29, erikwright wrote: > I checked into the story with this directory. It ...
7 years, 6 months ago (2013-06-14 01:19:15 UTC) #8
Lei Zhang
+brettw ^^^
7 years, 6 months ago (2013-06-14 01:19:38 UTC) #9
tommycli
Hi guys, I added the unit test. I'm cool with it being in base/ - ...
7 years, 6 months ago (2013-06-14 16:03:16 UTC) #10
erikwright (departed)
On 2013/06/14 16:03:16, tommycli wrote: > Hi guys, I added the unit test. > > ...
7 years, 6 months ago (2013-06-14 17:09:01 UTC) #11
erikwright (departed)
LGTM minus the location. https://codereview.chromium.org/16982004/diff/19001/chrome/browser/common/ini_parser.cc File chrome/browser/common/ini_parser.cc (right): https://codereview.chromium.org/16982004/diff/19001/chrome/browser/common/ini_parser.cc#newcode19 chrome/browser/common/ini_parser.cc:19: std::string current_section; This code probably ...
7 years, 6 months ago (2013-06-14 19:26:46 UTC) #12
vandebo (ex-Chrome)
https://codereview.chromium.org/16982004/diff/19001/chrome/browser/common/ini_parser.h File chrome/browser/common/ini_parser.h (right): https://codereview.chromium.org/16982004/diff/19001/chrome/browser/common/ini_parser.h#newcode19 chrome/browser/common/ini_parser.h:19: // Pass by value because we will be sanitizing ...
7 years, 6 months ago (2013-06-17 15:00:48 UTC) #13
tommycli
Hi guys - I moved this to base/. Who would be my best bet as ...
7 years, 6 months ago (2013-06-17 18:01:55 UTC) #14
tommycli
mark: Need OWNER review on new inclusion into base/. Thanks!
7 years, 6 months ago (2013-06-17 18:06:31 UTC) #15
Mark Mentovai
Ugh, Picasa really uses this format? https://codereview.chromium.org/16982004/diff/29001/base/ini_parser.cc File base/ini_parser.cc (right): https://codereview.chromium.org/16982004/diff/29001/base/ini_parser.cc#newcode11 base/ini_parser.cc:11: INIParser::INIParser() {} Why ...
7 years, 6 months ago (2013-06-17 18:52:37 UTC) #16
tommycli
Thanks for the review mark. I've tried to address your comments. https://codereview.chromium.org/16982004/diff/29001/base/ini_parser.cc File base/ini_parser.cc (right): ...
7 years, 6 months ago (2013-06-17 19:49:23 UTC) #17
Mark Mentovai
LGTM in that this is mostly just a move of existing code into its own ...
7 years, 6 months ago (2013-06-17 19:59:48 UTC) #18
erikwright (departed)
A few more comments. Sorry, forgot to submit them. Feel free to ignore in light ...
7 years, 6 months ago (2013-06-17 20:30:47 UTC) #19
Mark Mentovai
Please incorporate Erik’s late feedback before checking in.
7 years, 6 months ago (2013-06-17 20:32:24 UTC) #20
tommycli
erik: One question below. https://codereview.chromium.org/16982004/diff/8001/chrome/browser/common/ini_parser.h File chrome/browser/common/ini_parser.h (right): https://codereview.chromium.org/16982004/diff/8001/chrome/browser/common/ini_parser.h#newcode38 chrome/browser/common/ini_parser.h:38: DictionaryValue root_; On 2013/06/13 23:21:17, ...
7 years, 6 months ago (2013-06-17 21:23:25 UTC) #21
Mark Mentovai
https://codereview.chromium.org/16982004/diff/46002/base/ini_parser.h File base/ini_parser.h (right): https://codereview.chromium.org/16982004/diff/46002/base/ini_parser.h#newcode36 base/ini_parser.h:36: // May be called multiple times. Sections cannot span ...
7 years, 6 months ago (2013-06-17 22:28:23 UTC) #22
gab
Back from vacation, seems this review is quite far along, lgtm for extracting this code ...
7 years, 6 months ago (2013-06-17 23:03:40 UTC) #23
tommycli
https://codereview.chromium.org/16982004/diff/46002/base/ini_parser.h File base/ini_parser.h (right): https://codereview.chromium.org/16982004/diff/46002/base/ini_parser.h#newcode36 base/ini_parser.h:36: // May be called multiple times. Sections cannot span ...
7 years, 6 months ago (2013-06-18 00:11:46 UTC) #24
erikwright (departed)
https://codereview.chromium.org/16982004/diff/29001/base/ini_parser.h File base/ini_parser.h (right): https://codereview.chromium.org/16982004/diff/29001/base/ini_parser.h#newcode22 base/ini_parser.h:22: void Parse(const std::string& content); On 2013/06/17 21:23:25, tommycli wrote: ...
7 years, 6 months ago (2013-06-18 00:56:13 UTC) #25
tommycli
https://codereview.chromium.org/16982004/diff/29001/base/ini_parser.h File base/ini_parser.h (right): https://codereview.chromium.org/16982004/diff/29001/base/ini_parser.h#newcode22 base/ini_parser.h:22: void Parse(const std::string& content); On 2013/06/18 00:56:14, erikwright wrote: ...
7 years, 6 months ago (2013-06-18 16:29:46 UTC) #26
Mark Mentovai
You could wind up with: typedef void(*HandleTripletFunctionType)(const std::string&, const std::string&, const std::string& void*); void ParseINIContent(const ...
7 years, 6 months ago (2013-06-18 16:42:16 UTC) #27
erikwright (departed)
On 2013/06/18 16:42:16, Mark Mentovai wrote: > You could wind up with: > > typedef ...
7 years, 6 months ago (2013-06-18 17:25:13 UTC) #28
tommycli
On 2013/06/18 17:25:13, erikwright wrote: > On 2013/06/18 16:42:16, Mark Mentovai wrote: > > You ...
7 years, 6 months ago (2013-06-18 17:33:56 UTC) #29
tommycli
On 2013/06/18 17:33:56, tommycli wrote: > On 2013/06/18 17:25:13, erikwright wrote: > > On 2013/06/18 ...
7 years, 6 months ago (2013-06-18 17:34:35 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/16982004/61001
7 years, 6 months ago (2013-06-18 17:38:05 UTC) #31
erikwright (departed)
On 2013/06/18 17:34:35, tommycli wrote: > On 2013/06/18 17:33:56, tommycli wrote: > > On 2013/06/18 ...
7 years, 6 months ago (2013-06-18 17:38:22 UTC) #32
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 6 months ago (2013-06-18 17:49:15 UTC) #33
Mark Mentovai
LGTM. Like I said, I wouldn’t really approve this as-is if it were a new ...
7 years, 6 months ago (2013-06-18 18:06:19 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/16982004/69003
7 years, 6 months ago (2013-06-18 18:23:08 UTC) #35
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-06-18 18:38:42 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/16982004/101002
7 years, 6 months ago (2013-06-18 19:53:31 UTC) #37
commit-bot: I haz the power
7 years, 6 months ago (2013-06-18 23:31:15 UTC) #38
Message was sent while issue was closed.
Change committed as 207111

Powered by Google App Engine
This is Rietveld 408576698