Minor tweaks to get chrome-ui://extensions working on the Mac.
Review URL: http://codereview.chromium.org/42627
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12586 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 2c3451b..6b73b65b 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -184,8 +184,15 @@
frontend_ = frontend;
alert_on_error_ = false;
+#if defined(OS_WIN)
+ // On POSIX, AbsolutePath() calls realpath() which returns NULL if
+ // it does not exist. Instead we absolute-ify after creation in
+ // case that is needed.
+ // TODO(port): does this really need to happen before
+ // CreateDirectory() on Windows?
if (!file_util::AbsolutePath(&install_directory_))
NOTREACHED();
+#endif
scoped_ptr<ExtensionList> extensions(new ExtensionList);
@@ -197,6 +204,11 @@
return;
}
+#if !defined(OS_WIN)
+ if (!file_util::AbsolutePath(&install_directory_))
+ NOTREACHED();
+#endif
+
LOG(INFO) << "Loading installed extensions...";
// Find all child directories in the install directory and load their