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

Unified Diff: base/base_paths_win.cc

Issue 6873159: Extend PathService::Get to be able to return the X86 program files path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix broken unit test on 32 bit systems. Created 9 years, 8 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 | « base/base_paths_win.h ('k') | cloud_print/virtual_driver/win/port_monitor/port_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths_win.cc
diff --git a/base/base_paths_win.cc b/base/base_paths_win.cc
index 25271e44d007c1bd27a8dea3b7f116587b383936..b29a99155e30b723f967cad7c102b3e84ca59603 100644
--- a/base/base_paths_win.cc
+++ b/base/base_paths_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -49,6 +49,16 @@ bool PathProviderWin(int key, FilePath* result) {
GetSystemDirectory(system_buffer, MAX_PATH);
cur = FilePath(system_buffer);
break;
+ case base::DIR_PROGRAM_FILESX86:
+ if (base::win::OSInfo::GetInstance()->architecture() !=
+ base::win::OSInfo::X86_ARCHITECTURE) {
+ if (FAILED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILESX86, NULL,
+ SHGFP_TYPE_CURRENT, system_buffer)))
+ return false;
+ cur = FilePath(system_buffer);
+ break;
+ }
+ // Fall through to base::DIR_PROGRAM_FILES if we're on an X86 machine.
case base::DIR_PROGRAM_FILES:
if (FAILED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL,
SHGFP_TYPE_CURRENT, system_buffer)))
« no previous file with comments | « base/base_paths_win.h ('k') | cloud_print/virtual_driver/win/port_monitor/port_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698