Add team ID to base Bundle ID
This commit is contained in:
		
					parent
					
						
							
								1032287511
							
						
					
				
			
			
				commit
				
					
						a361d50b95
					
				
			
		
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -10,6 +10,7 @@
 | 
				
			||||||
#include "base/mac/foundation_util.h"
 | 
					#include "base/mac/foundation_util.h"
 | 
				
			||||||
#include "base/mac/scoped_nsautorelease_pool.h"
 | 
					#include "base/mac/scoped_nsautorelease_pool.h"
 | 
				
			||||||
#include "base/path_service.h"
 | 
					#include "base/path_service.h"
 | 
				
			||||||
 | 
					#include "base/strings/sys_string_conversions.h"
 | 
				
			||||||
#include "brightray/common/application_info.h"
 | 
					#include "brightray/common/application_info.h"
 | 
				
			||||||
#include "brightray/common/mac/main_application_bundle.h"
 | 
					#include "brightray/common/mac/main_application_bundle.h"
 | 
				
			||||||
#include "content/public/common/content_paths.h"
 | 
					#include "content/public/common/content_paths.h"
 | 
				
			||||||
| 
						 | 
					@ -52,8 +53,13 @@ void AtomMainDelegate::OverrideChildProcessPath() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void AtomMainDelegate::SetUpBundleOverrides() {
 | 
					void AtomMainDelegate::SetUpBundleOverrides() {
 | 
				
			||||||
  base::mac::ScopedNSAutoreleasePool pool;
 | 
					  base::mac::ScopedNSAutoreleasePool pool;
 | 
				
			||||||
  NSBundle* base_bundle = brightray::MainApplicationBundle();
 | 
					  NSBundle* bundle = brightray::MainApplicationBundle();
 | 
				
			||||||
  base::mac::SetBaseBundleID([[base_bundle bundleIdentifier] UTF8String]);
 | 
					  std::string base_bundle_id =
 | 
				
			||||||
 | 
					      base::SysNSStringToUTF8([bundle bundleIdentifier]);
 | 
				
			||||||
 | 
					  NSString* team_id = [bundle objectForInfoDictionaryKey:@"ElectronTeamID"];
 | 
				
			||||||
 | 
					  if (team_id)
 | 
				
			||||||
 | 
					    base_bundle_id = base::SysNSStringToUTF8(team_id) + "." + base_bundle_id;
 | 
				
			||||||
 | 
					  base::mac::SetBaseBundleID(base_bundle_id.c_str());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}  // namespace atom
 | 
					}  // namespace atom
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue