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

Unified Diff: tools/gn/header_checker.h

Issue 229423002: Improve public header file checking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: tools/gn/header_checker.h
diff --git a/tools/gn/header_checker.h b/tools/gn/header_checker.h
index f1c7aa321a6daf5e52523ec05507797d1a1cfddb..f62ca2c818e0de3bb7c19b3ae0d385e9013a8475 100644
--- a/tools/gn/header_checker.h
+++ b/tools/gn/header_checker.h
@@ -18,7 +18,9 @@
#include "tools/gn/err.h"
class BuildSettings;
+class InputFile;
class Label;
+class LocationRange;
class SourceFile;
class Target;
@@ -71,10 +73,13 @@ class HeaderChecker : public base::RefCountedThreadSafe<HeaderChecker> {
Err* err) const;
// Checks that the given file in the given target can include the given
- // include file. If disallowed, returns false and sets the error.
+ // include file. If disallowed, returns false and sets the error. The
+ // range indicates the location of the include in the file for error
+ // reporting.
bool CheckInclude(const Target* from_target,
- const SourceFile& source_file,
+ const InputFile& source_file,
const SourceFile& include_file,
+ const LocationRange& range,
Err* err) const;
// Returns true if the given search_for target is a dependency of

Powered by Google App Engine
This is Rietveld 408576698