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

Unified Diff: chrome/common/chrome_paths_win.cc

Issue 10392094: Add PathService::Get(chrome::DIR_USER_PICTURES). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: merge Created 8 years, 7 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 | « chrome/common/chrome_paths_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths_win.cc
===================================================================
--- chrome/common/chrome_paths_win.cc (revision 137529)
+++ chrome/common/chrome_paths_win.cc (working copy)
@@ -11,8 +11,8 @@
#include <shobjidl.h>
#include "base/file_path.h"
+#include "base/path_service.h"
#include "base/win/metro.h"
-#include "base/path_service.h"
#include "base/win/scoped_co_mem.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/installer/util/browser_distribution.h"
@@ -83,6 +83,16 @@
return GetUserDownloadsDirectorySafe(result);
}
+bool GetUserPicturesDirectory(FilePath* result) {
+ wchar_t path_buf[MAX_PATH];
+ if (FAILED(SHGetFolderPath(NULL, CSIDL_MYPICTURES, NULL,
+ SHGFP_TYPE_CURRENT, path_buf))) {
+ return false;
+ }
+ *result = FilePath(path_buf);
+ return true;
+}
+
bool GetUserDesktop(FilePath* result) {
// We need to go compute the value. It would be nice to support paths
// with names longer than MAX_PATH, but the system functions don't seem
@@ -92,8 +102,9 @@
wchar_t system_buffer[MAX_PATH];
system_buffer[0] = 0;
if (FAILED(SHGetFolderPath(NULL, CSIDL_DESKTOPDIRECTORY, NULL,
- SHGFP_TYPE_CURRENT, system_buffer)))
+ SHGFP_TYPE_CURRENT, system_buffer))) {
return false;
+ }
*result = FilePath(system_buffer);
return true;
}
« no previous file with comments | « chrome/common/chrome_paths_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698