summaryrefslogtreecommitdiffstats
path: root/chrome/common/pref_service.cc
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 21:13:39 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 21:13:39 +0000
commit9e549b587a1ae933c30e8d1d187832573ff1aa1d (patch)
treec0178384170bd1a6f2d7074304ea3c74f41ceee1 /chrome/common/pref_service.cc
parent909c7efcdaa54cca0bd7fc95e191d9087e7c2f96 (diff)
downloadchromium_src-9e549b587a1ae933c30e8d1d187832573ff1aa1d.zip
chromium_src-9e549b587a1ae933c30e8d1d187832573ff1aa1d.tar.gz
chromium_src-9e549b587a1ae933c30e8d1d187832573ff1aa1d.tar.bz2
Linux: get us to the point where we crash at browser->window()->Show()
Review URL: http://codereview.chromium.org/20098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/pref_service.cc')
-rw-r--r--chrome/common/pref_service.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/common/pref_service.cc b/chrome/common/pref_service.cc
index e9daeba..1da274d 100644
--- a/chrome/common/pref_service.cc
+++ b/chrome/common/pref_service.cc
@@ -132,7 +132,16 @@ PrefService::~PrefService() {
}
bool PrefService::LoadPersistentPrefs(const std::wstring& file_path) {
+#if defined(OS_WIN)
DCHECK(!file_path.empty());
+#else
+ // On non-Windows platforms we haven't gotten round to this yet.
+ // TODO(port): remove this exception
+ if (file_path.empty()) {
+ NOTIMPLEMENTED();
+ return false;
+ }
+#endif
DCHECK(CalledOnValidThread());
JSONFileValueSerializer serializer(file_path);
@@ -335,7 +344,11 @@ std::wstring PrefService::GetString(const wchar_t* path) const {
const Preference* pref = FindPreference(path);
if (!pref) {
+#if defined(OS_WIN)
DCHECK(false) << "Trying to read an unregistered pref: " << path;
+#else
+ // TODO(port): remove this exception
+#endif
return result;
}
bool rv = pref->GetValue()->GetAsString(&result);