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

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

Issue 7655056: Enable brand codes and master preferences on the Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: expando Created 9 years, 3 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/mac/master_prefs.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/mac/master_prefs.h"
6
7 #include "base/mac/foundation_util.h"
8 #include "chrome/common/chrome_version_info.h"
9
10 #if defined(GOOGLE_CHROME_BUILD)
11
12 namespace {
13
14 const char kGoogleDirectory[] = "Google";
15 const char kMasterPreferencesFileName[] = "Google Chrome Master Preferences";
16
17 } // namespace
18
19 #endif // GOOGLE_CHROME_BUILD
20
21 namespace master_prefs {
22
23 FilePath MasterPrefsPath() {
24 #if defined(GOOGLE_CHROME_BUILD)
25 // There is only a system-level master preferences file, and only for the
26 // official build, and not for the canary.
27 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
28
29 if (channel == chrome::VersionInfo::CHANNEL_CANARY)
30 return FilePath();
31
32 FilePath library_path;
33 if (!base::mac::GetLocalDirectory(NSLibraryDirectory, &library_path))
34 return FilePath();
35
36 return library_path.Append(kGoogleDirectory)
37 .Append(kMasterPreferencesFileName);
38 #else
39 return FilePath();
40 #endif // GOOGLE_CHROME_BUILD
41 }
42
43 } // namespace master_prefs
OLDNEW
« no previous file with comments | « chrome/browser/mac/master_prefs.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698