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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 10910209: Add new PathService paths for Windows' All Users Desktop and Quick Launch folders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac compile Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // The crash reports are always stored relative to the default user data 193 // The crash reports are always stored relative to the default user data
194 // directory. This avoids the problem of having to re-initialize the 194 // directory. This avoids the problem of having to re-initialize the
195 // exception handler after parsing command line options, which may 195 // exception handler after parsing command line options, which may
196 // override the location of the app's profile directory. 196 // override the location of the app's profile directory.
197 if (!GetDefaultUserDataDirectory(&cur)) 197 if (!GetDefaultUserDataDirectory(&cur))
198 return false; 198 return false;
199 #endif 199 #endif
200 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports")); 200 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports"));
201 create_dir = true; 201 create_dir = true;
202 break; 202 break;
203 case chrome::DIR_USER_DESKTOP:
204 if (!GetUserDesktop(&cur))
205 return false;
206 break;
207 case chrome::DIR_RESOURCES: 203 case chrome::DIR_RESOURCES:
208 #if defined(OS_MACOSX) 204 #if defined(OS_MACOSX)
209 cur = base::mac::FrameworkBundlePath(); 205 cur = base::mac::FrameworkBundlePath();
210 cur = cur.Append(FILE_PATH_LITERAL("Resources")); 206 cur = cur.Append(FILE_PATH_LITERAL("Resources"));
211 #else 207 #else
212 if (!PathService::Get(chrome::DIR_APP, &cur)) 208 if (!PathService::Get(chrome::DIR_APP, &cur))
213 return false; 209 return false;
214 cur = cur.Append(FILE_PATH_LITERAL("resources")); 210 cur = cur.Append(FILE_PATH_LITERAL("resources"));
215 #endif 211 #endif
216 break; 212 break;
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 return true; 451 return true;
456 } 452 }
457 453
458 // This cannot be done as a static initializer sadly since Visual Studio will 454 // This cannot be done as a static initializer sadly since Visual Studio will
459 // eliminate this object file if there is no direct entry point into it. 455 // eliminate this object file if there is no direct entry point into it.
460 void RegisterPathProvider() { 456 void RegisterPathProvider() {
461 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 457 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
462 } 458 }
463 459
464 } // namespace chrome 460 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698