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

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

Issue 2468723003: Move session service and supervised users to buildflags. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/features.gni » ('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) 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/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/sys_info.h" 13 #include "base/sys_info.h"
14 #include "base/threading/thread_restrictions.h" 14 #include "base/threading/thread_restrictions.h"
15 #include "base/version.h" 15 #include "base/version.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/common/chrome_constants.h" 17 #include "chrome/common/chrome_constants.h"
18 #include "chrome/common/chrome_paths_internal.h" 18 #include "chrome/common/chrome_paths_internal.h"
19 #include "chrome/common/features.h"
19 #include "media/cdm/cdm_paths.h" 20 #include "media/cdm/cdm_paths.h"
20 #include "ppapi/features/features.h" 21 #include "ppapi/features/features.h"
21 22
22 #if defined(OS_ANDROID) 23 #if defined(OS_ANDROID)
23 #include "base/android/path_utils.h" 24 #include "base/android/path_utils.h"
24 #include "base/base_paths_android.h" 25 #include "base/base_paths_android.h"
25 // ui/base must only be used on Android. See BUILD.gn for dependency info. 26 // ui/base must only be used on Android. See BUILD.gn for dependency info.
26 #include "ui/base/ui_base_paths.h" // nogncheck 27 #include "ui/base/ui_base_paths.h" // nogncheck
27 #endif 28 #endif
28 29
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 425 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
425 return false; 426 return false;
426 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails")); 427 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails"));
427 break; 428 break;
428 case chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS: 429 case chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS:
429 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 430 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
430 return false; 431 return false;
431 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers")); 432 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers"));
432 break; 433 break;
433 #endif 434 #endif
434 #if defined(ENABLE_SUPERVISED_USERS) 435 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
435 #if defined(OS_LINUX) 436 #if defined(OS_LINUX)
436 case chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS: 437 case chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS:
437 if (!PathService::Get(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, &cur)) 438 if (!PathService::Get(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, &cur))
438 return false; 439 return false;
439 cur = cur.Append(FILE_PATH_LITERAL("managed_users")); 440 cur = cur.Append(FILE_PATH_LITERAL("managed_users"));
440 break; 441 break;
441 #endif 442 #endif
442 case chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS: 443 case chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS:
443 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 444 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
444 return false; 445 return false;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 607
607 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { 608 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
608 g_invalid_specified_user_data_dir.Get() = user_data_dir; 609 g_invalid_specified_user_data_dir.Get() = user_data_dir;
609 } 610 }
610 611
611 const base::FilePath& GetInvalidSpecifiedUserDataDir() { 612 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
612 return g_invalid_specified_user_data_dir.Get(); 613 return g_invalid_specified_user_data_dir.Get();
613 } 614 }
614 615
615 } // namespace chrome 616 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/features.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698