From b665bf2b7418b0820a677d11d50da12b5b800351 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Fri, 10 Sep 2010 22:33:58 +0000 Subject: Convert some importer NOTREACHED() cases to LOG(WARNING)s. We could conceivably hit these lines if the firefox profile is in a weird state. BUG=54718 TEST=none Review URL: http://codereview.chromium.org/3305019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59164 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/importer/firefox3_importer.cc | 1 + chrome/browser/importer/firefox_importer_utils.cc | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome') diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc index 800f691..110f2b6 100644 --- a/chrome/browser/importer/firefox3_importer.cc +++ b/chrome/browser/importer/firefox3_importer.cc @@ -188,6 +188,7 @@ void Firefox3Importer::ImportBookmarks() { post_keyword_ids.insert(s.column_int(0)); } else { NOTREACHED(); + return; } std::wstring firefox_folder = diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc index 0ec9109..ed5b7c9 100644 --- a/chrome/browser/importer/firefox_importer_utils.cc +++ b/chrome/browser/importer/firefox_importer_utils.cc @@ -243,8 +243,7 @@ bool ReadPrefFile(const FilePath& path, std::string* content) { file_util::ReadFileToString(path, content); if (content->empty()) { - NOTREACHED() << "Firefox preference file " << path.value() - << " is empty."; + LOG(WARNING) << "Firefox preference file " << path.value() << " is empty."; return false; } @@ -269,7 +268,7 @@ std::string ReadBrowserConfigProp(const FilePath& app_path, if (start == std::string::npos || stop == std::string::npos || (start == stop)) { - NOTREACHED() << "Firefox property " << pref_key << " could not be parsed."; + LOG(WARNING) << "Firefox property " << pref_key << " could not be parsed."; return ""; } @@ -314,7 +313,7 @@ int GetFirefoxDefaultSearchEngineIndex( } } if (default_se_index == -1) { - NOTREACHED() << + LOG(WARNING) << "Firefox default search engine not found in search engine list"; } -- cgit v1.1