Fix generation of Xcode project.

Issue https://codereview.chromium.org/2005483002 changed the code to
use FindExtension() instead of base::FilePath::Extension() but did
not accomodate for the fact that the extension is now returned without
the leading dot.

Fix this by changed all the extension values used for comparison to
not include the leading dot either. This restore the source indexation
when opening the project with Xcode.

BUG=297668

Review-Url: https://codereview.chromium.org/2046373002
Cr-Original-Commit-Position: refs/heads/master@{#398584}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 63a623cc29066ad0e3c4974851c2e8a56a012f7a
diff --git a/tools/gn/xcode_object.cc b/tools/gn/xcode_object.cc
index ab056b2..ef24e7d 100644
--- a/tools/gn/xcode_object.cc
+++ b/tools/gn/xcode_object.cc
@@ -96,48 +96,48 @@
 };
 
 const SourceTypeForExt kSourceTypeForExt[] = {
-    {".a", "archive.ar"},
-    {".app", "wrapper.application"},
-    {".appex", "wrapper.app-extension"},
-    {".bdic", "file"},
-    {".bundle", "wrapper.cfbundle"},
-    {".c", "sourcecode.c.c"},
-    {".cc", "sourcecode.cpp.cpp"},
-    {".cpp", "sourcecode.cpp.cpp"},
-    {".css", "text.css"},
-    {".cxx", "sourcecode.cpp.cpp"},
-    {".dart", "sourcecode"},
-    {".dylib", "compiled.mach-o.dylib"},
-    {".framework", "wrapper.framework"},
-    {".h", "sourcecode.c.h"},
-    {".hxx", "sourcecode.cpp.h"},
-    {".icns", "image.icns"},
-    {".java", "sourcecode.java"},
-    {".js", "sourcecode.javascript"},
-    {".kext", "wrapper.kext"},
-    {".m", "sourcecode.c.objc"},
-    {".mm", "sourcecode.cpp.objcpp"},
-    {".nib", "wrapper.nib"},
-    {".o", "compiled.mach-o.objfile"},
-    {".pdf", "image.pdf"},
-    {".pl", "text.script.perl"},
-    {".plist", "text.plist.xml"},
-    {".pm", "text.script.perl"},
-    {".png", "image.png"},
-    {".py", "text.script.python"},
-    {".r", "sourcecode.rez"},
-    {".rez", "sourcecode.rez"},
-    {".s", "sourcecode.asm"},
-    {".storyboard", "file.storyboard"},
-    {".strings", "text.plist.strings"},
-    {".swift", "sourcecode.swift"},
-    {".ttf", "file"},
-    {".xcassets", "folder.assetcatalog"},
-    {".xcconfig", "text.xcconfig"},
-    {".xcdatamodel", "wrapper.xcdatamodel"},
-    {".xcdatamodeld", "wrapper.xcdatamodeld"},
-    {".xib", "file.xib"},
-    {".y", "sourcecode.yacc"},
+    {"a", "archive.ar"},
+    {"app", "wrapper.application"},
+    {"appex", "wrapper.app-extension"},
+    {"bdic", "file"},
+    {"bundle", "wrapper.cfbundle"},
+    {"c", "sourcecode.c.c"},
+    {"cc", "sourcecode.cpp.cpp"},
+    {"cpp", "sourcecode.cpp.cpp"},
+    {"css", "text.css"},
+    {"cxx", "sourcecode.cpp.cpp"},
+    {"dart", "sourcecode"},
+    {"dylib", "compiled.mach-o.dylib"},
+    {"framework", "wrapper.framework"},
+    {"h", "sourcecode.c.h"},
+    {"hxx", "sourcecode.cpp.h"},
+    {"icns", "image.icns"},
+    {"java", "sourcecode.java"},
+    {"js", "sourcecode.javascript"},
+    {"kext", "wrapper.kext"},
+    {"m", "sourcecode.c.objc"},
+    {"mm", "sourcecode.cpp.objcpp"},
+    {"nib", "wrapper.nib"},
+    {"o", "compiled.mach-o.objfile"},
+    {"pdf", "image.pdf"},
+    {"pl", "text.script.perl"},
+    {"plist", "text.plist.xml"},
+    {"pm", "text.script.perl"},
+    {"png", "image.png"},
+    {"py", "text.script.python"},
+    {"r", "sourcecode.rez"},
+    {"rez", "sourcecode.rez"},
+    {"s", "sourcecode.asm"},
+    {"storyboard", "file.storyboard"},
+    {"strings", "text.plist.strings"},
+    {"swift", "sourcecode.swift"},
+    {"ttf", "file"},
+    {"xcassets", "folder.assetcatalog"},
+    {"xcconfig", "text.xcconfig"},
+    {"xcdatamodel", "wrapper.xcdatamodel"},
+    {"xcdatamodeld", "wrapper.xcdatamodeld"},
+    {"xib", "file.xib"},
+    {"y", "sourcecode.yacc"},
 };
 
 const char* GetSourceType(const base::StringPiece& ext) {
@@ -150,12 +150,12 @@
 }
 
 bool HasExplicitFileType(const base::StringPiece& ext) {
-  return ext == ".dart";
+  return ext == "dart";
 }
 
 bool IsSourceFileForIndexing(const base::StringPiece& ext) {
-  return ext == ".c" || ext == ".cc" || ext == ".cpp" || ext == ".cxx" ||
-         ext == ".m" || ext == ".mm";
+  return ext == "c" || ext == "cc" || ext == "cpp" || ext == "cxx" ||
+         ext == "m" || ext == "mm";
 }
 
 void PrintValue(std::ostream& out, IndentRules rules, unsigned value) {