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

Unified Diff: chrome/common/pref_service.cc

Issue 20098: Linux: get us to the point where we crash at browser->window()->Show() (Closed)
Patch Set: Including tony's changes Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/common/resource_bundle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/pref_service.cc
diff --git a/chrome/common/pref_service.cc b/chrome/common/pref_service.cc
index e9daebacc23c244dae6a01b6945d75a2637598ac..1da274d49ef60703b1a8dd57d0d2dc3b5eff25b2 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);
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/common/resource_bundle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698