From 70a184e3d185c024204062ab20e3de7d382a268b Mon Sep 17 00:00:00 2001 From: "mpcomplete@google.com" Date: Tue, 16 Sep 2008 21:14:38 +0000 Subject: Move gears.dll location to the versioned directory (alongside chrome.dll). We fall back to searching the original plugins/gears/gears.dll for existing users. Review URL: http://codereview.chromium.org/2904 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2282 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/chrome_paths.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'chrome') diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index 029a269..2e6d0bb 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -143,11 +143,20 @@ bool PathProvider(int key, std::wstring* result) { break; case chrome::FILE_GEARS_PLUGIN: if (!GetGearsPluginPathFromCommandLine(&cur)) { - if (!PathService::Get(base::DIR_EXE, &cur)) + // Search for gears.dll alongside chrome.dll first. This new model + // allows us to package gears.dll with the Chrome installer and update + // it while Chrome is running. + if (!PathService::Get(base::DIR_MODULE, &cur)) return false; - file_util::AppendToPath(&cur, L"plugins"); - file_util::AppendToPath(&cur, L"gears"); file_util::AppendToPath(&cur, L"gears.dll"); + + if (!file_util::PathExists(cur)) { + if (!PathService::Get(base::DIR_EXE, &cur)) + return false; + file_util::AppendToPath(&cur, L"plugins"); + file_util::AppendToPath(&cur, L"gears"); + file_util::AppendToPath(&cur, L"gears.dll"); + } } exists = true; break; -- cgit v1.1