summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 22:59:00 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-21 22:59:00 +0000
commitcc6c5d6fab9bacf150042cc83654d9ffa86e367e (patch)
treec8f56cb2219d422c36ecd6966529b19fefcf103e /cloud_print
parente47fe76d77ea6922e7a00fbe33433b8c950a3cb9 (diff)
downloadchromium_src-cc6c5d6fab9bacf150042cc83654d9ffa86e367e.zip
chromium_src-cc6c5d6fab9bacf150042cc83654d9ffa86e367e.tar.gz
chromium_src-cc6c5d6fab9bacf150042cc83654d9ffa86e367e.tar.bz2
Revert 82567 - Extend PathService::Get to be able to return the X86 program files path.Cloud print's virtual driver needs this to be able to find the Chrome install directory. Since the port monitor is a 64 bit DLL on 64 bit Windows it needs to request the X86 folder explicitly.BUG=TEST=Review URL: http://codereview.chromium.org/6873159
TBR=abodenha@google.com Review URL: http://codereview.chromium.org/6899005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
index cd54d2a..5141f99 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
@@ -271,7 +271,16 @@ bool GetChromeExePath(FilePath* chrome_path) {
// Chrome doesn't appear to be installed per user.
// Now check %programfiles(x86)%\google\chrome\application
- PathService::Get(base::DIR_PROGRAM_FILESX86, &path);
+ // TODO(abodenha@chromium.org) Extend PathService::Get to be able to
+ // return the X86 program files path. At a minimum, use SHGetKnownFolderPath
+ // instead.
+ wchar_t system_buffer[MAX_PATH] = L"";
+ SHGetFolderPath(NULL,
+ CSIDL_PROGRAM_FILESX86,
+ NULL,
+ SHGFP_TYPE_CURRENT,
+ system_buffer);
+ path = FilePath(system_buffer);
path = path.Append(kChromeExePath);
if (file_util::PathExists(path)) {
*chrome_path = FilePath(path.value());