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

Side by Side Diff: chrome/browser/mac/master_prefs.mm

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/browser/jumplist_win.cc ('k') | chrome/browser/media/chrome_webrtc_browsertest.cc » ('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) 2011 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/browser/mac/master_prefs.h" 5 #include "chrome/browser/mac/master_prefs.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/mac/foundation_util.h" 8 #include "base/mac/foundation_util.h"
9 #include "chrome/common/chrome_paths_internal.h" 9 #include "chrome/common/chrome_paths_internal.h"
10 #include "chrome/common/chrome_version_info.h" 10 #include "chrome/common/chrome_version_info.h"
(...skipping 27 matching lines...) Expand all
38 38
39 // On official builds, try 39 // On official builds, try
40 //~/Library/Application Support/Google/Chrome/Google Chrome Master Preferences 40 //~/Library/Application Support/Google/Chrome/Google Chrome Master Preferences
41 // On chromium builds, try 41 // On chromium builds, try
42 //~/Library/Application Support/Chromium/Chromium Master Preferences 42 //~/Library/Application Support/Chromium/Chromium Master Preferences
43 // This intentionally doesn't use eventual --user-data-dir overrides. 43 // This intentionally doesn't use eventual --user-data-dir overrides.
44 base::FilePath user_application_support_path; 44 base::FilePath user_application_support_path;
45 if (chrome::GetDefaultUserDataDirectory(&user_application_support_path)) { 45 if (chrome::GetDefaultUserDataDirectory(&user_application_support_path)) {
46 user_application_support_path = 46 user_application_support_path =
47 user_application_support_path.Append(kMasterPreferencesFileName); 47 user_application_support_path.Append(kMasterPreferencesFileName);
48 if (file_util::PathExists(user_application_support_path)) 48 if (base::PathExists(user_application_support_path))
49 return user_application_support_path; 49 return user_application_support_path;
50 } 50 }
51 51
52 // On official builds, try /Library/Google/Google Chrome Master Preferences 52 // On official builds, try /Library/Google/Google Chrome Master Preferences
53 // On chromium builds, try 53 // On chromium builds, try
54 // /Library/Application Support/Chromium/Chromium Master Preferences 54 // /Library/Application Support/Chromium/Chromium Master Preferences
55 base::FilePath search_path; 55 base::FilePath search_path;
56 if (!base::mac::GetLocalDirectory(kSearchPath, &search_path)) 56 if (!base::mac::GetLocalDirectory(kSearchPath, &search_path))
57 return base::FilePath(); 57 return base::FilePath();
58 58
59 return search_path.Append(kMasterPreferencesDirectory) 59 return search_path.Append(kMasterPreferencesDirectory)
60 .Append(kMasterPreferencesFileName); 60 .Append(kMasterPreferencesFileName);
61 } 61 }
62 62
63 } // namespace master_prefs 63 } // namespace master_prefs
OLDNEW
« no previous file with comments | « chrome/browser/jumplist_win.cc ('k') | chrome/browser/media/chrome_webrtc_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698