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

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

Issue 2504763002: Change PPDCache to use a path inside the per-user profile. (Closed)
Patch Set: Change PPDCache to use a path inside the per-user profile. 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/chrome_paths.h ('k') | 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) 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"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 case chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS: 423 case chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS:
424 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 424 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
425 return false; 425 return false;
426 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails")); 426 cur = cur.Append(FILE_PATH_LITERAL("wallpaper_thumbnails"));
427 break; 427 break;
428 case chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS: 428 case chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS:
429 if (!PathService::Get(chrome::DIR_USER_DATA, &cur)) 429 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
430 return false; 430 return false;
431 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers")); 431 cur = cur.Append(FILE_PATH_LITERAL("custom_wallpapers"));
432 break; 432 break;
433 case chrome::DIR_CHROMEOS_PPD_CACHE:
434 if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
435 return false;
436 cur = cur.Append(FILE_PATH_LITERAL("PpdCache"));
437 create_dir = true;
438 break;
439 #endif 433 #endif
440 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) 434 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
441 #if defined(OS_LINUX) 435 #if defined(OS_LINUX)
442 case chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS: 436 case chrome::DIR_SUPERVISED_USERS_DEFAULT_APPS:
443 if (!PathService::Get(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, &cur)) 437 if (!PathService::Get(chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS, &cur))
444 return false; 438 return false;
445 cur = cur.Append(FILE_PATH_LITERAL("managed_users")); 439 cur = cur.Append(FILE_PATH_LITERAL("managed_users"));
446 break; 440 break;
447 #endif 441 #endif
448 case chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS: 442 case chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS:
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 606
613 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) { 607 void SetInvalidSpecifiedUserDataDir(const base::FilePath& user_data_dir) {
614 g_invalid_specified_user_data_dir.Get() = user_data_dir; 608 g_invalid_specified_user_data_dir.Get() = user_data_dir;
615 } 609 }
616 610
617 const base::FilePath& GetInvalidSpecifiedUserDataDir() { 611 const base::FilePath& GetInvalidSpecifiedUserDataDir() {
618 return g_invalid_specified_user_data_dir.Get(); 612 return g_invalid_specified_user_data_dir.Get();
619 } 613 }
620 614
621 } // namespace chrome 615 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698