Roll src/third_party/skia 4cd6713:0edd965
[chromium-blink-merge.git] / chrome / common / chrome_paths.cc
blobb5fd5b5db70b4e904487bf1158582758d2fcfa49
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
3 // found in the LICENSE file.
5 #include "chrome/common/chrome_paths.h"
7 #include "base/files/file_util.h"
8 #include "base/lazy_instance.h"
9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h"
11 #include "base/path_service.h"
12 #include "base/strings/string_util.h"
13 #include "base/sys_info.h"
14 #include "base/threading/thread_restrictions.h"
15 #include "base/version.h"
16 #include "chrome/common/chrome_constants.h"
17 #include "chrome/common/chrome_paths_internal.h"
18 #include "chrome/common/widevine_cdm_constants.h"
19 #include "ui/base/ui_base_paths.h"
21 #if defined(OS_ANDROID)
22 #include "base/android/path_utils.h"
23 #include "base/base_paths_android.h"
24 #endif
26 #if defined(OS_MACOSX)
27 #include "base/mac/foundation_util.h"
28 #endif
30 #if defined(OS_WIN)
31 #include "base/win/registry.h"
32 #endif
34 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
36 namespace {
38 #if defined(OS_WIN)
39 const wchar_t kFlashRegistryRoot[] = L"SOFTWARE\\Macromedia\\FlashPlayerPepper";
41 const wchar_t kFlashPlayerPathValueName[] = L"PlayerPath";
42 #endif
44 // File name of the internal Flash plugin on different platforms.
45 const base::FilePath::CharType kInternalFlashPluginFileName[] =
46 #if defined(OS_MACOSX)
47 FILE_PATH_LITERAL("Flash Player Plugin for Chrome.plugin");
48 #elif defined(OS_WIN)
49 FILE_PATH_LITERAL("gcswf32.dll");
50 #else // OS_LINUX, etc.
51 FILE_PATH_LITERAL("libgcflashplayer.so");
52 #endif
54 // The Pepper Flash plugins are in a directory with this name.
55 const base::FilePath::CharType kPepperFlashBaseDirectory[] =
56 FILE_PATH_LITERAL("PepperFlash");
58 #if defined(OS_WIN)
59 const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] =
60 FILE_PATH_LITERAL("Macromed\\Flash");
61 #elif defined(OS_MACOSX) && !defined(OS_IOS)
62 const base::FilePath::CharType kPepperFlashSystemBaseDirectory[] =
63 FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer");
64 #endif
66 const base::FilePath::CharType kInternalNaClPluginFileName[] =
67 FILE_PATH_LITERAL("internal-nacl-plugin");
69 #if defined(OS_LINUX)
70 // The path to the external extension <id>.json files.
71 // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/
72 const base::FilePath::CharType kFilepathSinglePrefExtensions[] =
73 #if defined(GOOGLE_CHROME_BUILD)
74 FILE_PATH_LITERAL("/usr/share/google-chrome/extensions");
75 #else
76 FILE_PATH_LITERAL("/usr/share/chromium/extensions");
77 #endif // defined(GOOGLE_CHROME_BUILD)
78 #endif // defined(OS_LINUX)
80 static base::LazyInstance<base::FilePath>
81 g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
83 // Gets the path for internal plugins.
84 bool GetInternalPluginsDirectory(base::FilePath* result) {
85 #if defined(OS_MACOSX) && !defined(OS_IOS)
86 // If called from Chrome, get internal plugins from a subdirectory of the
87 // framework.
88 if (base::mac::AmIBundled()) {
89 *result = chrome::GetFrameworkBundlePath();
90 DCHECK(!result->empty());
91 *result = result->Append("Internet Plug-Ins");
92 return true;
94 // In tests, just look in the module directory (below).
95 #endif
97 // The rest of the world expects plugins in the module directory.
98 return PathService::Get(base::DIR_MODULE, result);
101 #if defined(OS_WIN)
102 // Gets the Flash path if installed on the system.
103 bool GetSystemFlashDirectory(base::FilePath* out_path) {
104 base::win::RegKey path_key(HKEY_LOCAL_MACHINE, kFlashRegistryRoot, KEY_READ);
105 base::string16 path_str;
106 if (FAILED(path_key.ReadValue(kFlashPlayerPathValueName, &path_str)))
107 return false;
108 base::FilePath plugin_path = base::FilePath(path_str).DirName();
110 *out_path = plugin_path;
111 return true;
113 #endif
115 } // namespace
117 namespace chrome {
119 bool PathProvider(int key, base::FilePath* result) {
120 // Some keys are just aliases...
121 switch (key) {
122 case chrome::DIR_APP:
123 return PathService::Get(base::DIR_MODULE, result);
124 case chrome::DIR_LOGS:
125 #ifdef NDEBUG
126 // Release builds write to the data dir
127 return PathService::Get(chrome::DIR_USER_DATA, result);
128 #else
129 // Debug builds write next to the binary (in the build tree)
130 #if defined(OS_MACOSX)
131 if (!PathService::Get(base::DIR_EXE, result))
132 return false;
133 if (base::mac::AmIBundled()) {
134 // If we're called from chrome, dump it beside the app (outside the
135 // app bundle), if we're called from a unittest, we'll already
136 // outside the bundle so use the exe dir.
137 // exe_dir gave us .../Chromium.app/Contents/MacOS/Chromium.
138 *result = result->DirName();
139 *result = result->DirName();
140 *result = result->DirName();
142 return true;
143 #else
144 return PathService::Get(base::DIR_EXE, result);
145 #endif // defined(OS_MACOSX)
146 #endif // NDEBUG
147 case chrome::FILE_RESOURCE_MODULE:
148 return PathService::Get(base::FILE_MODULE, result);
151 // Assume that we will not need to create the directory if it does not exist.
152 // This flag can be set to true for the cases where we want to create it.
153 bool create_dir = false;
155 base::FilePath cur;
156 switch (key) {
157 case chrome::DIR_USER_DATA:
158 if (!GetDefaultUserDataDirectory(&cur)) {
159 NOTREACHED();
160 return false;
162 create_dir = true;
163 break;
164 case chrome::DIR_USER_DOCUMENTS:
165 if (!GetUserDocumentsDirectory(&cur))
166 return false;
167 create_dir = true;
168 break;
169 case chrome::DIR_USER_MUSIC:
170 if (!GetUserMusicDirectory(&cur))
171 return false;
172 break;
173 case chrome::DIR_USER_PICTURES:
174 if (!GetUserPicturesDirectory(&cur))
175 return false;
176 break;
177 case chrome::DIR_USER_VIDEOS:
178 if (!GetUserVideosDirectory(&cur))
179 return false;
180 break;
181 case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
182 #if defined(OS_WIN) || defined(OS_LINUX)
183 if (!GetUserDownloadsDirectorySafe(&cur))
184 return false;
185 break;
186 #else
187 // Fall through for all other platforms.
188 #endif
189 case chrome::DIR_DEFAULT_DOWNLOADS:
190 #if defined(OS_ANDROID)
191 if (!base::android::GetDownloadsDirectory(&cur))
192 return false;
193 #else
194 if (!GetUserDownloadsDirectory(&cur))
195 return false;
196 // Do not create the download directory here, we have done it twice now
197 // and annoyed a lot of users.
198 #endif
199 break;
200 case chrome::DIR_CRASH_DUMPS:
201 #if defined(OS_CHROMEOS)
202 // ChromeOS uses a separate directory. See http://crosbug.com/25089
203 cur = base::FilePath("/var/log/chrome");
204 #elif defined(OS_ANDROID)
205 if (!base::android::GetCacheDirectory(&cur))
206 return false;
207 #else
208 // The crash reports are always stored relative to the default user data
209 // directory. This avoids the problem of having to re-initialize the
210 // exception handler after parsing command line options, which may
211 // override the location of the app's profile directory.
212 if (!GetDefaultUserDataDirectory(&cur))
213 return false;
214 #endif
215 #if defined(OS_MACOSX)
216 cur = cur.Append(FILE_PATH_LITERAL("Crashpad"));
217 #else
218 cur = cur.Append(FILE_PATH_LITERAL("Crash Reports"));
219 #endif
220 create_dir = true;
221 break;
222 #if defined(OS_WIN)
223 case chrome::DIR_WATCHER_DATA:
224 // The watcher data is always stored relative to the default user data
225 // directory. This allows the watcher to be initialized before
226 // command-line options have been parsed.
227 if (!GetDefaultUserDataDirectory(&cur))
228 return false;
229 cur = cur.Append(FILE_PATH_LITERAL("Diagnostics"));
230 break;
231 #endif
232 case chrome::DIR_RESOURCES:
233 #if defined(OS_MACOSX)
234 cur = base::mac::FrameworkBundlePath();
235 cur = cur.Append(FILE_PATH_LITERAL("Resources"));
236 #else
237 if (!PathService::Get(chrome::DIR_APP, &cur))
238 return false;
239 cur = cur.Append(FILE_PATH_LITERAL("resources"));
240 #endif
241 break;
242 case chrome::DIR_INSPECTOR:
243 if (!PathService::Get(chrome::DIR_RESOURCES, &cur))
244 return false;
245 cur = cur.Append(FILE_PATH_LITERAL("inspector"));
246 break;
247 case chrome::DIR_APP_DICTIONARIES:
248 #if defined(OS_POSIX)
249 // We can't write into the EXE dir on Linux, so keep dictionaries
250 // alongside the safe browsing database in the user data dir.
251 // And we don't want to write into the bundle on the Mac, so push
252 // it to the user data dir there also.
253 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
254 return false;
255 #else
256 if (!PathService::Get(base::DIR_EXE, &cur))
257 return false;
258 #endif
259 cur = cur.Append(FILE_PATH_LITERAL("Dictionaries"));
260 create_dir = true;
261 break;
262 case chrome::DIR_INTERNAL_PLUGINS:
263 if (!GetInternalPluginsDirectory(&cur))
264 return false;
265 break;
266 case chrome::DIR_PEPPER_FLASH_PLUGIN:
267 if (!GetInternalPluginsDirectory(&cur))
268 return false;
269 cur = cur.Append(kPepperFlashBaseDirectory);
270 break;
271 case chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN:
272 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
273 return false;
274 cur = cur.Append(kPepperFlashBaseDirectory);
275 break;
276 case chrome::DIR_PEPPER_FLASH_SYSTEM_PLUGIN:
277 #if defined(OS_WIN)
278 if (!GetSystemFlashDirectory(&cur))
279 return false;
280 #elif defined(OS_MACOSX) && !defined(OS_IOS)
281 if (!GetLocalLibraryDirectory(&cur))
282 return false;
283 cur = cur.Append(kPepperFlashSystemBaseDirectory);
284 #else
285 // Chrome on iOS does not supports PPAPI binaries, return false.
286 // TODO(wfh): If Adobe release PPAPI binaries for Linux, add support here.
287 return false;
288 #endif
289 break;
290 case chrome::FILE_LOCAL_STATE:
291 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
292 return false;
293 cur = cur.Append(chrome::kLocalStateFilename);
294 break;
295 case chrome::FILE_RECORDED_SCRIPT:
296 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
297 return false;
298 cur = cur.Append(FILE_PATH_LITERAL("script.log"));
299 break;
300 case chrome::FILE_FLASH_PLUGIN:
301 if (!GetInternalPluginsDirectory(&cur))
302 return false;
303 cur = cur.Append(kInternalFlashPluginFileName);
304 break;
305 case chrome::FILE_PEPPER_FLASH_PLUGIN:
306 if (!PathService::Get(chrome::DIR_PEPPER_FLASH_PLUGIN, &cur))
307 return false;
308 cur = cur.Append(chrome::kPepperFlashPluginFilename);
309 break;
310 // TODO(teravest): Remove this case once the internal NaCl plugin is gone.
311 // We currently need a path here to look up whether the plugin is disabled
312 // and what its permissions are.
313 case chrome::FILE_NACL_PLUGIN:
314 if (!GetInternalPluginsDirectory(&cur))
315 return false;
316 cur = cur.Append(kInternalNaClPluginFileName);
317 break;
318 // PNaCl is currenly installable via the component updater or by being
319 // simply built-in. DIR_PNACL_BASE is used as the base directory for
320 // installation via component updater. DIR_PNACL_COMPONENT will be
321 // the final location of pnacl, which is a subdir of DIR_PNACL_BASE.
322 case chrome::DIR_PNACL_BASE:
323 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
324 return false;
325 cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
326 break;
327 // Where PNaCl files are ultimately located. The default finds the files
328 // inside the InternalPluginsDirectory / build directory, as if it
329 // was shipped along with chrome. The value can be overridden
330 // if it is installed via component updater.
331 case chrome::DIR_PNACL_COMPONENT:
332 #if defined(OS_MACOSX)
333 // PNaCl really belongs in the InternalPluginsDirectory but actually
334 // copying it there would result in the files also being shipped, which
335 // we don't want yet. So for now, just find them in the directory where
336 // they get built.
337 if (!PathService::Get(base::DIR_EXE, &cur))
338 return false;
339 if (base::mac::AmIBundled()) {
340 // If we're called from chrome, it's beside the app (outside the
341 // app bundle), if we're called from a unittest, we'll already be
342 // outside the bundle so use the exe dir.
343 // exe_dir gave us .../Chromium.app/Contents/MacOS/Chromium.
344 cur = cur.DirName();
345 cur = cur.DirName();
346 cur = cur.DirName();
348 #else
349 if (!GetInternalPluginsDirectory(&cur))
350 return false;
351 #endif
352 cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
353 break;
354 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
355 #if defined(WIDEVINE_CDM_IS_COMPONENT)
356 case chrome::DIR_COMPONENT_WIDEVINE_CDM:
357 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
358 return false;
359 cur = cur.Append(kWidevineCdmBaseDirectory);
360 break;
361 #endif // defined(WIDEVINE_CDM_IS_COMPONENT)
362 // TODO(xhwang): FILE_WIDEVINE_CDM_ADAPTER has different meanings.
363 // In the component case, this is the source adapter. Otherwise, it is the
364 // actual Pepper module that gets loaded.
365 case chrome::FILE_WIDEVINE_CDM_ADAPTER:
366 if (!GetInternalPluginsDirectory(&cur))
367 return false;
368 cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
369 break;
370 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
371 case chrome::FILE_RESOURCES_PACK:
372 #if defined(OS_MACOSX) && !defined(OS_IOS)
373 if (base::mac::AmIBundled()) {
374 cur = base::mac::FrameworkBundlePath();
375 cur = cur.Append(FILE_PATH_LITERAL("Resources"))
376 .Append(FILE_PATH_LITERAL("resources.pak"));
377 break;
379 #elif defined(OS_ANDROID)
380 if (!PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &cur))
381 return false;
382 #else
383 // If we're not bundled on mac or Android, resources.pak should be next
384 // to the binary (e.g., for unit tests).
385 if (!PathService::Get(base::DIR_MODULE, &cur))
386 return false;
387 #endif
388 cur = cur.Append(FILE_PATH_LITERAL("resources.pak"));
389 break;
390 case chrome::DIR_RESOURCES_EXTENSION:
391 if (!PathService::Get(base::DIR_MODULE, &cur))
392 return false;
393 cur = cur.Append(FILE_PATH_LITERAL("resources"))
394 .Append(FILE_PATH_LITERAL("extension"));
395 break;
396 #if defined(OS_CHROMEOS)
397 case chrome::DIR_CHROMEOS_WALLPAPERS:
398 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
399 return false;
400 cur = cur.Append(FILE_PATH_LITERAL("wallpapers"));
401 break;
402 case chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS:
403 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
404 return false;
405 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails"));
406 break;
407 case chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS:
408 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
409 return false;
410 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers"));
411 break;
412 #endif
413 #if defined(OS_LINUX) && defined(ENABLE_SUPERVISED_USERS)
414 case chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS:
415 if (!PathService::Get(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, &cur))
416 return false;
417 cur = cur.Append(FILE_PATH_LITERAL("managed_users"));
418 break;
419 #endif
420 // The following are only valid in the development environment, and
421 // will fail if executed from an installed executable (because the
422 // generated path won't exist).
423 case chrome::DIR_GEN_TEST_DATA:
424 #if defined(OS_ANDROID)
425 // On Android, our tests don't have permission to write to DIR_MODULE.
426 // gtest/test_runner.py pushes data to external storage.
427 if (!PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, &cur))
428 return false;
429 #else
430 if (!PathService::Get(base::DIR_MODULE, &cur))
431 return false;
432 #endif
433 cur = cur.Append(FILE_PATH_LITERAL("test_data"));
434 if (!base::PathExists(cur)) // We don't want to create this.
435 return false;
436 break;
437 case chrome::DIR_TEST_DATA:
438 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
439 return false;
440 cur = cur.Append(FILE_PATH_LITERAL("chrome"));
441 cur = cur.Append(FILE_PATH_LITERAL("test"));
442 cur = cur.Append(FILE_PATH_LITERAL("data"));
443 if (!base::PathExists(cur)) // We don't want to create this.
444 return false;
445 break;
446 case chrome::DIR_TEST_TOOLS:
447 if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
448 return false;
449 cur = cur.Append(FILE_PATH_LITERAL("chrome"));
450 cur = cur.Append(FILE_PATH_LITERAL("tools"));
451 cur = cur.Append(FILE_PATH_LITERAL("test"));
452 if (!base::PathExists(cur)) // We don't want to create this
453 return false;
454 break;
455 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
456 case chrome::DIR_POLICY_FILES: {
457 #if defined(GOOGLE_CHROME_BUILD)
458 cur = base::FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies"));
459 #else
460 cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies"));
461 #endif
462 break;
464 #endif
465 #if defined(OS_MACOSX) && !defined(OS_IOS)
466 case chrome::DIR_USER_LIBRARY: {
467 if (!GetUserLibraryDirectory(&cur))
468 return false;
469 if (!base::PathExists(cur)) // We don't want to create this.
470 return false;
471 break;
473 case chrome::DIR_USER_APPLICATIONS: {
474 if (!GetUserApplicationsDirectory(&cur))
475 return false;
476 if (!base::PathExists(cur)) // We don't want to create this.
477 return false;
478 break;
480 #endif
481 #if defined(OS_CHROMEOS) || (defined(OS_MACOSX) && !defined(OS_IOS))
482 case chrome::DIR_USER_EXTERNAL_EXTENSIONS: {
483 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
484 return false;
485 cur = cur.Append(FILE_PATH_LITERAL("External Extensions"));
486 break;
488 #endif
489 #if defined(OS_LINUX)
490 case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: {
491 cur = base::FilePath(kFilepathSinglePrefExtensions);
492 break;
494 #endif
495 case chrome::DIR_EXTERNAL_EXTENSIONS:
496 #if defined(OS_MACOSX) && !defined(OS_IOS)
497 if (!chrome::GetGlobalApplicationSupportDirectory(&cur))
498 return false;
500 cur = cur.Append(FILE_PATH_LITERAL("Google"))
501 .Append(FILE_PATH_LITERAL("Chrome"))
502 .Append(FILE_PATH_LITERAL("External Extensions"));
503 create_dir = false;
504 #else
505 if (!PathService::Get(base::DIR_MODULE, &cur))
506 return false;
508 cur = cur.Append(FILE_PATH_LITERAL("extensions"));
509 create_dir = true;
510 #endif
511 break;
513 case chrome::DIR_DEFAULT_APPS:
514 #if defined(OS_MACOSX)
515 cur = base::mac::FrameworkBundlePath();
516 cur = cur.Append(FILE_PATH_LITERAL("Default Apps"));
517 #else
518 if (!PathService::Get(chrome::DIR_APP, &cur))
519 return false;
520 cur = cur.Append(FILE_PATH_LITERAL("default_apps"));
521 #endif
522 break;
524 #if defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS))
525 case chrome::DIR_NATIVE_MESSAGING:
526 #if defined(OS_MACOSX)
527 #if defined(GOOGLE_CHROME_BUILD)
528 cur = base::FilePath(FILE_PATH_LITERAL(
529 "/Library/Google/Chrome/NativeMessagingHosts"));
530 #else
531 cur = base::FilePath(FILE_PATH_LITERAL(
532 "/Library/Application Support/Chromium/NativeMessagingHosts"));
533 #endif
534 #else // defined(OS_MACOSX)
535 #if defined(GOOGLE_CHROME_BUILD)
536 cur = base::FilePath(FILE_PATH_LITERAL(
537 "/etc/opt/chrome/native-messaging-hosts"));
538 #else
539 cur = base::FilePath(FILE_PATH_LITERAL(
540 "/etc/chromium/native-messaging-hosts"));
541 #endif
542 #endif // !defined(OS_MACOSX)
543 break;
545 case chrome::DIR_USER_NATIVE_MESSAGING:
546 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
547 return false;
548 cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts"));
549 break;
550 #endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS))
551 #if !defined(OS_ANDROID)
552 case chrome::DIR_GLOBAL_GCM_STORE:
553 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
554 return false;
555 cur = cur.Append(kGCMStoreDirname);
556 break;
557 #endif // !defined(OS_ANDROID)
559 default:
560 return false;
563 // TODO(bauerb): http://crbug.com/259796
564 base::ThreadRestrictions::ScopedAllowIO allow_io;
565 if (create_dir && !base::PathExists(cur) &&
566 !base::CreateDirectory(cur))
567 return false;
569 *result = cur;
570 return true;
573 // This cannot be done as a static initializer sadly since Visual Studio will
574 // eliminate this object file if there is no direct entry point into it.
575 void RegisterPathProvider() {
576 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
579 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
580 g_invalid_specified_user_data_dir.Get() = user_data_dir;
583 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
584 return g_invalid_specified_user_data_dir.Get();
587 } // namespace chrome