diff options
author | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 00:22:05 +0000 |
---|---|---|
committer | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 00:22:05 +0000 |
commit | 9e80090ab887066a41e470cb2bf4e3fb379f6ed2 (patch) | |
tree | e054c54efc2622586048805694df259888270817 | |
parent | 15fe6eb197eb03cda4e99969a689c333cea02e2f (diff) | |
download | chromium_src-9e80090ab887066a41e470cb2bf4e3fb379f6ed2.zip chromium_src-9e80090ab887066a41e470cb2bf4e3fb379f6ed2.tar.gz chromium_src-9e80090ab887066a41e470cb2bf4e3fb379f6ed2.tar.bz2 |
Eliminate Unnecessary IMUI Missing Cache Error Spam
If there is no InMemoryURLIndex cache file, which is the case for new profiles and for Chrome upgrades, an error is output to the console about the missing file. This is not awfully helpful. Other, more meaningful errors are generated later in the process of restoring a faulty cache file so I've eliminated this particular one completely.
BUG=109750
TEST=Watch unit_tests logs and verify that no "Failed to read InMemoryURLIndex cache from ..." error message are present for passing tests.
Review URL: http://codereview.chromium.org/9147036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117132 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/history/url_index_private_data.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/history/url_index_private_data.cc b/chrome/browser/history/url_index_private_data.cc index b8a9fca..17e409d 100644 --- a/chrome/browser/history/url_index_private_data.cc +++ b/chrome/browser/history/url_index_private_data.cc @@ -983,11 +983,10 @@ bool URLIndexPrivateData::RestoreFromFile(const FilePath& file_path) { base::ThreadRestrictions::ScopedAllowIO allow_io; base::TimeTicks beginning_time = base::TimeTicks::Now(); std::string data; - if (!file_util::ReadFileToString(file_path, &data)) { - LOG(WARNING) << "Failed to read InMemoryURLIndex cache from " - << file_path.value(); + // If there is no cache file then simply give up. This will cause us to + // attempt to rebuild from the history database. + if (!file_util::ReadFileToString(file_path, &data)) return false; - } InMemoryURLIndexCacheItem index_cache; if (!index_cache.ParseFromArray(data.c_str(), data.size())) { |