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

Side by Side Diff: base/base_paths_win.cc

Issue 293013: Deprecate PathService::Get(..., wstring*) and use FilePath instead. (Closed)
Patch Set: Created 11 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/i18n/icu_util.cc » ('j') | base/i18n/icu_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/base_paths_win.h" 5 #include "base/base_paths_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 break; 95 break;
96 case base::DIR_LOCAL_APP_DATA: 96 case base::DIR_LOCAL_APP_DATA:
97 if (FAILED(SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, 97 if (FAILED(SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL,
98 SHGFP_TYPE_CURRENT, system_buffer))) 98 SHGFP_TYPE_CURRENT, system_buffer)))
99 return false; 99 return false;
100 cur = FilePath(system_buffer); 100 cur = FilePath(system_buffer);
101 break; 101 break;
102 case base::DIR_SOURCE_ROOT: 102 case base::DIR_SOURCE_ROOT:
103 // On Windows, unit tests execute two levels deep from the source root. 103 // On Windows, unit tests execute two levels deep from the source root.
104 // For example: chrome/{Debug|Release}/ui_tests.exe 104 // For example: chrome/{Debug|Release}/ui_tests.exe
105 PathService::Get(base::DIR_EXE, &wstring_path); 105 PathService::Get(base::DIR_EXE, &cur);
106 file_util::UpOneDirectory(&wstring_path); 106 cur = cur.DirName().DirName();
107 file_util::UpOneDirectory(&wstring_path);
108 cur = FilePath(wstring_path);
109 break; 107 break;
110 default: 108 default:
111 return false; 109 return false;
112 } 110 }
113 111
114 *result = cur; 112 *result = cur;
115 return true; 113 return true;
116 } 114 }
117 115
118 } // namespace base 116 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/i18n/icu_util.cc » ('j') | base/i18n/icu_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698