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

Unified Diff: chrome/browser/mac/keystone_glue.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/mac/keystone_glue.h ('k') | chrome/browser/mac/master_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/mac/keystone_glue.mm
diff --git a/chrome/browser/mac/keystone_glue.mm b/chrome/browser/mac/keystone_glue.mm
index 247231207a856cf159b91a6c0d7480ded9ce7e92..2b344665e90f39fb6a87ec7deadf1247051d382a 100644
--- a/chrome/browser/mac/keystone_glue.mm
+++ b/chrome/browser/mac/keystone_glue.mm
@@ -9,6 +9,7 @@
#include <vector>
+#include "base/file_util.h"
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
@@ -917,6 +918,20 @@ NSString* const kVersionKey = @"KSVersion";
namespace keystone_glue {
+std::string BrandCode() {
+ KeystoneGlue* keystoneGlue = [KeystoneGlue defaultKeystoneGlue];
+ NSString* brand_path = [keystoneGlue brandFilePath];
+
+ if (![brand_path length])
+ return std::string();
+
+ std::string brand_code;
+ file_util::ReadFileToString(FilePath([brand_path fileSystemRepresentation]),
+ &brand_code);
+
+ return brand_code;
+}
+
bool KeystoneEnabled() {
return [KeystoneGlue defaultKeystoneGlue] != nil;
}
« no previous file with comments | « chrome/browser/mac/keystone_glue.h ('k') | chrome/browser/mac/master_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698