summaryrefslogtreecommitdiffstats
path: root/chrome/common/chrome_paths.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-16 21:14:38 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-16 21:14:38 +0000
commit70a184e3d185c024204062ab20e3de7d382a268b (patch)
tree7226a874e2ea0b67ce76bd18365bd0ce78ba3800 /chrome/common/chrome_paths.cc
parentffce13346d81dd0f893faf4da08fb811af446537 (diff)
downloadchromium_src-70a184e3d185c024204062ab20e3de7d382a268b.zip
chromium_src-70a184e3d185c024204062ab20e3de7d382a268b.tar.gz
chromium_src-70a184e3d185c024204062ab20e3de7d382a268b.tar.bz2
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
Diffstat (limited to 'chrome/common/chrome_paths.cc')
-rw-r--r--chrome/common/chrome_paths.cc15
1 files changed, 12 insertions, 3 deletions
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;