summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 12:40:26 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 12:40:26 +0000
commitd38f0991f8a25a28d86a96152158059578e82017 (patch)
tree47c311ba665b31b43c63b9f8b8668d6a297a31cd
parent4052c7343b977d7865405600d7e99b016f06dec4 (diff)
downloadchromium_src-d38f0991f8a25a28d86a96152158059578e82017.zip
chromium_src-d38f0991f8a25a28d86a96152158059578e82017.tar.gz
chromium_src-d38f0991f8a25a28d86a96152158059578e82017.tar.bz2
Also scan .m and .mm files in checkdeps.py
- add necessary DEPS rules - fix skia includes in test_shell to contain full path (third_party/skia/include/core/SkBitmap.h instead of just SkBitmap.h) - remove forbidden chrome/common include from app/resource_bundle_mac.mm Review URL: http://codereview.chromium.org/113147 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16273 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/resource_bundle_mac.mm1
-rw-r--r--chrome/DEPS6
-rwxr-xr-xtools/checkdeps/checkdeps.py21
-rw-r--r--webkit/tools/DEPS4
-rw-r--r--webkit/tools/test_shell/simple_clipboard_impl.cc2
-rw-r--r--webkit/tools/test_shell/test_shell.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm2
7 files changed, 23 insertions, 15 deletions
diff --git a/app/resource_bundle_mac.mm b/app/resource_bundle_mac.mm
index f8aab45..22ab274 100644
--- a/app/resource_bundle_mac.mm
+++ b/app/resource_bundle_mac.mm
@@ -17,7 +17,6 @@
#include "base/path_service.h"
#include "base/string_piece.h"
#include "base/string_util.h"
-#include "chrome/common/chrome_paths.h"
ResourceBundle::~ResourceBundle() {
FreeImages();
diff --git a/chrome/DEPS b/chrome/DEPS
index 9570568..0a1a3e1 100644
--- a/chrome/DEPS
+++ b/chrome/DEPS
@@ -18,6 +18,12 @@ include_rules = [
# Allow inclusion of WebKit API files.
"+webkit/api",
+ # Allow inclusion of Mozilla interface headers.
+ "+third_party/mozilla",
+
+ # Allow usage of Google Toolbox for Mac.
+ "+third_party/GTM",
+
# Brett's test. Contact him for questions.
"+frame_window",
]
diff --git a/tools/checkdeps/checkdeps.py b/tools/checkdeps/checkdeps.py
index 96e9a16..25319cf 100755
--- a/tools/checkdeps/checkdeps.py
+++ b/tools/checkdeps/checkdeps.py
@@ -69,9 +69,6 @@ INCLUDE_RULES_VAR_NAME = "include_rules"
# be checked. This allows us to skip third party code, for example.
SKIP_SUBDIRS_VAR_NAME = "skip_child_includes"
-# We'll search for lines beginning with this string for checking.
-INCLUDE_PREFIX = "#include"
-
# The maximum number of lines to check in each source file before giving up.
MAX_LINES = 150
@@ -84,7 +81,7 @@ VERBOSE = False
# This regular expression will be used to extract filenames from include
# statements.
-EXTRACT_INCLUDE_FILENAME = re.compile(INCLUDE_PREFIX + ' *"(.*)"')
+EXTRACT_INCLUDE_PATH = re.compile('[ \t]*#[ \t]*(?:include|import)[ \t]+"(.*)"')
# In lowercase, using forward slashes as directory separators, ending in a
# forward slash. Set by the command line options.
@@ -274,19 +271,21 @@ def ApplyDirectoryRules(existing_rules, dir_name):
def ShouldCheckFile(file_name):
"""Returns True if the given file is a type we want to check."""
- if len(file_name) < 2:
- return False
- return file_name.endswith(".cc") or file_name.endswith(".h")
+ checked_extensions = [
+ '.h',
+ '.cc',
+ '.m',
+ '.mm',
+ ]
+ basename, extension = os.path.splitext(file_name)
+ return extension in checked_extensions
def CheckLine(rules, line):
"""Checks the given file with the given rule set. If the line is an #include
directive and is illegal, a string describing the error will be returned.
Otherwise, None will be returned."""
- if line[0:8] != "#include":
- return None # Not an include line
-
- found_item = EXTRACT_INCLUDE_FILENAME.match(line)
+ found_item = EXTRACT_INCLUDE_PATH.match(line)
if not found_item:
return None # Not a match
diff --git a/webkit/tools/DEPS b/webkit/tools/DEPS
index ef02b16..84a57f5 100644
--- a/webkit/tools/DEPS
+++ b/webkit/tools/DEPS
@@ -1,4 +1,8 @@
include_rules = [
"+chrome/common",
"+skia/ext",
+
+ # Allow inclusion of WebKit mac headers.
+ # This may need to be cleaned up, see http://crbug.com/12149
+ "+mac",
]
diff --git a/webkit/tools/test_shell/simple_clipboard_impl.cc b/webkit/tools/test_shell/simple_clipboard_impl.cc
index 264dfa5..bb58c8b 100644
--- a/webkit/tools/test_shell/simple_clipboard_impl.cc
+++ b/webkit/tools/test_shell/simple_clipboard_impl.cc
@@ -12,7 +12,7 @@
#include "googleurl/src/gurl.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"
-#include "SkBitmap.h"
+#include "third_party/skia/include/core/SkBitmap.h"
// Clipboard glue
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index ef5e8e7..bb609ca 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -43,7 +43,7 @@
#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "webkit/tools/test_shell/test_shell_switches.h"
-#include "SkBitmap.h"
+#include "third_party/skia/include/core/SkBitmap.h"
namespace {
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index 5be826d..c7a4a53 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -42,7 +42,7 @@
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "webkit/tools/test_shell/test_navigation_controller.h"
-#import "third_party/skia/include/core/SkBitmap.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#import "mac/DumpRenderTreePasteboard.h"