Make ui gn check pass. Misc GN build improvements.

Content/public/app was messed up and didn't link everything properly, so this separates it out into browser and child like content/app is.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/545313002

Cr-Original-Commit-Position: refs/heads/master@{#293592}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b41a8d6e789ac5df9a6d314cd0ad59f584f53dea
diff --git a/tools/gn/input_file_manager.cc b/tools/gn/input_file_manager.cc
index eb25508..f358fdc 100644
--- a/tools/gn/input_file_manager.cc
+++ b/tools/gn/input_file_manager.cc
@@ -215,11 +215,20 @@
     }
   }
 
-  // The other load could have failed. In this case that error will be printed
-  // to the console, but we need to return something here, so make up a
+  // The other load could have failed. In this case that error was probably
+  // printed to the console, but we need to return something here, so make up a
   // dummy error.
-  if (!data->parsed_root)
-    *err = Err(origin, "File parse failed");
+  //
+  // There is a race condition. The other load could have failed, but if the
+  // other thread is delayed for some reason, this thread could end up
+  // reporting the error to the scheduler first (since first error report
+  // wins). The user will see this one and the "real" one will be discarded.
+  if (!data->parsed_root) {
+    *err = Err(origin, "File parse failed.",
+        "If you see this, I'm really sorry, but a race condition has caused\n"
+        "me to eat your error message. It was crunchy. If the parse error\n"
+        "in your imported file isn't obvious, try re-running GN.");
+  }
   return data->parsed_root.get();
 }