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

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

Issue 177062: Create the download folder if it doesn't exist. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #endif 89 #endif
90 break; 90 break;
91 case chrome::DIR_USER_DOCUMENTS: 91 case chrome::DIR_USER_DOCUMENTS:
92 if (!GetUserDocumentsDirectory(&cur)) 92 if (!GetUserDocumentsDirectory(&cur))
93 return false; 93 return false;
94 create_dir = true; 94 create_dir = true;
95 break; 95 break;
96 case chrome::DIR_DEFAULT_DOWNLOADS: 96 case chrome::DIR_DEFAULT_DOWNLOADS:
97 if (!GetUserDownloadsDirectory(&cur)) 97 if (!GetUserDownloadsDirectory(&cur))
98 return false; 98 return false;
99 create_dir = true;
99 break; 100 break;
100 case chrome::DIR_CRASH_DUMPS: 101 case chrome::DIR_CRASH_DUMPS:
101 // The crash reports are always stored relative to the default user data 102 // The crash reports are always stored relative to the default user data
102 // directory. This avoids the problem of having to re-initialize the 103 // directory. This avoids the problem of having to re-initialize the
103 // exception handler after parsing command line options, which may 104 // exception handler after parsing command line options, which may
104 // override the location of the app's profile directory. 105 // override the location of the app's profile directory.
105 if (!GetDefaultUserDataDirectory(&cur)) 106 if (!GetDefaultUserDataDirectory(&cur))
106 return false; 107 return false;
107 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports")); 108 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports"));
108 create_dir = true; 109 create_dir = true;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 return true; 205 return true;
205 } 206 }
206 207
207 // This cannot be done as a static initializer sadly since Visual Studio will 208 // This cannot be done as a static initializer sadly since Visual Studio will
208 // eliminate this object file if there is no direct entry point into it. 209 // eliminate this object file if there is no direct entry point into it.
209 void RegisterPathProvider() { 210 void RegisterPathProvider() {
210 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 211 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
211 } 212 }
212 213
213 } // namespace chrome 214 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698