OLD | NEW |
---|---|
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 if (!PathService::Get(base::DIR_EXE, &cur)) | 175 if (!PathService::Get(base::DIR_EXE, &cur)) |
176 return false; | 176 return false; |
177 #endif | 177 #endif |
178 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries")); | 178 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries")); |
179 create_dir = true; | 179 create_dir = true; |
180 break; | 180 break; |
181 case chrome::DIR_USER_DATA_TEMP: | 181 case chrome::DIR_USER_DATA_TEMP: |
182 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 182 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
183 return false; | 183 return false; |
184 cur = cur.Append(FILE_PATH_LITERAL("Temp")); | 184 cur = cur.Append(FILE_PATH_LITERAL("Temp")); |
185 create_dir = true; | |
Erik does not do reviews
2011/01/18 21:36:34
need to add a comment here or in the header so tha
Sam Kerner (Chrome)
2011/01/19 05:01:24
Done.
| |
186 break; | 185 break; |
187 case chrome::DIR_INTERNAL_PLUGINS: | 186 case chrome::DIR_INTERNAL_PLUGINS: |
188 if (!GetInternalPluginsDirectory(&cur)) | 187 if (!GetInternalPluginsDirectory(&cur)) |
189 return false; | 188 return false; |
190 break; | 189 break; |
191 case chrome::FILE_LOCAL_STATE: | 190 case chrome::FILE_LOCAL_STATE: |
192 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) | 191 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) |
193 return false; | 192 return false; |
194 cur = cur.Append(chrome::kLocalStateFilename); | 193 cur = cur.Append(chrome::kLocalStateFilename); |
195 break; | 194 break; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 return true; | 332 return true; |
334 } | 333 } |
335 | 334 |
336 // This cannot be done as a static initializer sadly since Visual Studio will | 335 // This cannot be done as a static initializer sadly since Visual Studio will |
337 // eliminate this object file if there is no direct entry point into it. | 336 // eliminate this object file if there is no direct entry point into it. |
338 void RegisterPathProvider() { | 337 void RegisterPathProvider() { |
339 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); | 338 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); |
340 } | 339 } |
341 | 340 |
342 } // namespace chrome | 341 } // namespace chrome |
OLD | NEW |