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

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

Issue 113452: Move/Copy paths used by app to app_paths. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/test/data/icon_util/128_X_128_icon.ico » ('j') | 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return false; 85 return false;
86 cur = cur.Append(FILE_PATH_LITERAL("resources")); 86 cur = cur.Append(FILE_PATH_LITERAL("resources"));
87 create_dir = true; 87 create_dir = true;
88 break; 88 break;
89 case chrome::DIR_INSPECTOR: 89 case chrome::DIR_INSPECTOR:
90 if (!PathService::Get(chrome::DIR_APP, &cur)) 90 if (!PathService::Get(chrome::DIR_APP, &cur))
91 return false; 91 return false;
92 cur = cur.Append(FILE_PATH_LITERAL("resources")); 92 cur = cur.Append(FILE_PATH_LITERAL("resources"));
93 cur = cur.Append(FILE_PATH_LITERAL("inspector")); 93 cur = cur.Append(FILE_PATH_LITERAL("inspector"));
94 break; 94 break;
95 case chrome::DIR_THEMES:
96 if (!PathService::Get(chrome::DIR_APP, &cur))
97 return false;
98 cur = cur.Append(FILE_PATH_LITERAL("themes"));
99 create_dir = true;
100 break;
101 case chrome::DIR_LOCALES:
102 if (!PathService::Get(chrome::DIR_APP, &cur))
103 return false;
104 #if defined(OS_MACOSX)
105 // On Mac, locale files are in Contents/Resources, a sibling of the
106 // App dir.
107 cur = cur.DirName();
108 cur = cur.Append(FILE_PATH_LITERAL("Resources"));
109 #else
110 cur = cur.Append(FILE_PATH_LITERAL("locales"));
111 #endif
112 create_dir = true;
113 break;
114 case chrome::DIR_APP_DICTIONARIES: 95 case chrome::DIR_APP_DICTIONARIES:
115 #if defined(OS_LINUX) 96 #if defined(OS_LINUX)
116 // We can't write into the EXE dir on Linux, so keep dictionaries 97 // We can't write into the EXE dir on Linux, so keep dictionaries
117 // alongside the safe browsing database in the user data dir. 98 // alongside the safe browsing database in the user data dir.
118 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 99 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
119 return false; 100 return false;
120 #else 101 #else
121 if (!PathService::Get(base::DIR_EXE, &cur)) 102 if (!PathService::Get(base::DIR_EXE, &cur))
122 return false; 103 return false;
123 #endif 104 #endif
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 return true; 191 return true;
211 } 192 }
212 193
213 // This cannot be done as a static initializer sadly since Visual Studio will 194 // This cannot be done as a static initializer sadly since Visual Studio will
214 // eliminate this object file if there is no direct entry point into it. 195 // eliminate this object file if there is no direct entry point into it.
215 void RegisterPathProvider() { 196 void RegisterPathProvider() {
216 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 197 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
217 } 198 }
218 199
219 } // namespace chrome 200 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/test/data/icon_util/128_X_128_icon.ico » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698