blob: 05b8cb0e1f08a2fb7c4af45ee9eaf0b8e1f7a638 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "chrome/browser/mac/nsprocessinfo_additions.h"
#import "content/public/common/content_switches.h"
@implementation NSProcessInfo(ChromeAdditions)
- (BOOL)cr_isMainBrowserOrTestProcess {
NSString* processTypeString =
[NSString stringWithFormat:@"--%s=", switches::kProcessType];
for (NSString *argument in [self arguments]) {
if ([argument hasPrefix:processTypeString])
return NO;
}
return YES;
}
@end