Chromium Code Reviews| Index: ios/chrome/app/spotlight/actions_spotlight_manager.mm |
| diff --git a/ios/chrome/app/spotlight/actions_spotlight_manager.mm b/ios/chrome/app/spotlight/actions_spotlight_manager.mm |
| index e26959dbe8bb5c7f5dc0aedfbddfbdb3c7b959ea..9dea68b83c0dbd48515e180be93672ab8134adf3 100644 |
| --- a/ios/chrome/app/spotlight/actions_spotlight_manager.mm |
| +++ b/ios/chrome/app/spotlight/actions_spotlight_manager.mm |
| @@ -160,25 +160,18 @@ BOOL SetStartupParametersForSpotlightAction( |
| NSString* incognitoAction = base::SysUTF8ToNSString( |
| spotlight::kSpotlightActionNewIncognitoTab); |
| - NSMutableArray* spotlightItems = [NSMutableArray |
| - arrayWithObjects:[strongSelf getItemForAction:voiceSearchAction |
| - title:voiceSearchTitle], |
| - [strongSelf getItemForAction:newTabAction |
| - title:newTabTitle], |
| - [strongSelf getItemForAction:incognitoAction |
| - title:incognitoTitle], |
| - nil]; |
| - |
| - if (experimental_flags::IsQRCodeReaderEnabled()) { |
| - NSString* qrScannerTitle = l10n_util::GetNSString( |
| - IDS_IOS_APPLICATION_SHORTCUT_QR_SCANNER_TITLE); |
| - NSString* qrScannerAction = |
| - base::SysUTF8ToNSString(spotlight::kSpotlightActionQRScanner); |
| - |
| - [spotlightItems |
| - addObject:[strongSelf getItemForAction:qrScannerAction |
| - title:qrScannerTitle]]; |
| - } |
| + NSString* qrScannerTitle = l10n_util::GetNSString( |
| + IDS_IOS_APPLICATION_SHORTCUT_QR_SCANNER_TITLE); |
| + NSString* qrScannerAction = |
| + base::SysUTF8ToNSString(spotlight::kSpotlightActionQRScanner); |
| + |
| + NSArray* spotlightItems = @[ |
| + [strongSelf getItemForAction:voiceSearchAction |
| + title:voiceSearchTitle], |
| + [strongSelf getItemForAction:newTabAction title:newTabTitle], |
| + [strongSelf getItemForAction:incognitoAction title:incognitoTitle], |
| + [strongSelf getItemForAction:qrScannerAction title:qrScannerTitle] |
|
sdefresne
2017/02/03 16:16:42
nit: keep the trailing comma :-)
jif
2017/02/03 16:22:21
Done.
|
| + ]; |
| [[CSSearchableIndex defaultSearchableIndex] |
| indexSearchableItems:spotlightItems |