diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 03:45:31 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-11 03:45:31 +0000 |
commit | 8b70d0ce73dd36bc0042ba7a6d8c4521c369b9fe (patch) | |
tree | d9886c2e4e978298cdf46e0382a283de2ac2ac15 /chrome/installer | |
parent | 9192fddf7965b8b3384805940dd79e49d0b8bedd (diff) | |
download | chromium_src-8b70d0ce73dd36bc0042ba7a6d8c4521c369b9fe.zip chromium_src-8b70d0ce73dd36bc0042ba7a6d8c4521c369b9fe.tar.gz chromium_src-8b70d0ce73dd36bc0042ba7a6d8c4521c369b9fe.tar.bz2 |
Preferences: remove log spam.
The common case is for this file to not be available; we don't need
to report it as an error each time.
I improved this in r59984, but it regressed in r64945.
Review URL: http://codereview.chromium.org/4740003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65770 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r-- | chrome/installer/util/master_preferences.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/installer/util/master_preferences.cc b/chrome/installer/util/master_preferences.cc index b2ae7ef..1602f6d 100644 --- a/chrome/installer/util/master_preferences.cc +++ b/chrome/installer/util/master_preferences.cc @@ -52,10 +52,9 @@ std::vector<GURL> GetNamedList(const char* name, DictionaryValue* ParseDistributionPreferences( const FilePath& master_prefs_path) { std::string json_data; - if (!file_util::ReadFileToString(master_prefs_path, &json_data)) { - LOG(WARNING) << "Failed to read master prefs file. "; + if (!file_util::ReadFileToString(master_prefs_path, &json_data)) return NULL; - } + JSONStringValueSerializer json(json_data); std::string error; scoped_ptr<Value> root(json.Deserialize(NULL, &error)); @@ -134,8 +133,7 @@ MasterPreferences::MasterPreferences(const CommandLine& cmd_line) MasterPreferences::MasterPreferences(const FilePath& prefs_path) : distribution_(NULL), preferences_read_from_file_(false) { master_dictionary_.reset(ParseDistributionPreferences(prefs_path)); - LOG_IF(ERROR, !master_dictionary_.get()) << "Failed to parse " - << prefs_path.value(); + if (!master_dictionary_.get()) { master_dictionary_.reset(new DictionaryValue()); } else { |