    "[^/]+" ".."
    (substring
     (file-name-directory
-     (file-truename (or (and (string-prefix-p "/" cr-flymake-ninja-build-file)
+     (file-truename (or (and (cr-flymake-string-prefix-p
+                              "/" cr-flymake-ninja-build-file)
                              cr-flymake-ninja-build-file)
                         (concat (cr-flymake-chromium-src)
                                 cr-flymake-ninja-build-file))))

(add-hook 'find-file-hook 'cr-flymake-find-file 'append)
(add-hook 'after-save-hook 'cr-flymake-kick-off-check-after-save)

;; Show flymake infrastructure ERRORs in hopes of fixing them.
(setq flymake-log-level 0)

(provide 'flymake-chromium)

  "Return chromium's src/ directory, or nil on failure."
  (locate-dominating-file buffer-file-truename cr-flymake-ninja-build-file))

(defun cr-flymake-string-prefix-p (prefix str)
  "Return non-nil if PREFIX is a prefix of STR (23.2 has string-prefix-p but
  that's case insensitive and also 23.1 doesn't have it)."
  (string= prefix (substring str 0 (length prefix))))

(defun cr-flymake-current-file-name ()
  "Return the relative path from chromium's src/ directory to the
  file backing the current buffer or nil if it doesn't look like
  we're under chromium/src/."
  (when (and (cr-flymake-chromium-src)
             (cr-flymake-string-prefix-p
              (cr-flymake-chromium-src) buffer-file-truename))
    (substring buffer-file-truename (length (cr-flymake-chromium-src)))))

(defun cr-flymake-from-build-to-src-root ()
