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

Unified Diff: tools/gn/filesystem_utils.cc

Issue 216903004: Add optional public header checking to GN build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit test Created 6 years, 8 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 | « tools/gn/filesystem_utils.h ('k') | tools/gn/gn.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/filesystem_utils.cc
diff --git a/tools/gn/filesystem_utils.cc b/tools/gn/filesystem_utils.cc
index 10837621c3e4bb7d45e26c2ac400db1b00ce1adb..4e7e604a6fbb0a7c27c2b20f494de8fe5d53f9c2 100644
--- a/tools/gn/filesystem_utils.cc
+++ b/tools/gn/filesystem_utils.cc
@@ -165,8 +165,7 @@ bool FilesystemStringsEqual(const base::FilePath::StringType& a,
} // namespace
-SourceFileType GetSourceFileType(const SourceFile& file,
- Settings::TargetOS os) {
+SourceFileType GetSourceFileType(const SourceFile& file) {
base::StringPiece extension = FindExtension(&file.value());
if (extension == "cc" || extension == "cpp" || extension == "cxx")
return SOURCE_CC;
@@ -174,29 +173,14 @@ SourceFileType GetSourceFileType(const SourceFile& file,
return SOURCE_H;
if (extension == "c")
return SOURCE_C;
-
- switch (os) {
- case Settings::MAC:
- if (extension == "m")
- return SOURCE_M;
- if (extension == "mm")
- return SOURCE_MM;
- break;
-
- case Settings::WIN:
- if (extension == "rc")
- return SOURCE_RC;
- // TODO(brettw) asm files.
- break;
-
- default:
- break;
- }
-
- if (os != Settings::WIN) {
- if (extension == "S")
- return SOURCE_S;
- }
+ if (extension == "m")
+ return SOURCE_M;
+ if (extension == "mm")
+ return SOURCE_MM;
+ if (extension == "rc")
+ return SOURCE_RC;
+ if (extension == "S")
+ return SOURCE_S;
return SOURCE_UNKNOWN;
}
« no previous file with comments | « tools/gn/filesystem_utils.h ('k') | tools/gn/gn.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698