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

Issue 4342001: Refactoring the master_preferences functions.... (Closed)

Created:
10 years, 1 month ago by tommi (sloooow) - chröme
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., ben+cc_chromium.org
Visibility:
Public.

Description

Refactoring the master_preferences functions. * Now there's a class named MasterPreferences that owns the json dictionary and supports methods that previously were global. * There's now a global object for the current process' master preference object, which avoids parsing the preference file multiple times. * Refactored the tests to be more data driven TEST=Run the installer util unit tests. Set the filter to *MasterPref* if you only want to run the tests affected by this change. BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64945

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 10

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+414 lines, -488 lines) Patch
M chrome/browser/first_run/first_run.cc View 1 2 3 9 chunks +48 lines, -41 lines 0 comments Download
M chrome/installer/setup/install.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/installer/setup/install.cc View 4 chunks +16 lines, -18 lines 0 comments Download
M chrome/installer/setup/setup_main.cc View 1 2 6 chunks +17 lines, -17 lines 0 comments Download
M chrome/installer/util/install_util.h View 1 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/installer/util/install_util.cc View 1 3 chunks +12 lines, -18 lines 0 comments Download
M chrome/installer/util/master_preferences.h View 1 2 3 4 3 chunks +86 lines, -84 lines 0 comments Download
M chrome/installer/util/master_preferences.cc View 1 4 chunks +105 lines, -133 lines 0 comments Download
M chrome/installer/util/master_preferences_dummy.cc View 1 chunk +15 lines, -32 lines 0 comments Download
M chrome/installer/util/master_preferences_unittest.cc View 8 chunks +102 lines, -139 lines 0 comments Download
M chrome/installer/util/shell_util.cc View 2 chunks +4 lines, -5 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
tommi (sloooow) - chröme
hey robert - feel free to suggest additional reviewers.
10 years, 1 month ago (2010-11-02 21:33:48 UTC) #1
grt (UTC plus 2)
Drive-by. http://codereview.chromium.org/4342001/diff/1/7 File chrome/installer/util/install_util.h (right): http://codereview.chromium.org/4342001/diff/1/7#newcode125 chrome/installer/util/install_util.h:125: static installer_util::MasterPreferences& Return const ref? http://codereview.chromium.org/4342001/diff/1/8 File chrome/installer/util/master_preferences.cc ...
10 years, 1 month ago (2010-11-03 13:44:22 UTC) #2
tommi (sloooow) - chröme
Thanks for the review grt. All suggestions incorporated. http://codereview.chromium.org/4342001/diff/1/7 File chrome/installer/util/install_util.h (right): http://codereview.chromium.org/4342001/diff/1/7#newcode125 chrome/installer/util/install_util.h:125: static ...
10 years, 1 month ago (2010-11-03 15:57:32 UTC) #3
grt (UTC plus 2)
LGTM
10 years, 1 month ago (2010-11-03 16:09:39 UTC) #4
robertshield
Mostly nits. http://codereview.chromium.org/4342001/diff/25001/12002 File chrome/browser/first_run/first_run.cc (right): http://codereview.chromium.org/4342001/diff/25001/12002#newcode100 chrome/browser/first_run/first_run.cc:100: if (!prefs.preferences_read_from_file()) preferences_read_from_file -> read_from_file? http://codereview.chromium.org/4342001/diff/25001/12006 File ...
10 years, 1 month ago (2010-11-03 17:07:49 UTC) #5
tommi (sloooow) - chröme
all addressed I believe http://codereview.chromium.org/4342001/diff/25001/12002 File chrome/browser/first_run/first_run.cc (right): http://codereview.chromium.org/4342001/diff/25001/12002#newcode100 chrome/browser/first_run/first_run.cc:100: if (!prefs.preferences_read_from_file()) On 2010/11/03 17:07:50, ...
10 years, 1 month ago (2010-11-03 17:20:34 UTC) #6
robertshield
10 years, 1 month ago (2010-11-03 17:44:02 UTC) #7
LGTM

On 2010/11/03 17:07:49, robertshield wrote:
> Mostly nits.
> 
> http://codereview.chromium.org/4342001/diff/25001/12002
> File chrome/browser/first_run/first_run.cc (right):
> 
> http://codereview.chromium.org/4342001/diff/25001/12002#newcode100
> chrome/browser/first_run/first_run.cc:100: if
> (!prefs.preferences_read_from_file())
> preferences_read_from_file -> read_from_file?
> 
> http://codereview.chromium.org/4342001/diff/25001/12006
> File chrome/installer/util/install_util.cc (right):
> 
> http://codereview.chromium.org/4342001/diff/25001/12006#newcode36
> chrome/installer/util/install_util.cc:36: static MasterPreferences
> prefs(*CommandLine::ForCurrentProcess());
> Can we DCHECK that CommandLine::Init() has been called?
> 
> http://codereview.chromium.org/4342001/diff/25001/12009
> File chrome/installer/util/master_preferences.h (right):
> 
> http://codereview.chromium.org/4342001/diff/25001/12009#newcode104
> chrome/installer/util/master_preferences.h:104: // Note that the entries are
> usually urls but they don't have to.
> to. -> to be.
> 
> http://codereview.chromium.org/4342001/diff/25001/12009#newcode107
> chrome/installer/util/master_preferences.h:107: // preferences file does not
> contain such list the vector is empty.
> such list -> such a list
> 
> http://codereview.chromium.org/4342001/diff/25001/12009#newcode148
> chrome/installer/util/master_preferences.h:148: bool
> preferences_read_from_file() const {
> mentioned elsewhere, can we rename this to read_from_file()?

Powered by Google App Engine
This is Rietveld 408576698